public override bool Delete(params object[] keys) { try { this.ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted); this.ContentManagerConnection.StartTransaction(IsolationLevel.ReadUncommitted); var congressMenuBo = new MenuBO(); var obj = congressMenuBo.Get(this.ConnectionHandler, keys); if (!congressMenuBo.Delete(this.ConnectionHandler, keys)) { throw new Exception("خطایی در حذف منو وجود دارد"); } if (!ContentManagerComponent.Instance.MenuTransactionalFacade(this.ContentManagerConnection).Delete(obj.MenuId)) { throw new Exception("خطایی در حذف منو وجود دارد"); } this.ConnectionHandler.CommitTransaction(); this.ContentManagerConnection.CommitTransaction(); return(true); } catch (KnownException knownException) { this.ConnectionHandler.RollBack(); this.ContentManagerConnection.RollBack(); throw new KnownException(knownException.Message, knownException); } catch (Exception ex) { this.ConnectionHandler.RollBack(); this.ContentManagerConnection.RollBack(); throw new KnownException(ex.Message, ex); } }
public ActionResult Edit(int id) { return(View(MenuBO.Get(id))); }