public ActionResult SaveQuoteRequest(int nServiceId, GetQuoteInfo viewModel, FormCollection fCollection) { String strActionName = String.Empty; String strControllerName = String.Empty; if (ModelState.IsValid) { viewModel.ServiceId = nServiceId; ServiceInteractiveController controller = new ServiceInteractiveController(); bool bRtnval = controller.SetCustomerRequestInfo(viewModel); if (!bRtnval) { strActionName = "Index"; strControllerName = "Error"; } else { strActionName = "Electrician"; strControllerName = "EnterData"; bIsSaveRequestSuccessful = true; } } else { strControllerName = "Electrician"; strActionName = "EnterData"; } return(RedirectToAction(strActionName, strControllerName)); }
public ActionResult SaveQuoteRequest(int nServiceId, GetQuoteInfo viewModel, FormCollection fCollection) { if (ModelState.IsValid) { viewModel.AdditionalInfo = !String.IsNullOrEmpty(viewModel.AdditionalInfo) ? String.Format("{0},{1}", viewModel.AdditionalInfo, fCollection["ddnNumberOfBedRooms"]) : fCollection["ddnNumberOfBedRooms"]; viewModel.ServiceId = nServiceId; ServiceInteractiveController controller = new ServiceInteractiveController(); controller.SetCustomerRequestInfo(viewModel); } return(View()); }