Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Journal_Voucher journal_Voucher = db.Journal_Voucher.Find(id);

            db.Journal_Voucher.Remove(journal_Voucher);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Journal_ID,Date,Shop_Name,Particular,Account,Ledger_Folio,Debit,Credit")] Journal_Voucher journal_Voucher)
 {
     if (ModelState.IsValid)
     {
         db.Entry(journal_Voucher).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Account   = new SelectList(db.Accounts, "Account_ID", "Account_Name", journal_Voucher.Account);
     ViewBag.Date      = new SelectList(db.Date_Time, "Date_Time_ID", "Date_Time_ID", journal_Voucher.Date);
     ViewBag.Shop_Name = new SelectList(db.Shop_Details, "Shop_ID", "Shop_name", journal_Voucher.Shop_Name);
     return(View(journal_Voucher));
 }
Exemplo n.º 3
0
        // GET: Journal_Voucher/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Journal_Voucher journal_Voucher = db.Journal_Voucher.Find(id);

            if (journal_Voucher == null)
            {
                return(HttpNotFound());
            }
            return(View(journal_Voucher));
        }
Exemplo n.º 4
0
        // GET: Journal_Voucher/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Journal_Voucher journal_Voucher = db.Journal_Voucher.Find(id);

            if (journal_Voucher == null)
            {
                return(HttpNotFound());
            }
            ViewBag.Account   = new SelectList(db.Accounts, "Account_ID", "Account_Name", journal_Voucher.Account);
            ViewBag.Date      = new SelectList(db.Date_Time, "Date_Time_ID", "Date_Time_ID", journal_Voucher.Date);
            ViewBag.Shop_Name = new SelectList(db.Shop_Details, "Shop_ID", "Shop_name", journal_Voucher.Shop_Name);
            return(View(journal_Voucher));
        }