Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "evbenerji"

Dear support,

I've reviewed what you wrote before about data protection; https://support.aspnetzero.com/QA/Questions/247

Could you please give me more information about how to integrate Data Protection mechanism into Asp.net zero?

Regards.

Dear support team,

I'm using ASP.NET Core with jquery v7.1.0.0

When I "Logout" the .\admin account, the Login page comes. In Login page I try to login with different Tenant Name.

When I click the switch to tenant, Tenancy Name Input box still disabled. And also $switchToTenant.change function not fired in Default.js

I researched the problem, nobody getting error like me.

Thanks.

Dear Support Team,

After the update code with new version there is error in ...Web.Mvc\wwwroot\metronic\themes\default\js\layout.js Error Details; headerMenuOffcanvas.pauseDropdownHover is not a function

// Sidebar toggle var initAsideToggler = function() { ... headerMenu.pauseDropdownHover(800); //ERROR asideMenu.pauseDropdownHover(800); }); ... }

I am waiting for your advice.

Regards.

Hi all, Can anybody help to solving this problem. I try to add list of UserContacts to the User using repeater. (One to many relation) I get error about Json to Json array deserialization.

Entities;

User

public class User : AbpUser<User>
    {
        public virtual Guid? ProfilePictureId { get; set; }
        ...
        public virtual ICollection<UserContact> UserContacts { get; set; }
    }

UserContacts

[Table("UserContacts")]
public class UserContact : FullAuditedEntity<long> 
    {
        [Required]
	public virtual string ContactName { get; set; }
		
	[Required]
	public virtual string ContactPhone { get; set; }
        
	public virtual long UserId { get; set; }
	public User User { get; set; }
    }

DTO

    public class UserContactDto : EntityDto<long>
    {
        public string ContactName { get; set; }

        public virtual string ContactPhone { get; set; }

        public long UserId { get; set; } 
    }

UserAppService

public async Task<GetUserForEditOutput> GetUserForEdit(NullableIdDto<long> input)
        {
            //Getting all available roles
            ...

            var relatedUserContacts = await _userContactRepository.GetAll().Where(c=>c.UserId == input.Id.Value).ToListAsync();

            var output = new GetUserForEditOutput
            {
                Roles = userRoleDtos,
                ...
                RelatedUserContacts = ObjectMapper.Map<List<UserContactDto>>(relatedUserContacts)
            };

            if (!input.Id.HasValue)
            {
                ...
            }
            else
            {
                ...
            }

            return output;
        }

CreateOrUpdateUserInput

public class CreateOrUpdateUserInput
    {
        [Required]
        public UserEditDto User { get; set; }

        ...

        public List<UserContactDto> RelatedUserContacts { get; set; }

        public CreateOrUpdateUserInput()
        {
            ...
            RelatedUserContacts = new List<UserContactDto>();
        }
    }

GetUserForEditOutput

public class GetUserForEditOutput
    {
        ...

        public UserEditDto User { get; set; }

        ...

        public List<UserContactDto> RelatedUserContacts { get; set; } 
    }

_CreateOrEditModal.cshtml

@model CreateOrEditUserModalViewModel

...
<div id="UserContacts" name="userContacts">
                    <div class="form-group m-form__group" id="UserContacts">
                        <label>@L("UserContacts")</label>
                        <div data-repeater-list="UserContacts" class="col-lg-10">
                            @foreach (var userContact in Model.RelatedUserContacts)
                            {
                                <div data-repeater-item class="form-group m-form__group row align-items-center">
                                    <div class="col-md-4">
                                        <input type="hidden" name="Id" value="@userContact.Id" />
                                        <div class="m-form__group m-form__group--inline">
                                            <div class="m-form__label">
                                                <label>@L("ContactName"):</label>
                                            </div>
                                            <div class="m-form__control">
                                                <input id="ContactName" type="text" name="contactName" value="@userContact.ContactName" class="form-control m-input">
                                            </div>
                                        </div>
                                        <div class="d-md-none m--margin-bottom-10"></div>
                                    </div>
                                    <div class="col-md-4">
                                        <div class="m-form__group m-form__group--inline">
                                            <div class="m-form__label">
                                                <label class="m-label m-label--single">@L("ContactPhone"):</label>
                                            </div>
                                            <div class="m-form__control">
                                                <input id="ContactPhone" type="text" name="contactPhone" value="@userContact.ContactPhone" class="form-control m-input">
                                            </div>
                                        </div>
                                        <div class="d-md-none m--margin-bottom-10"></div>
                                    </div>
                                    <div class="col-md-4">
                                        <div data-repeater-delete="" class="btn-sm btn btn-danger m-btn m-btn--icon m-btn--pill">
                                            <span>
                                                <i class="la la-trash-o"></i>
                                                <span>@L("Delete")</span>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            }
                        </div>
                    </div>
                    <div class="m-form__group form-group row">
                        <label class="col-lg-2 col-form-label"></label>
                        <div class="col-lg-4">
                            <div data-repeater-create="" class="btn btn btn-sm btn-brand m-btn m-btn--icon m-btn--pill m-btn--wide">
                                <span>
                                    <i class="la la-plus"></i>
                                    <span>Add</span>
                                </span>
                            </div>
                        </div>
                    </div>
                </div>
                ...

_CreateOrEditModal.js

            ...
            $("#UserContacts").repeater({
                initEmpty: false,
                show: function () {
                    $(this).slideDown()
                },
                hide: function (e) {
                    $(this).slideUp(e)
                }
            })
            ...
            
            this.save = function () {
            ...
            _userService.createOrUpdateUser({
                user: user,
                assignedRoleNames: assignedRoleNames,
                sendActivationEmail: user.SendActivationEmail,
                SetRandomPassword: user.SetRandomPassword,
                organizationUnits: _organizationTree.getSelectedOrganizations(),
                relatedUserContacts: JSON.stringify(user.UserContacts)
            }).done(function () {
                ...
            }).always(function () {
                ...
            });
        };

Firstly, I know the description a little bit long but I am confused and stuck. Thanks.

Dear ASP.NET ZERO Support Team,

Is it possible to change Default "Tenancy Code Name" I also check the question #2767 This way not working.

Thanks.

Showing 1 to 5 of 5 entries