Esempio n. 1
0
 public override bool Delete(params object[] keys)
 {
     try
     {
         this.ConnectionHandler.StartTransaction(IsolationLevel.ReadUncommitted);
         this.ContentManagerConnection.StartTransaction(IsolationLevel.ReadUncommitted);
         var congressHtmlBO = new CongressHtmlBO();
         var obj            = congressHtmlBO.Get(this.ConnectionHandler, keys);
         if (!congressHtmlBO.Delete(this.ConnectionHandler, keys))
         {
             throw new Exception("خطایی در حذف Html همایش وجود دارد");
         }
         if (
             !ContentManagerComponent.Instance.HtmlDesginTransactinalFacade(this.ContentManagerConnection)
             .Delete(obj.HtmlDesginId))
         {
             throw new Exception("خطایی در حذف Html وجود دارد");
         }
         this.ConnectionHandler.CommitTransaction();
         this.ContentManagerConnection.CommitTransaction();
         return(true);
     }
     catch (KnownException ex)
     {
         this.ConnectionHandler.RollBack();
         this.ContentManagerConnection.RollBack();
         Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
         throw new KnownException(ex.Message, ex);
     }
     catch (Exception ex)
     {
         this.ConnectionHandler.RollBack();
         this.ContentManagerConnection.RollBack();
         Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
         throw new KnownException(ex.Message, ex);
     }
 }