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

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