Ejemplo n.º 1
0
 // -------------------------------------------------------------------------------------
 /// <summary>
 /// Copy constructor.
 /// </summary>
 /// <param name="DistrictSearchCodeVal">Value of 'nDistrictSearchCode' field</param>
 /// <param name="origInstance">Original document data to copy.</param>
 // -------------------------------------------------------------------------------------
 public DistrictSearch(DBInt DistrictSearchCodeVal,
                   DistrictSearch origInstance)
     : base(DistrictSearchCodeVal, origInstance)
 {
 }
Ejemplo n.º 2
0
 // -------------------------------------------------------------------------------------
 /// <summary>
 /// Copy constructor.
 /// </summary>
 /// <param name="origInstance">Original document data to copy.</param>
 // -------------------------------------------------------------------------------------
 public DistrictSearch(DistrictSearch origInstance)
     : base(origInstance)
 {
 }
 public virtual DistrictSearch DistrictSearchSelect(DBInt DistrictSearchCodeVal)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     DistrictSearch result = null;
     DataSet entitySet = m_DataContext.ndihdDistrictSearchSelect(DistrictSearchCodeVal);
     if (entitySet.Tables[0].Rows.Count != 0)
     {
       result = new DistrictSearch(entitySet);
     }
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
 public virtual void DistrictSearchUpdate(DistrictSearch entity)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     m_DataContext.BeginNestedTran();
     try
     {
       int count;
       m_DataContext.ndihdDistrictSearchUpdate(entity.DistrictSearchCode,
                                           entity.DistrictDescription, 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 void DistrictSearchInsert(DistrictSearch entity)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     m_DataContext.BeginNestedTran();
     try
     {
       m_DataContext.ndihdDistrictSearchInsert(entity.DistrictSearchCode,
                                           entity.DistrictDescription);
       m_DataContext.CommitNested();
     }
     catch
     {
       m_DataContext.RollbackNested();
       throw;
     }
     TraceCallReturnEvent.Raise();
     return;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }