public ActionResult Edit(int id, Borrower borrower) { BorrowerControl borrowerControl = new BorrowerControl(); TryUpdateModel(borrower); if (ModelState.IsValid) { borrowerControl.paramQuery("edit_client", borrowerControl.paramEditClient(borrower, id)); return RedirectToAction("Index"); } return View(); }
public ActionResult Create([Bind(Exclude= "Status, ViolationCount" )]Borrower borrower) { TryUpdateModel(borrower); if (ModelState.IsValid) { BorrowerControl borrowerControl = new BorrowerControl(); borrowerControl.paramQuery("add_client", borrowerControl.paramAddClient(borrower)); return RedirectToAction("Index", "BorrowerAccount"); } return View(); }
// // GET: /BorrowerAccount/ public ActionResult Index() { BorrowerControl borrowerControl = new BorrowerControl(); List<Borrower> borrower = borrowerControl.getAllClient.ToList(); return View(borrower); }
public ActionResult Edit(int id) { BorrowerControl borrowerControl = new BorrowerControl(); Borrower borrower = borrowerControl.getAllClient.Single(b => b.ID == id); return View(borrower); }