Ejemplo n.º 1
0
 public UserControlModel(IUser user, IUsersRequisite more, string[] roles)
 {
     this.UserId = user.UserId;
     this.Nick = user.Nick;
     this.Email = user.Email;
     this.CreateDateTime = user.CreateDateTime;
     this.Active = user.Active;
     if (more != null)
     {
         this.LastName = more.LastName;
         this.FirstName = more.FirstName;
         this.MiddleName = more.MiddleName;
     }
     this.Roles = roles;
 }
Ejemplo n.º 2
0
        public UserRequsitiesModel(IUsersRequisite requisities, string nick)
        {
            this.Nick = nick;
            if (requisities != null)
            {
                exist = true;
                this.Country = requisities.Country;
                this.City = requisities.City;
                this.District = requisities.District;
                this.FirstName = requisities.FirstName;
                this.LastName = requisities.LastName;
                this.MiddleName = requisities.MiddleName;
                this.Phone = requisities.Phone;
                if (requisities.PostIndex == 0)
                    this.PostIndex = null;
                else
                {
                    this.PostIndex = requisities.PostIndex;
                }
                if (requisities.Address != null)
                {
                    string[] address = requisities.Address.Split(' ');
                    if (address != null)
                    {
                        this.Street = address[(int)fullAddress.street];
                        this.Building = address[(int)fullAddress.building];
                        if (address.Length == (int)fullAddress.addressIsFull)
                        {
                            this.Room = address[(int)fullAddress.room];
                        }
                    }
                }

            }
            else
            {
                exist = false;
            }
        }