public virtual void DictionaryAssocDelete(DictionaryAssoc entity)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     m_DataContext.BeginNestedTran();
     try
     {
       m_DataContext.ndihdDictionaryAssocDelete(entity.WordID,
                                            entity.RefWordId);
       m_DataContext.CommitNested();
     }
     catch
     {
       m_DataContext.RollbackNested();
       throw;
     }
     TraceCallReturnEvent.Raise();
     return;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
        public new void DictionaryAssocDelete(DictionaryAssoc entity)
        {
            //check permission: Admin
              PrincipalPermission permAdm = new PrincipalPermission(Thread.CurrentPrincipal.Identity.Name, "Administrator");
              permAdm.Demand();

              TraceCallEnterEvent.Raise();
              try
              {
            base.DictionaryAssocDelete(entity);

            BusinessAuditEvent.Success(
              new EventParameter("DictionaryAssocID", entity.WordID)
              );
            TraceCallReturnEvent.Raise();
            return;
              }
              catch (Exception ex)
              {
            ExceptionManager.Publish(ex);
            BusinessAuditEvent.Fail(
              new EventParameter("Exception", ex.ToString()),
              new EventParameter("DictionaryAssocID", entity.WordID));
            TraceCallReturnEvent.Raise(false);
            throw;
              }
        }
Exemplo n.º 3
0
 // -------------------------------------------------------------------------------------
 /// <summary>
 /// Copy constructor.
 /// </summary>
 /// <param name="origInstance">Original document data to copy.</param>
 // -------------------------------------------------------------------------------------
 public DictionaryAssoc(DictionaryAssoc origInstance)
     : base(origInstance)
 {
 }
 public virtual DictionaryAssoc DictionaryAssocSelect(DBGuid WordIDVal,
                                                  DBGuid RefWordIdVal)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     DictionaryAssoc result = null;
     DataSet entitySet = m_DataContext.ndihdDictionaryAssocSelect(WordIDVal,
                                                              RefWordIdVal);
     if (entitySet.Tables[0].Rows.Count != 0)
     {
       result = new DictionaryAssoc(entitySet);
     }
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }