public JsonResult GetPersonalInfo() { ProfileInformation PI = ProfileInformation.PI(); var viewModel = new ProfileInformationViewModel() { FirstName = PI.FirstName, LastName = PI.LastName, Bio = PI.Bio, PreviousOccupation = PI.PreviousOccupation, MaritalStatus = PI.MaritalStatus, Location = PI.Location, Education = PI.Education, CurrentOccupation = PI.CurrentOccupation, Email = PI.Email, DoB = PI.DateOfBirth }; return(Json(viewModel, JsonRequestBehavior.AllowGet)); }
public ActionResult Index() { ProfileInformation PI = ProfileInformation.PI(); var dateofbirth = Convert.ToDateTime(PI.DateOfBirth); string date = ""; Date(ref date, dateofbirth); var viewModel = new ProfileInformationViewModel() { FirstName = PI.FirstName, LastName = PI.LastName, Bio = PI.Bio, PreviousOccupation = PI.PreviousOccupation, MaritalStatus = PI.MaritalStatus, Location = PI.Location, Education = PI.Education, CurrentOccupation = PI.CurrentOccupation, Email = PI.Email, DoB = date }; return(View(viewModel)); }
public ActionResult Index(string FirstName, string LastName, string Email, string MaritalStatus, string CurrentOccupation, string PrevOccupation, string Education, DateTime dateofbirth, string bio, string country, string city) { string date = ""; Date(ref date, dateofbirth); ProfileInformation PI = ProfileInformation.PI(); var viewModel = new ProfileInformationViewModel() { Bio = bio, Email = Email, MaritalStatus = MaritalStatus, CurrentOccupation = CurrentOccupation, Education = Education, FirstName = FirstName, LastName = LastName, Location = country + " " + city, PreviousOccupation = PrevOccupation, DoB = date }; return(View(viewModel)); }