コード例 #1
0
 public AclUserListItemModel(AclUserListItem aclUser)
 {
     this.Id                    = aclUser.Id;
     this.Email                 = aclUser.Email;
     this.Fullname              = aclUser.Fullname;
     this.AccountType           = AccountTypeEnumConvertor.GetString((AccountTypeEnum)aclUser.AccountType);
     this.IsDisabled            = aclUser.IsDisabled;
     this.CurrentTerritoryCount = aclUser.CurrentTerritoryCount;
     this.MaxTerritoryCount     = (aclUser.MaxTerritoryCount >= 0 ? aclUser.MaxTerritoryCount.ToString() : AccountRes.LABEL_TERRITORY_COUNT_UNLIMITED);
 }
コード例 #2
0
 public ManageModel(AclUser aclUser)
 {
     this.Id                 = aclUser.Id;
     this.Fullname           = aclUser.Fullname;
     this.Email              = aclUser.Email;
     this.AccountType        = AccountTypeEnumConvertor.GetString(aclUser.AccountTypeEx);
     this.MaxTerritoryCount  = aclUser.MaxTerritoryCount;
     this.UsedTerritoryCount = aclUser.Territories.Where(item => item.IsDeleted == false).Count();
     this.CanChangePassword  = (aclUser.AccountTypeEx != AccountTypeEnum.Demo);
 }
コード例 #3
0
 public AclUserDetailModel(AclUser aclUser)
 {
     this.Id                = aclUser.Id;
     this.Email             = aclUser.Email;
     this.IsDisabledText    = aclUser.IsDisabled ? GlobalRes.BOOL_VALUE_TRUE : GlobalRes.BOOL_VALUE_FALSE;
     this.IsDisabled        = aclUser.IsDisabled;
     this.AccountType       = AccountTypeEnumConvertor.GetString(aclUser.AccountTypeEx);
     this.MaxTerritoryCount = aclUser.MaxTerritoryCount;
     this.Fullname          = aclUser.Fullname;
 }