public EDocumentCategoryDispsetContainer EDocumentCategorySelectDispsetByType(string type)
 {
     //check permission: Admin
       PrincipalPermission permAdm = new PrincipalPermission(Thread.CurrentPrincipal.Identity.Name, "Administrator");
       permAdm.Demand();
       //check permission: Admin
       TraceCallEnterEvent.Raise();
       try
       {
     EDocumentCategoryDispsetContainer result;
     DataSet entitySet = m_DataContext.ndihdEDocumentCategorySelectDispsetByType(type);
     result = new EDocumentCategoryDispsetContainer(entitySet.Tables[0]);
     TraceCallReturnEvent.Raise();
     BusinessAuditEvent.Success();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     BusinessAuditEvent.Fail();
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
 public virtual EDocumentCategoryDispsetContainer EDocumentCategorySelectDispsetAll()
 {
     TraceCallEnterEvent.Raise();
       try
       {
     EDocumentCategoryDispsetContainer result;
     DataSet entitySet = m_DataContext.ndihdEDocumentCategorySelectDispsetAll();
     result = new EDocumentCategoryDispsetContainer(entitySet.Tables[0]);
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }