public JsonResult JobForm(JobFormModel jobForm) { var response = new JobFormResponse {Status = JobFormResponse.ResponseStatus.Failure}; var js = new JavaScriptSerializer(); if (ModelState.IsValid) { try { // Send a request to: http://vermillion.howard.fusionroomdev.com/api/vermillion //<VermillionForm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/VermillionWebService.Models"> //<About>About</About> //<Email>[email protected]</Email> //<Id>0</Id> //<Name>Your Name Here</Name> //<PhoneNumber>Your Phone Number</PhoneNumber> //<Resident>Resident</Resident> //<Selection>Selection</Selection> //<upload i:nil="true"/> //</VermillionForm> } catch (Exception ex) { response.ErrorMessage = ex.Message; } } else { response.ErrorMessage = "The request contains invlaid data."; } return Json(js.Serialize(response)); }
public void InitHomeViewModel() { nav = new PageNavViewModel(); homeImages = new HomeImageViewModel(); homeLinks = new HomeLinkViewModel(); menu = new MenuViewModel(); locations = new LocationViewModel(); jobs = new JobsViewModel(); footer = new FooterViewModel(); form = new JobFormModel(); }