public ActionResult RequestAQuote(RequestQuoteModel model) { if (ModelState.IsValid) { try { var entity = model.ToEntity(); _requestAQuoteService.Add(entity); model.AllProducts = _productService.GetAllProductsSelectList(model.ProductId, GlobalHelper.SelectListDefaultOption); this.SuccessNotification("We have receieved your request. We will respond withing 24-48 hours."); } catch (Exception) { this.ErrorNotification("An error has occurred while submitting your request. Please check your form fields and submit again."); } } return View(model); }
public ActionResult RequestAQuote(string id = "0") { var model = new RequestQuoteModel { ProductId = id, AllProducts = _productService.GetAllProductsSelectList(id, GlobalHelper.SelectListDefaultOption) }; return View(model); }