public virtual void ProgramCategoryUpdate(ProgramCategory entity)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     m_DataContext.BeginNestedTran();
     try
     {
       int count;
       m_DataContext.ndihdProgramCategoryUpdate(entity.Id,
                                            entity.Name,
                                            entity.Description,
                                            entity.TypeOfEntity, 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 ProgramCategory ProgramCategorySelect(DBString IdVal)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     ProgramCategory result = null;
     DataSet entitySet = m_DataContext.ndihdProgramCategorySelect(IdVal);
     if (entitySet.Tables[0].Rows.Count != 0)
     {
       result = new ProgramCategory(entitySet);
     }
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
Example #3
0
 // -------------------------------------------------------------------------------------
 /// <summary>
 /// Copy constructor.
 /// </summary>
 /// <param name="IdVal">Value of 'cId' field</param>
 /// <param name="origInstance">Original document data to copy.</param>
 // -------------------------------------------------------------------------------------
 public ProgramCategory(DBString IdVal,
                    ProgramCategory origInstance)
     : base(IdVal, origInstance)
 {
 }
 public virtual void ProgramCategoryInsert(ProgramCategory entity)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     m_DataContext.BeginNestedTran();
     try
     {
       m_DataContext.ndihdProgramCategoryInsert(entity.Id,
                                            entity.Name,
                                            entity.Description,
                                            entity.TypeOfEntity);
       m_DataContext.CommitNested();
     }
     catch
     {
       m_DataContext.RollbackNested();
       throw;
     }
     TraceCallReturnEvent.Raise();
     return;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
Example #5
0
 // -------------------------------------------------------------------------------------
 /// <summary>
 /// Copy constructor.
 /// </summary>
 /// <param name="origInstance">Original document data to copy.</param>
 // -------------------------------------------------------------------------------------
 public ProgramCategory(ProgramCategory origInstance)
     : base(origInstance)
 {
 }