Example #1
0
        public ActionResult Create(ChartOfAccount chartOfAccount)
        {
            if (ModelState.IsValid)
            {
                _repo.Add(chartOfAccount);
                return RedirectToAction("Index");
            }

            return View(chartOfAccount);
        }
Example #2
0
 public void Update(ChartOfAccount chartOfAccount)
 {
     _db.Entry(chartOfAccount).State = EntityState.Modified;
     _db.SaveChanges();
 }
Example #3
0
 public void Remove(ChartOfAccount chartOfAccount)
 {
     _db.ChartOfAccounts.Remove(chartOfAccount);
     _db.SaveChanges();
 }
Example #4
0
 public void Add(ChartOfAccount chartOfAccount)
 {
     _db.ChartOfAccounts.Add(chartOfAccount);
     _db.SaveChanges();
 }
Example #5
0
 public ActionResult Edit(ChartOfAccount chartofaccount)
 {
     if (ModelState.IsValid)
     {
         _repo.Update(chartofaccount);
         return RedirectToAction("Index");
     }
     return View(chartofaccount);
 }