Exemplo n.º 1
0
        public ActionResult Create(GeneralLedger generalledger)
        {
            if (ModelState.IsValid)
            {
                db.GeneralLedgers.Add(generalledger);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.IdChartOfAccount = new SelectList(db.ChartOfAccounts, "IdChartOfAccount", "NumChartOfAccount", generalledger.IdChartOfAccount);
            return View(generalledger);
        }
Exemplo n.º 2
0
 public ActionResult Edit(GeneralLedger generalledger)
 {
     if (ModelState.IsValid)
     {
         db.Entry(generalledger).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.IdChartOfAccount = new SelectList(db.ChartOfAccounts, "IdChartOfAccount", "NumChartOfAccount", generalledger.IdChartOfAccount);
     return View(generalledger);
 }