Beispiel #1
0
 public UpdateClientDto(Dom.Client src = null)
 {
     if (src != null)
     {
         this.id          = src.id;
         this.name        = src.name;
         this.accessStart = ShortDateConverter.ConvertToIso(src.accessStart);
         this.accessEnd   = ShortDateConverter.ConvertToIso(src.accessEnd);
     }
 }
Beispiel #2
0
 public UserDto(IApplicationUser src, IEnumerable <Dom.UserGroup> userGroups)
 {
     if (src != null)
     {
         userName       = src.UserName;
         displayName    = src.displayName;
         email          = src.Email;
         userGroupNames = string.Join(", ", src.userGroupIds.Select(ugid => GetUserGroupName(userGroups, ugid)));
         accessEnd      = ShortDateConverter.ConvertToIso(src.accessEnd);
         accessStart    = ShortDateConverter.ConvertToIso(src.accessStart);
     }
 }
Beispiel #3
0
        private void from(Dom.Client client)
        {
            id          = client.id;
            name        = client.name;
            accessEnd   = ShortDateConverter.ConvertToIso(client.accessEnd);
            accessStart = ShortDateConverter.ConvertToIso(client.accessStart);

            created   = client.created;
            createdBy = client.createdBy;
            edited    = client.edited;
            editedBy  = client.editedBy;
        }
Beispiel #4
0
 public UpdateUserDto(IApplicationUser src = null, SelectItem[] selectItems = null)
 {
     if (src != null)
     {
         userName     = src.UserName;
         displayName  = src.displayName;
         email        = src.Email;
         userGroupIds = src.userGroupIds;
         accessEnd    = ShortDateConverter.ConvertToIso(src.accessEnd);
         accessStart  = ShortDateConverter.ConvertToIso(src.accessStart);
     }
     if (selectItems == null)
     {
         this.userGroupSelectItems = new SelectItem[0];
     }
     else
     {
         this.userGroupSelectItems = selectItems;
     }
 }