public ActionResult DeleteConfirmed(int id) { General_Ledger general_Ledger = db.General_Ledger.Find(id); db.General_Ledger.Remove(general_Ledger); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "GL_ID,Ledger_Description,Debit,Credit,Balance,Date,Shop_name")] General_Ledger general_Ledger) { if (ModelState.IsValid) { db.Entry(general_Ledger).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Date = new SelectList(db.Date_Time, "Date_Time_ID", "Date_Time_ID", general_Ledger.Date); ViewBag.Shop_name = new SelectList(db.Shop_Details, "Shop_ID", "Shop_name", general_Ledger.Shop_name); return(View(general_Ledger)); }
// GET: General_Ledger/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } General_Ledger general_Ledger = db.General_Ledger.Find(id); if (general_Ledger == null) { return(HttpNotFound()); } return(View(general_Ledger)); }
// GET: General_Ledger/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } General_Ledger general_Ledger = db.General_Ledger.Find(id); if (general_Ledger == null) { return(HttpNotFound()); } ViewBag.Date = new SelectList(db.Date_Time, "Date_Time_ID", "Date_Time_ID", general_Ledger.Date); ViewBag.Shop_name = new SelectList(db.Shop_Details, "Shop_ID", "Shop_name", general_Ledger.Shop_name); return(View(general_Ledger)); }