public virtual void EDocumentPublisherDelete(EDocumentPublisher entity)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     m_DataContext.BeginNestedTran();
     try
     {
       m_DataContext.ndihdEDocumentPublisherDelete(entity.ID);
       m_DataContext.CommitNested();
     }
     catch
     {
       m_DataContext.RollbackNested();
       throw;
     }
     TraceCallReturnEvent.Raise();
     return;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
 public virtual void EDocumentPublisherUpdate(EDocumentPublisher entity)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     m_DataContext.BeginNestedTran();
     try
     {
       int count;
       m_DataContext.ndihdEDocumentPublisherUpdate(entity.ID,
                                               entity.EDocumentRef,
                                               entity.Name,
                                               entity.Year,
                                               entity.Contact,
                                               entity.Link,
                                               entity.CreatedDate, out count);
       if (count == 0) throw new ServiceUpdateException();
       m_DataContext.CommitNested();
     }
     catch
     {
       m_DataContext.RollbackNested();
       throw;
     }
     TraceCallReturnEvent.Raise();
     return;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
 public virtual EDocumentPublisher EDocumentPublisherSelect(DBGuid IDVal)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     EDocumentPublisher result = null;
     DataSet entitySet = m_DataContext.ndihdEDocumentPublisherSelect(IDVal);
     if (entitySet.Tables[0].Rows.Count != 0)
     {
       result = new EDocumentPublisher(entitySet);
     }
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
 public virtual void EDocumentPublisherInsert(EDocumentPublisher entity)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     m_DataContext.BeginNestedTran();
     try
     {
       m_DataContext.ndihdEDocumentPublisherInsert(entity.ID,
                                               entity.EDocumentRef,
                                               entity.Name,
                                               entity.Year,
                                               entity.Contact,
                                               entity.Link,
                                               entity.CreatedDate);
       m_DataContext.CommitNested();
     }
     catch
     {
       m_DataContext.RollbackNested();
       throw;
     }
     TraceCallReturnEvent.Raise();
     return;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
 // -------------------------------------------------------------------------------------
 /// <summary>
 /// Copy constructor.
 /// </summary>
 /// <param name="IDVal">Value of 'uID' field</param>
 /// <param name="origInstance">Original document data to copy.</param>
 // -------------------------------------------------------------------------------------
 public EDocumentPublisher(DBGuid IDVal,
                       EDocumentPublisher origInstance)
     : base(IDVal, origInstance)
 {
 }
 // -------------------------------------------------------------------------------------
 /// <summary>
 /// Copy constructor.
 /// </summary>
 /// <param name="origInstance">Original document data to copy.</param>
 // -------------------------------------------------------------------------------------
 public EDocumentPublisher(EDocumentPublisher origInstance)
     : base(origInstance)
 {
 }
        private EDocumentPublisher GetPublisher()
        {
            EDocumentPublisher result = null;
              if (m_type.Equals(EDocumentTypeEnum.PUB))
              {
            if (m_currentDocument.EDocumentPublishers == null)
            {
              m_currentDocument.EDocumentPublishers = new EDocumentPublisherContainer();
            }
            EDocumentPublisher publisher;
            //akar kiadót menteni
            if (txtPublisherName.Text.Length > 0)
            {
              // nincs hozzá kiadó rögzítve, de most akar
              if (m_currentDocument.EDocumentPublishers.All.Count == 0)
              {
            DBGuid publisherID = new DBGuid(Guid.NewGuid());
            publisher = new EDocumentPublisher(publisherID);
              }
              else //csak módosulás
              {
            publisher = (EDocumentPublisher) m_currentDocument.EDocumentPublishers.All[0];
              }
              publisher.Name = txtPublisherName.Text;
              publisher.Contact = txtPublisherContact.Text;
              publisher.Link = txtPublisherLink.Text;
             // publisher.Year = dtpPublishYear.Value.Year;
              publisher.Year = dateTimePicker1.Value.Year;
              publisher.EDocumentRef = m_currentDocument.ID;

              result = publisher;
            }
              }
              return result;
        }