public PersonalInformation UpdatePersonalInfo(PersonalInformationArg personalInfoArg, string personId, string userLoginId) { var personalInfo = SetPersonalInfo(personalInfoArg, personId, userLoginId); PersonalInformation().UpdateEntity(personalInfo); return(personalInfo); }
public PersonalInformation SetPersonalInfo(PersonalInformationArg personalInfoArg, string personId, string userLoginId) { var personalInfo = PersonalInformation().Find(t => t.PersonId == personId); if (personalInfo == null) { personalInfo = _mapper.Map <PersonalInformation>(personalInfoArg); personalInfo.UserLoginId = userLoginId; personalInfo.PersonId = personId; return(personalInfo); } personalInfo.FirstName = personalInfoArg.FirstName; personalInfo.FatherName = personalInfoArg.FatherName; personalInfo.LastName = personalInfoArg.LastName; personalInfo.DateOfBirth = personalInfoArg.DateOfBirth; personalInfo.Sex = personalInfoArg.Sex; personalInfo.MaritialStatusEnumId = personalInfoArg.MaritialStatusEnumId; personalInfo.UserLoginId = userLoginId; personalInfo.PersonId = personId; personalInfo.GeoId = personalInfoArg.GeoId; personalInfo.CityGeoId = personalInfoArg.CityGeoId; personalInfo.CountryGeoId = personalInfoArg.CountryGeoId; personalInfo.ExperienceEnumId = personalInfoArg.ExperienceEnumId; personalInfo.Description = personalInfoArg.Description; return(personalInfo); }
public PersonalInformation CreatePersonalInfo(PersonalInformationArg personalInfoArg, string userLoginId) { //var user = SetUser(Utility.RoleTypeModel, personalInfoArg.UserName, Utility.DefaultPassword, null, Utility.StatusDisabled, "Y"); ////CreateUser(user); //var personalInfo = SetPersonalInfo(personalInfoArg, user.PersonId, userLoginId); //PersonalInformation().Add(personalInfo); //return personalInfo; return(new PersonalInformation()); }
public User RegisterModel(PersonalInformationArg personInfoArg, PhysicalInformationArg physicalInfoArg) { var user = CreateUser( SetUser(Utility.RoleTypeModel, personInfoArg.UserName, Utility.DefaultPassword, personInfoArg.Email, Utility.StatusDisabled, "N", personInfoArg.PrimaryPhone, personInfoArg.TaxId), personInfoArg.UserName); PersonalInformation().Add(SetPersonalInfo(personInfoArg, user.PersonId, user.UserLoginId)); SetCreateUpdatePhysicalInformation(null, physicalInfoArg, user.PersonId, user.UserLoginId); SetUserAppl(personInfoArg.OfferTypeId, user.PersonId, user.UserLoginId); AddUserRole(user.PersonId, Utility.RoleTypeModel, user.UserLoginId); return(user); }
public User CreateAgent(PersonalInformationArg personInfoArg) { var user = CreateUser( SetUser(Utility.RoleTypeAgent, personInfoArg.UserName, Utility.DefaultPassword, personInfoArg.Email, Utility.StatusDisabled, "N", personInfoArg.PrimaryPhone, personInfoArg.TaxId), personInfoArg.UserName); PersonalInformation().Add(SetPersonalInfo(personInfoArg, user.PersonId, user.UserLoginId)); if (!string.IsNullOrEmpty(personInfoArg.OfferTypeId)) { SetUserAppl(personInfoArg.OfferTypeId, user.PersonId, user.UserLoginId); } AddUserRole(user.PersonId, Utility.RoleTypeAgent, user.UserLoginId); return(user); }
public CreateAgentCommand() { PersonalInformationArg = new PersonalInformationArg(); LogoImage = new ContentArg(); }