예제 #1
0
        //[Authorize(Roles = "Candidate")]
        public ActionResult AddressDetails(string AddressType, string AddressLine1, string AddressLine2, string CityId, string StateId, string PostalCode, string CountryId)
        {
            string UserId = User.Identity.GetUserId();
            int    cityId = 0, stateId = 0, countryId = 0;

            if (!string.IsNullOrEmpty(CityId))
            {
                cityId = Convert.ToInt32(CityId);
            }
            if (!string.IsNullOrEmpty(StateId))
            {
                stateId = Convert.ToInt32(StateId);
            }
            if (!string.IsNullOrEmpty(CountryId))
            {
                countryId = Convert.ToInt32(CountryId);
            }

            student.AddAddressDetails(UserId, AddressType, AddressLine1, AddressLine2, cityId, stateId, PostalCode, countryId);

            return(RedirectToAction("AddressDetails", "Candidate", new { area = "Candidate" }));
        }