Exemplo n.º 1
0
        public UserDataModel GetUser(UserDTO oUserDTO)
        {

            UserDataModel oUserDataModel = null;
            if (oUserDTO != null)
            {

                UserAddressDTO oUserAddressDTO = (oUserDTO.UserAddresses != null) ? oUserDTO.UserAddresses.Where(o => o.IsPrimary).FirstOrDefault() : null;
                AddressDTO oPrimaryAddressDTO = (oUserAddressDTO != null) ? oUserAddressDTO.Address : null; //oAddressBL.Get(oUserAddressDTO.AddressID) : null;

                UserPhoneDTO oUserPhoneDTO = (oUserDTO.UserPhones != null) ? oUserDTO.UserPhones.Where(o => o.IsPrimary).FirstOrDefault() : null;
                PhoneDTO oPrimaryPhoneDTO = (oUserPhoneDTO != null) ? oUserPhoneDTO.Phone : null; //oPhonesBL.Get(oUserPhoneDTO.PhoneID) : null;

                UserEmailDTO oUserEmailDTO = (oUserDTO.UserEmails != null) ? oUserDTO.UserEmails.Where(o => o.IsPrimary).FirstOrDefault() : null;
                EmailDTO oPrimaryEmailDTO = (oUserEmailDTO != null) ? oUserEmailDTO.Email : null; //oEmailsBL.Get(oUserEmailDTO.EmailID) : null;

                oUserDataModel = UserDataModelAssembler.ToDataModel(oUserDTO, oPrimaryAddressDTO, oPrimaryPhoneDTO, oPrimaryEmailDTO);
                oUserDataModel.PrimaryUserAddressID = (oUserAddressDTO != null) ? oUserAddressDTO.UserAddressID : 0;
                oUserDataModel.PrimaryUserPhoneID = (oUserPhoneDTO != null) ? oUserPhoneDTO.UserPhoneID : 0;
                oUserDataModel.PrimaryUserEmailID = (oUserEmailDTO != null) ? oUserEmailDTO.UserEmailID : 0;

                //Get All the Addresses.
                oUserDataModel.Addresses = (oUserDTO.UserAddresses != null) ? oAddressWorkflows.GetAddresses(oUserDTO.UserAddresses.Select(ua => ua.Address).ToList()) : null;
            }
            return oUserDataModel;
        }
Exemplo n.º 2
0
        public UserRoleDTO(Int32 userRoleID, Int32 userID, Int32 roleID, RoleDTO role, UserDTO user)
        {
			this.UserRoleID = userRoleID;
			this.UserID = userID;
			this.RoleID = roleID;
			this.Role = role;
			this.User = user;
        }
Exemplo n.º 3
0
        public UserEmailDTO(Int32 userEmailID, Int32 userID, Int32 emailID, Boolean isPrimary, EmailDTO email, UserDTO user)
        {
			this.UserEmailID = userEmailID;
			this.UserID = userID;
			this.EmailID = emailID;
			this.IsPrimary = isPrimary;
			this.Email = email;
			this.User = user;
        }
Exemplo n.º 4
0
        public UserAddressDTO(Int32 userAddressID, Int32 userID, Int32 addressID, Boolean isPrimary, AddressDTO address, UserDTO user)
        {
			this.UserAddressID = userAddressID;
			this.UserID = userID;
			this.AddressID = addressID;
			this.IsPrimary = isPrimary;
			this.Address = address;
			this.User = user;
        }
Exemplo n.º 5
0
        public UserDTO Create(UserDTO oUserDTO)
        {
            if (oUserDTO != null) {
                User oUser = UserAssembler.ToEntity(oUserDTO);
                return UserAssembler.ToDTO(oUsersRepo.CreateUser(oUser));
            }

            return null;
        }
Exemplo n.º 6
0
        public UserPhoneDTO(Int32 userPhoneID, Int32 userID, Int32 phoneID, Boolean isPrimary, UserDTO user, PhoneDTO phone)
        {
			this.UserPhoneID = userPhoneID;
			this.UserID = userID;
			this.PhoneID = phoneID;
			this.IsPrimary = isPrimary;
			this.User = user;
			this.Phone = phone;
        }
Exemplo n.º 7
0
        public JobApplicationDTO(Int32 jobApplicationID, Int32 jobID, Int32 applicantUserID, DateTime applicationDate, JobDTO job, UserDTO user, List<JobApplicationStateDTO> jobApplicationStates)
        {
			this.JobApplicationID = jobApplicationID;
			this.JobID = jobID;
			this.ApplicantUserID = applicantUserID;
			this.ApplicationDate = applicationDate;
			this.Job = job;
			this.User = user;
			this.JobApplicationStates = jobApplicationStates;
        }
        public BusinessUserMapDTO(Int32 businessUserMapID, Int32 businessID, Int32 userID, Boolean isOwner, Nullable<Int32> businessUserTypeID, BusinessDTO business, TypeCodeDTO typeCode, UserDTO user)
        {
			this.BusinessUserMapID = businessUserMapID;
			this.BusinessID = businessID;
			this.UserID = userID;
			this.IsOwner = isOwner;
			this.BusinessUserTypeID = businessUserTypeID;
			this.Business = business;
			this.TypeCode = typeCode;
			this.User = user;
        }
Exemplo n.º 9
0
        public UserDataModel CreateUser(UserDataModel oUserDataModel) {
            
            if (oUserDataModel != null) {
                UserDTO oUserDTO = new UserDTO();
                oUserDTO = UserDataModelAssembler.ToDTO(oUserDataModel);

                if (oUserDTO != null) {
                    oUsersBL.Create(oUserDTO);
                }
            }

            return oUserDataModel;
        }
Exemplo n.º 10
0
        public UserAccountDTO(Int32 userAccountID, Int32 userID, String userName, Byte[] password, Boolean isActive, Boolean isDeleted, Nullable<Int32> insuser, Nullable<DateTime> insdt, Nullable<Int32> upduser, Nullable<DateTime> upddt, UserDTO user)
        {
			this.UserAccountID = userAccountID;
			this.UserID = userID;
			this.UserName = userName;
			this.Password = password;
			this.IsActive = isActive;
			this.IsDeleted = isDeleted;
			this.insuser = insuser;
			this.insdt = insdt;
			this.upduser = upduser;
			this.upddt = upddt;
			this.User = user;
        }
Exemplo n.º 11
0
        /// <summary>
        /// Invoked when <see cref="ToDTO"/> operation is about to return.
        /// </summary>
        /// <param name="dto"><see cref="UserDTO"/> converted from <see cref="User"/>.</param>
        static partial void OnDTO(this User entity, UserDTO dto) {

            if (entity.UserAddresses != null && entity.UserAddresses.Count > 0)
            {
                dto.UserAddresses = UserAddressAssembler.ToDTOs(entity.UserAddresses);
            }

            if (entity.UserEmails != null && entity.UserEmails.Count > 0)
            {
                dto.UserEmails = UserEmailAssembler.ToDTOs(entity.UserEmails);
            }

            if (entity.UserPhones != null && entity.UserPhones.Count > 0)
            {
                dto.UserPhones = UserPhoneAssembler.ToDTOs(entity.UserPhones);
            }
        }
        public static UserDTO ToUserDTO(UserDataModel datamodel)
        {
            UserDTO dto = new UserDTO();
            if (datamodel != null)
            {
                dto.UserID = datamodel.UserID;
                dto.UserName = datamodel.UserName;
                dto.FirstName = datamodel.FirstName;
                dto.MiddleName = datamodel.MiddleName;
                dto.LastName = datamodel.LastName;
                dto.DOB = datamodel.DOB;
                dto.IsActive = datamodel.IsActive;
                dto.IsDeleted = datamodel.IsDeleted;
                dto.insuser = datamodel.insuser;
                dto.insdt = datamodel.insdt;
                dto.upduser = datamodel.upduser;
                dto.upddt = datamodel.upddt;
            }

            return dto;
        }
Exemplo n.º 13
0
        public UserDataModel CreateUser(UserDataModel userDataModel)
        {
            if (userDataModel != null)
            {
                UserDTO userDTO = new UserDTO();
                UserAccountDTO userAccountDTO = new UserAccountDTO();
                PhoneDTO oPhoneDTO = new PhoneDTO();
                EmailDTO oEmailDTO = new EmailDTO();
                AddressDTO oAddressDTO = new AddressDTO();

                userDTO = UserDataModelAssembler.ToUserDTO(userDataModel);
                userAccountDTO = UserDataModelAssembler.ToUserAccountDTO(userDataModel);
                oPhoneDTO = UserDataModelAssembler.ToPhoneDTO(userDataModel);
                oEmailDTO = UserDataModelAssembler.ToEmailDTO(userDataModel);
                oAddressDTO = UserDataModelAssembler.ToAddressDTO(userDataModel);

                if (userDTO != null)
                {
                    userDTO = usersBL.Create(userDTO);
                }
                if (userAccountDTO != null)
                {
                    userAccountDTO = AccountBL.Create(userAccountDTO);
                }
                if (oPhoneDTO != null)
                {
                    oPhoneDTO = oPhonesBL.Create(oPhoneDTO);
                }
                if (oEmailDTO != null)
                {
                    oEmailsBL.Create(oEmailDTO);
                }
                if (oAddressDTO != null)
                {
                    oAddressBL.Create(oAddressDTO);
                }
            }

            return userDataModel;
        }
Exemplo n.º 14
0
        public BusinessDTO(Int32 businessID, String name, String abbreviation, Nullable<DateTime> startDate, Int32 businessTypeID, Boolean isActive, Boolean isDeleted, Nullable<Int32> insuser, Nullable<DateTime> insdt, Nullable<Int32> upduser, Nullable<DateTime> upddt, TypeCodeDTO typeCode, UserDTO user, UserDTO user1, List<BusinessAddressDTO> businessAddresses, List<BusinessEmailDTO> businessEmails, List<BusinessPhoneDTO> businessPhones, List<BusinessUserMapDTO> businessUserMaps, List<JobDTO> jobs)
        {
			this.BusinessID = businessID;
			this.Name = name;
			this.Abbreviation = abbreviation;
			this.StartDate = startDate;
			this.BusinessTypeID = businessTypeID;
			this.IsActive = isActive;
			this.IsDeleted = isDeleted;
			this.insuser = insuser;
			this.insdt = insdt;
			this.upduser = upduser;
			this.upddt = upddt;
			this.TypeCode = typeCode;
			this.User = user;
			this.User1 = user1;
			this.BusinessAddresses = businessAddresses;
			this.BusinessEmails = businessEmails;
			this.BusinessPhones = businessPhones;
			this.BusinessUserMaps = businessUserMaps;
			this.Jobs = jobs;
        }
Exemplo n.º 15
0
        public UserDataModel GetUser(UserDTO userDTO)
        {
            UserDataModel userDataModel = null;
            if (userDTO != null)
            {
                UserAddressDTO userAddressDTO = (userDTO.UserAddresses != null) ? userDTO.UserAddresses.Where(o => o.IsPrimary).FirstOrDefault() : null;
                AddressDTO oPrimaryAddressDTO = (userAddressDTO != null) ? userAddressDTO.Address : null;

                UserAccountDTO userAccountDTO = (userDTO.UserAddresses != null) ? userDTO.UserAccounts.FirstOrDefault(o => o.IsActive == true) : null;

                UserPhoneDTO userPhoneDTO = (userDTO.UserPhones != null) ? userDTO.UserPhones.Where(o => o.IsPrimary).FirstOrDefault() : null;
                PhoneDTO oPrimaryPhoneDTO = (userPhoneDTO != null) ? userPhoneDTO.Phone : null;

                UserEmailDTO userEmailDTO = (userDTO.UserEmails != null) ? userDTO.UserEmails.Where(o => o.IsPrimary).FirstOrDefault() : null;
                EmailDTO oPrimaryEmailDTO = (userEmailDTO != null) ? userEmailDTO.Email : null;

                userDataModel = UserDataModelAssembler.ToDataModel(userDTO, userAccountDTO, oPrimaryAddressDTO, oPrimaryPhoneDTO, oPrimaryEmailDTO);
                userDataModel.UserAddressID = (userAddressDTO != null) ? userAddressDTO.UserAddressID : 0;
                userDataModel.UserPhoneID = (userPhoneDTO != null) ? userPhoneDTO.UserPhoneID : 0;
                userDataModel.UserEmailID = (userEmailDTO != null) ? userEmailDTO.UserEmailID : 0;
            }
            return userDataModel;
        }
Exemplo n.º 16
0
        /// <summary>
        /// Converts this instance of <see cref="User"/> to an instance of <see cref="UserDTO"/>.
        /// </summary>
        /// <param name="entity"><see cref="User"/> to convert.</param>
        public static UserDTO ToDTO(this User entity)
        {
            if (entity == null) return null;

            var dto = new UserDTO();

            dto.UserID = entity.UserID;
            dto.UserName = entity.UserName;
            dto.FirstName = entity.FirstName;
            dto.MiddleName = entity.MiddleName;
            dto.LastName = entity.LastName;
            dto.DOB = entity.DOB;
            dto.IsActive = entity.IsActive;
            dto.IsDeleted = entity.IsDeleted;
            dto.insuser = entity.insuser;
            dto.insdt = entity.insdt;
            dto.upduser = entity.upduser;
            dto.upddt = entity.upddt;

            entity.OnDTO(dto);

            return dto;
        }
Exemplo n.º 17
0
 public BusinessDTO(Int32 businessID, String name, String abbreviation, Nullable <DateTime> startDate, Int32 businessTypeID, Boolean isActive, Boolean isDeleted, Nullable <Int32> insuser, Nullable <DateTime> insdt, Nullable <Int32> upduser, Nullable <DateTime> upddt, TypeCodeDTO typeCode, UserDTO user, UserDTO user1, List <BusinessAddressDTO> businessAddresses, List <BusinessEmailDTO> businessEmails, List <BusinessPhoneDTO> businessPhones, List <BusinessUserMapDTO> businessUserMaps, List <JobDTO> jobs)
 {
     this.BusinessID        = businessID;
     this.Name              = name;
     this.Abbreviation      = abbreviation;
     this.StartDate         = startDate;
     this.BusinessTypeID    = businessTypeID;
     this.IsActive          = isActive;
     this.IsDeleted         = isDeleted;
     this.insuser           = insuser;
     this.insdt             = insdt;
     this.upduser           = upduser;
     this.upddt             = upddt;
     this.TypeCode          = typeCode;
     this.User              = user;
     this.User1             = user1;
     this.BusinessAddresses = businessAddresses;
     this.BusinessEmails    = businessEmails;
     this.BusinessPhones    = businessPhones;
     this.BusinessUserMaps  = businessUserMaps;
     this.Jobs              = jobs;
 }
Exemplo n.º 18
0
        public UserDTO Update(UserDTO oUserDTO)
        {
            UserDTO returnUser = null;
            if (oUserDTO != null && oUserDTO.UserID > 0)
            {
                oUsersRepo.UpdateUser(UserAssembler.ToEntity(oUserDTO));
                returnUser = oUserDTO;
            }

            return returnUser;
        }
Exemplo n.º 19
0
        public UserDTO(Int32 userID, String userName, String firstName, String middleName, String lastName, Nullable<DateTime> dOB, Boolean isActive, Boolean isDeleted, Nullable<Int32> insuser, Nullable<DateTime> insdt, Nullable<Int32> upduser, Nullable<DateTime> upddt, List<BusinessDTO> businesses, List<BusinessDTO> businesses1, List<BusinessUserMapDTO> businessUserMaps, List<JobApplicationDTO> jobApplications, List<UserAccountDTO> userAccounts, List<UserAddressDTO> userAddresses, List<UserEmailDTO> userEmails, List<UserPhoneDTO> userPhones, List<UserRoleDTO> userRoles, List<UserDTO> users1, UserDTO user1, List<UserDTO> users11, UserDTO user2)
        {
			this.UserID = userID;
			this.UserName = userName;
			this.FirstName = firstName;
			this.MiddleName = middleName;
			this.LastName = lastName;
			this.DOB = dOB;
			this.IsActive = isActive;
			this.IsDeleted = isDeleted;
			this.insuser = insuser;
			this.insdt = insdt;
			this.upduser = upduser;
			this.upddt = upddt;
			this.Businesses = businesses;
			this.Businesses1 = businesses1;
			this.BusinessUserMaps = businessUserMaps;
			this.JobApplications = jobApplications;
			this.UserAccounts = userAccounts;
			this.UserAddresses = userAddresses;
			this.UserEmails = userEmails;
			this.UserPhones = userPhones;
			this.UserRoles = userRoles;
			this.Users1 = users1;
			this.User1 = user1;
			this.Users11 = users11;
			this.User2 = user2;
        }
Exemplo n.º 20
0
        public static UserDataModel ToDataModel(UserDTO oUserDTO, AddressDTO oPrimaryAddressDTO, PhoneDTO oPrimaryPhoneDTO, EmailDTO oPrimaryEmailDTO) {

            UserDataModel oUserDataModel = null;

            if (oUserDTO != null)
            {
                oUserDataModel = new UserDataModel
                {
                    UserID = oUserDTO.UserID,
                    UserName = oUserDTO.UserName,
                    FirstName = oUserDTO.FirstName,
                    MiddleName = oUserDTO.MiddleName,
                    LastName = oUserDTO.LastName,
                    DOB = oUserDTO.DOB,
                    IsActive = oUserDTO.IsActive,
                    IsDeleted = oUserDTO.IsDeleted,
                    insuser = oUserDTO.insuser,
                    insdt = oUserDTO.insdt,
                    upduser = oUserDTO.upduser,
                    upddt = oUserDTO.upddt
                };

                if (oPrimaryAddressDTO != null)
                {
                    oUserDataModel.PrimayAddress_AddressID = oPrimaryAddressDTO.AddressID;
                    oUserDataModel.PrimaryAddressTitle = oPrimaryAddressDTO.Title;
                    oUserDataModel.PrimaryAddressLine1 = oPrimaryAddressDTO.Line1;
                    oUserDataModel.PrimaryAddressLine2 = oPrimaryAddressDTO.Line2;
                    oUserDataModel.PrimaryAddressLine3 = oPrimaryAddressDTO.Line3;
                    oUserDataModel.PrimaryAddressCity = oPrimaryAddressDTO.City;
                    oUserDataModel.PrimaryAddressState = oPrimaryAddressDTO.State;
                    oUserDataModel.PrimaryAddressZipCode = oPrimaryAddressDTO.ZipCode;
                    oUserDataModel.PrimaryAddressCountryID = oPrimaryAddressDTO.CountryID;
                    oUserDataModel.PrimaryAddressCountryName = oPrimaryAddressDTO.Country.Name;
                    oUserDataModel.PrimaryAddressCountryAbbreviation = oPrimaryAddressDTO.Country.Abbreviation;
                    oUserDataModel.PrimaryAddressCountryCode = oPrimaryAddressDTO.Country.Code;
                    oUserDataModel.PrimaryAddressCountryPhoneCode = oPrimaryAddressDTO.Country.PhoneCode;
                    
                    oUserDataModel.PrimaryAddressTypeID = oPrimaryAddressDTO.AddressTypeID;
                    oUserDataModel.PrimaryAddressTypeName = oPrimaryAddressDTO.TypeCode.Name;
                    oUserDataModel.PrimaryAddressTypeCode = oPrimaryAddressDTO.TypeCode.Code;
                    oUserDataModel.PrimaryAddressTypeDescription = oPrimaryAddressDTO.TypeCode.Description;
                    oUserDataModel.PrimaryAddressTypeClassTypeID = oPrimaryAddressDTO.TypeCode.ClassTypeID;

                }

                if (oPrimaryPhoneDTO != null)
                {
                    oUserDataModel.PrimaryPhone_PhoneID = oPrimaryPhoneDTO.PhoneID;
                    oUserDataModel.PrimaryPhoneNumber = oPrimaryPhoneDTO.Number;
                    oUserDataModel.PrimaryPhoneExt = oPrimaryPhoneDTO.Ext;

                    oUserDataModel.PrimaryPhoneTypeID = oPrimaryPhoneDTO.TypeCode.TypeCodeID;
                    oUserDataModel.PrimaryPhoneTypeName = oPrimaryPhoneDTO.TypeCode.Name;
                    oUserDataModel.PrimaryPhoneTypeCode = oPrimaryPhoneDTO.TypeCode.Code;
                    oUserDataModel.PrimaryPhoneTypeDescription = oPrimaryPhoneDTO.TypeCode.Description;
                    oUserDataModel.PrimaryPhoneTypeClassTypeID = oPrimaryPhoneDTO.TypeCode.ClassTypeID;

                }
                
                if (oPrimaryEmailDTO != null)
                {
                    oUserDataModel.PrimaryEmail_EmailID = oPrimaryEmailDTO.EmailID;
                    oUserDataModel.PrimaryEmailAddress = oPrimaryEmailDTO.Address;

                    oUserDataModel.PrimaryEmailTypeID = oPrimaryPhoneDTO.TypeCode.TypeCodeID;
                    oUserDataModel.PrimaryEmailTypeName = oPrimaryEmailDTO.TypeCode.Name;
                    oUserDataModel.PrimaryEmailTypeCode = oPrimaryEmailDTO.TypeCode.Code;
                    oUserDataModel.PrimaryEmailTypeDescription = oPrimaryEmailDTO.TypeCode.Description;
                    oUserDataModel.PrimaryEmailTypeClassTypeID = oPrimaryEmailDTO.TypeCode.ClassTypeID;

                }
            }

            return oUserDataModel;
        }
Exemplo n.º 21
0
 public UserRoleDTO(Int32 userRoleID, Int32 userID, Int32 roleID, RoleDTO role, UserDTO user)
 {
     this.UserRoleID = userRoleID;
     this.UserID     = userID;
     this.RoleID     = roleID;
     this.Role       = role;
     this.User       = user;
 }
Exemplo n.º 22
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="UserDTO"/> converted from <see cref="User"/>.</param>
 static partial void OnDTO(this User entity, UserDTO dto);
Exemplo n.º 23
0
 public UserEmailDTO(Int32 userEmailID, Int32 userID, Int32 emailID, Boolean isPrimary, EmailDTO email, UserDTO user)
 {
     this.UserEmailID = userEmailID;
     this.UserID      = userID;
     this.EmailID     = emailID;
     this.IsPrimary   = isPrimary;
     this.Email       = email;
     this.User        = user;
 }
        public static UserDataModel ToDataModel(UserDTO userDTO, UserAccountDTO accountDTO, AddressDTO addressDTO, PhoneDTO phoneDTO, EmailDTO emailDTO)
        {

            UserDataModel model = null;

            if (userDTO != null)
            {
                model = new UserDataModel
                {
                    UserID = userDTO.UserID,
                    UserName = userDTO.UserName,
                    FirstName = userDTO.FirstName,
                    MiddleName = userDTO.MiddleName,
                    LastName = userDTO.LastName,
                    DOB = userDTO.DOB,
                    IsActive = userDTO.IsActive,
                    IsDeleted = userDTO.IsDeleted,
                    insuser = userDTO.insuser,
                    insdt = userDTO.insdt,
                    upduser = userDTO.upduser,
                    upddt = userDTO.upddt
                };

                if (accountDTO != null)
                {
                    model.UserAccountID = accountDTO.UserAccountID;
                    model.UserAccountinsdt = accountDTO.insdt;
                    model.UserAccountinsuser = accountDTO.insuser;
                    model.UserAccountIsActive = accountDTO.IsActive;
                    model.UserAccountIsDeleted = accountDTO.IsDeleted;
                    model.UserAccountPassword = accountDTO.Password;
                    model.UserAccountupddt = accountDTO.upddt;
                    model.UserAccountupduser = accountDTO.upduser;
                    model.UserAccountUserName = accountDTO.UserName;
                }

                if (addressDTO != null)
                {
                    model.UserAddressAddressTypeID = addressDTO.AddressTypeID;
                    model.UserAddressCity = addressDTO.City;
                    model.UserAddressCountryID = addressDTO.CountryID;
                    model.UserAddressID = addressDTO.AddressID;
                    model.UserAddressLine1 = addressDTO.Line1;
                    model.UserAddressLine2 = addressDTO.Line2;
                    model.UserAddressLine3 = addressDTO.Line3;
                    model.UserAddressState = addressDTO.State;
                    model.UserAddressTitle = addressDTO.Title;
                    model.UserAddressZipCode = addressDTO.ZipCode;

                }

                if (phoneDTO != null)
                {
                    model.UserPhoneCountryID = phoneDTO.CountryID;
                    model.UserPhoneExt = phoneDTO.Ext;
                    model.UserPhoneID = phoneDTO.PhoneID;
                    model.UserPhoneNumber = phoneDTO.Number;
                    model.UserPhoneTypeID = phoneDTO.PhoneTypeID;
                }

                if (emailDTO != null)
                {
                    model.UserEmailAddress = emailDTO.Address;
                    model.UserEmailID = emailDTO.EmailID;
                    model.UserEmailTypeID = emailDTO.EmailTypeID;
                }
            }

            return model;
        }