Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 public ActionResult RequestAQuote(string id = "0")
 {
     var model = new RequestQuoteModel
                     {
                         ProductId = id,
                         AllProducts = _productService.GetAllProductsSelectList(id, GlobalHelper.SelectListDefaultOption)
                     };
     return View(model);
 }