예제 #1
0
 public JsonResult Update(Quotation quo)
 {
     try
     {
         _quotationService.Update(quo);
         return(Json(new { success = true, message = "Update Successfully" }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(new { success = false, message = ex.ToString() }, JsonRequestBehavior.AllowGet));
     }
 }
예제 #2
0
 public ActionResult Edit(QuotationViewModel quotation)
 {
     if (ModelState.IsValid)
     {
         var entity = Mapper.Map <Quotation>(quotation);
         quotationService.Update(entity);
         return(RedirectToAction("Index"));
     }
     ViewBag.CustomerId = new SelectList(customerService.GetAll(), "Id", "FullName");
     ViewBag.ProductId  = new SelectList(productService.GetAll(), "Id", "Name");
     ViewBag.TaxId      = new SelectList(taxService.GetAll(), "Id", "Name");
     return(View(quotation));
 }
예제 #3
0
        public ActionResult Edit(int id, Quotation item)
        {
            try
            {
                // TODO: Add update logic here
                Quotation AVM = new Quotation();
                AVM.Id = item.Id;
                AVM.Date_expiration = item.Date_expiration;
                AVM.QuoteNo         = item.QuoteNo;
                AVM.Total           = item.Total;
                AVM.TVA             = item.TVA;

                QuotationService.Update(AVM);
                QuotationService.Commit();

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
 public IActionResult Update()
 {
     QuotationService.Update();
     return(RedirectPermanent("Index"));
 }