public ActionResult Edit(int id, FeeView feeView) { if (ModelState.IsValid) { _feeBusiness.Update(feeView); return RedirectToAction("Index"); } return View(); }
public void Delete(FeeView feeView) { using (var repo = new FeeRepository()) { var bo = new Fee(); bo = repo.GetById(feeView.FeeId); repo.Delete(bo); } }
public ActionResult Create(FeeView feeView) { if (ModelState.IsValid) { _feeBusiness.Insert(feeView); return RedirectToAction("Index"); } else { ModelState.AddModelError("", "Please Fill In Your Figuse Correctly"); } return View(feeView); }
public void Insert(FeeView feeView) { using (var repo = new FeeRepository()) { var op = new Fee(); { op.Price = feeView.Price; op.Vat = feeView.Vat; op.Description = feeView.Description; } repo.Insert(op); } }
public void Update(FeeView feeView) { using (var repo = new FeeRepository()) { var op = new Fee(); op = repo.GetById(feeView.FeeId); if (true) { op.Price = feeView.Price; op.Vat = feeView.Vat; op.Description = feeView.Description; } repo.Update(op); } }
public double CalTot() { double t = 0; using (var repo = new FeeRepository()) { FeeView feeView = new FeeView(); var op = new Fee(); op = repo.GetById(1); if (true) { t = (op.Price) + ((op.Price) * (op.Vat / 100)); } } return t; ; }