コード例 #1
0
 public ActionResult ContactInformation()
 {
     if (Session["UserId"] != null)
     {
         UserDetailsDTO     Userdata = UserService.GetUserContactInformation(Convert.ToInt32(Session["UserId"].ToString()));
         ContactInformation Info     = new ContactInformation()
         {
             PresentAddress      = Userdata.PermanentAddress,
             PermanentAddress    = Userdata.Address,
             Countrys            = GenericMethodsservices.GetAllCountries(),
             CountryId           = Userdata.CountryId.Value,
             PermanentCountryid  = Userdata.PermanentCountryId.Value,
             Mobile              = Userdata.PhoneNumber,
             StateId             = Convert.ToInt32(Userdata.StateId),
             PermanentStateId    = Convert.ToInt32(Userdata.StateId),
             Districtid          = Userdata.PresentDistid.Value,
             PermenantDistrictId = Userdata.Permanentdistid,
             AlternateEmail      = Userdata.AlternateEmailId,
             AlternameMobile     = Userdata.HomePhoneNumber,
             cityName            = Userdata.PresentCity,
             AlternatecityName   = Userdata.PermanentCity
         };
         return(View(Info));
     }
     return(RedirectToAction("Login", "Account"));
 }
コード例 #2
0
ファイル: AccountController.cs プロジェクト: Zoninn/Alumni
        public ActionResult ContactInformation()
        {
            ContactInformation Info = new Models.ContactInformation()
            {
                Countrys = GenericMethodsservices.GetAllCountries(),
            };

            return(View(Info));
        }
コード例 #3
0
ファイル: AccountController.cs プロジェクト: Zoninn/Alumni
        public ActionResult ContactInformation(ContactInformation ContactHostelsInfoDTO)
        {
            if (Session["UserId"] != null)
            {
                UserDetail userDetails = new UserDetail()
                {
                    Id = Convert.ToInt32(Session["UserId"].ToString()),
                    AlternateEmailId = ContactHostelsInfoDTO.AlternateEmail,
                    PhoneNumber      = ContactHostelsInfoDTO.Mobile,
                    PermanentAddress = ContactHostelsInfoDTO.PermanentAddress,
                    //HomeCityId = ContactHostelsInfoDTO.CityId,
                    //LivesInCityId = ContactHostelsInfoDTO.PermanentCityId,
                    PermanentCity   = ContactHostelsInfoDTO.AlternatecityName,
                    PresentCity     = ContactHostelsInfoDTO.cityName,
                    PermanentDistid = ContactHostelsInfoDTO.Districtid,
                    PresentDistid   = ContactHostelsInfoDTO.PermenantDistrictId,
                    Address         = ContactHostelsInfoDTO.PresentAddress,

                    //  CountryCode = ContactHostelsInfoDTO.CountryCodes,
                    HomePhoneNumber       = ContactHostelsInfoDTO.AlternameMobile,
                    ProfileInfoPercentage = (int)CustomStatus.ProfileInfoPercentage.ContactInformation,
                };
                UserService.UpdateContactInfo(userDetails);
                return(RedirectToAction("ProfessionalDetails"));
            }
            else
            {
                return(RedirectToAction("Login"));
            }

            ContactInformation Info = new Models.ContactInformation()
            {
                Countrys = GenericMethodsservices.GetAllCountries(),
                //States = StatecitydistrictService.GetAllStates()
            };

            return(View(Info));
        }