// GET: Guarantor/Delete/5 public ActionResult DeleteExceptionalAmount(Nullable <int> id, int ProductId) { ViewBag.ModuleName = moduleName; ViewBag.Title = delete; ViewBag.Delete = delete; ViewBag.Yes = yes; ViewBag.No = no; ViewBag.ConfirmDelete = confirmDelete; ViewBag.Action = delete; if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Db db = new Db(DbServices.ConnectionString); ExceptionalAmount expAmount = ExceptionalAmountServices.Get(id.Value, db); if (expAmount == null) { return(HttpNotFound()); } ViewBag.ProductId = ProductId; return(PartialView(expAmount)); }
// GET: ExceptionalAmount/Delete/5 public ActionResult Delete(Nullable <int> id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Db db = new Db(DbServices.ConnectionString); ExceptionalAmount exceptionalAmount = ExceptionalAmountServices.Get(id.Value, db); if (exceptionalAmount == null) { return(HttpNotFound()); } return(View(exceptionalAmount)); }
// GET: ExceptionalAmount/Edit/5 public ActionResult Edit(Nullable <int> id) { Db db = new Db(DbServices.ConnectionString); if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ExceptionalAmount exceptionalAmount = ExceptionalAmountServices.Get(id.Value, db); if (exceptionalAmount == null) { return(HttpNotFound()); } ViewBag.ExceptionalAmountTypeList = new SelectList(ExceptionalAmountTypeServices.List(db), "Id", "Name", exceptionalAmount.ExceptionalAmountType); ViewBag.LoanRequestList = new SelectList(LoanRequestServices.List(db), "Request", "Name", exceptionalAmount.LoanRequest); return(View(exceptionalAmount)); }
public ActionResult editExceptionalAmount(int?id) { ViewBag.ModuleName = moduleName; ViewBag.Action = update; ViewBag.Update = update; ViewBag.Save = save; ViewBag.Back = back; Db db = new Db(DbServices.ConnectionString); if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ExceptionalAmount exceptionalAmount = ExceptionalAmountServices.Get(id.Value, db); if (exceptionalAmount == null) { return(HttpNotFound()); } ViewBag.ExceptionalAmountTypeList = new SelectList(ExceptionalAmountTypeServices.List(db), "Id", "Name", exceptionalAmount.ExceptionalAmountType); return(PartialView(exceptionalAmount)); }