Esempio n. 1
0
        public UserVM Start(Employee employee, EditUserMode mode = EditUserMode.COMPLETE, string submitButtonText = "Registrar")
        {
            Mode        = mode;
            OldPassword = employee.CPF;
            UserID      = employee.UserID;
            Name        = employee.Name;
            CPF         = employee.CPF;
            Email       = employee.Email;
            Birthday    = employee.Birthday == null ? "" : employee.Birthday.Value.Date.ToString("yyyy-MM-dd");
            //Birthday = employee.Birthday;
            Gender           = employee.Gender ?? Models.Users.Gender.Masculino;
            ComercialName    = employee.ComercialName;
            HomePhone        = employee.HomePhone;
            CellPhone        = employee.CellPhone;
            CEP              = employee.CEP;
            Street           = employee.Street;
            Number           = employee.Number;
            Complement       = employee.Complement;
            Neighborhood     = employee.Neighborhood;
            City             = employee.City;
            State            = employee.State;
            SubmitButtonText = submitButtonText;

            return(this);
        }
Esempio n. 2
0
 public UserVM Start(UserProfile user, EditUserMode mode = EditUserMode.COMPLETE, string submitButtonText = "Registrar")
 {
     Mode        = mode;
     OldPassword = user.PersonalInfo.CPF;
     UserID      = user.UserID;
     Name        = user.PersonalInfo.Name;
     CPF         = user.PersonalInfo.CPF;
     Email       = user.ContactInfo.Email;
     Birthday    = user.PersonalInfo.Birthday == null ? "" : user.PersonalInfo.Birthday.Value.Date.ToString("yyyy-MM-dd");
     //Birthday = RefundProfile.Birthday;
     Gender           = user.PersonalInfo.Gender ?? Models.Gender.Masculino;
     HomePhone        = user.ContactInfo.HomePhone;
     CellPhone        = user.ContactInfo.CellPhone;
     CEP              = user.AddressInfo.CEP;
     Street           = user.AddressInfo.Street;
     Number           = user.AddressInfo.Number;
     Complement       = user.AddressInfo.Complement;
     Neighborhood     = user.AddressInfo.Neighborhood;
     City             = user.AddressInfo.City;
     State            = user.AddressInfo.State;
     SubmitButtonText = submitButtonText;
     return(this);
 }
Esempio n. 3
0
 public UserVM SetMode(EditUserMode mode = EditUserMode.COMPLETE, string submitButtonText = "Registrar")
 {
     Mode             = mode;
     SubmitButtonText = submitButtonText;
     return(this);
 }