public ActionResult DeleteAbOrder(int id) { AbonOrder ord = _abonOrderService.GetOne(id); _abonOrderService.Delete(ord); return(RedirectToAction("Admin")); }
public void Update(AbonOrder abonOrder) { try { using (ISession session = NHibernateHelper.OpenSession()) { using (ITransaction transaction = session.BeginTransaction()) { session.SaveOrUpdate(abonOrder); transaction.Commit(); } } } catch (Exception ex) { throw ex; } }
public AbonOrder GetOne(int id) { try { using (ISession session = NHibernateHelper.OpenSession()) { using (ITransaction transaction = session.BeginTransaction()) { AbonOrder result = session.Get <AbonOrder>(id); transaction.Commit(); return(result); } } } catch (Exception ex) { throw ex; } }
public ActionResult Send(AbonOrder abonOrder) { _ordersServ.Save(abonOrder); return(View("Index")); }
public void Update(AbonOrder abonOrder) { Database.Update(abonOrder); }
public void Delete(AbonOrder abonOrder) { Database.Delete(abonOrder); }
public void Save(AbonOrder abonOrder) { Database.Save(abonOrder); }