Esempio n. 1
0
 public ActionResult Edit([Bind(Include = "QuoteID,Distance,FuelPrice,Markup,VAT,Final,QuoteRequestNo")] Expense expense)
 {
     if (ModelState.IsValid)
     {
         expense.VAT             = expense.CalcVAT();
         expense.Final           = expense.CalcCost();
         db.Entry(expense).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.QuoteRequestNo = new SelectList(db.rfq, "QuoteRequestNo", "Email", expense.QuoteRequestNo);
     return(View(expense));
 }