public ActionResult DeleteConfirmed(int id) { DebtorTransactionFile debtorTransactionFile = db.DebtorTransactionFiles.Find(id); db.DebtorTransactionFiles.Remove(debtorTransactionFile); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "DbTransactionId,DocumentNo,AccountCode,Date,TransactionType,GrossTransactionValue,VatValue")] DebtorTransactionFile debtorTransactionFile) { if (ModelState.IsValid) { db.Entry(debtorTransactionFile).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AccountCode = new SelectList(db.DebtorsMasters, "DebtorId", "Address1", debtorTransactionFile.AccountCode); return(View(debtorTransactionFile)); }
// GET: DebtorTransactionFiles/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DebtorTransactionFile debtorTransactionFile = db.DebtorTransactionFiles.Find(id); if (debtorTransactionFile == null) { return(HttpNotFound()); } return(View(debtorTransactionFile)); }
// GET: DebtorTransactionFiles/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } DebtorTransactionFile debtorTransactionFile = db.DebtorTransactionFiles.Find(id); if (debtorTransactionFile == null) { return(HttpNotFound()); } ViewBag.AccountCode = new SelectList(db.DebtorsMasters, "DebtorId", "Address1", debtorTransactionFile.AccountCode); return(View(debtorTransactionFile)); }