예제 #1
0
        public PersonalInformation UpdatePersonalInfo(PersonalInformationArg personalInfoArg, string personId, string userLoginId)
        {
            var personalInfo = SetPersonalInfo(personalInfoArg, personId, userLoginId);

            PersonalInformation().UpdateEntity(personalInfo);
            return(personalInfo);
        }
예제 #2
0
        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);
        }
예제 #3
0
 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());
 }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
 public CreateAgentCommand()
 {
     PersonalInformationArg = new PersonalInformationArg();
     LogoImage = new ContentArg();
 }