コード例 #1
0
ファイル: BArea.cs プロジェクト: huutruongqnvn/vnecoo01
 /// <summary>
 /// KhoaHT added 4/4/2008
 /// Add a new stattic method
 /// </summary>
 /// <returns></returns>
 public static DataSet RetrieveAll()
 {
     ConnectionFactory Connection = InternalGlobal.MakeConnectionFactory();
     PrArea area = new PrArea(Connection);
     try
     {
         Connection.Open();
         return area.Search();
     }
     catch (Exception exp)
     {
         throw exp;
     }
     finally
     {
         Connection.Close();
     }
 }
コード例 #2
0
ファイル: BArea.cs プロジェクト: huutruongqnvn/vnecoo01
 /// <summary>
 /// @author : TrungMT
 /// @CreateDate:04/03/2008
 /// @Description: Delete 1 area with area_id
 /// </summary>
 public int Delete(Area pArea)
 {
     PrArea area = new PrArea(Connection);
     int intRowAffected = 0;
     try
     {
         Open();
         intRowAffected = area.Delete(pArea);
         Commit();
     }
     catch (Exception exp)
     {
         Rollback();
         throw exp;
     }
     finally
     {
         Close();
     }
     return intRowAffected;
 }
コード例 #3
0
ファイル: BArea.cs プロジェクト: huutruongqnvn/vnecoo01
 /// <summary>
 /// @author : TrungMT
 /// @CreateDate:04/03/2008
 /// @Description: Insert 1 area and return area_id auto increment
 /// </summary>
 public int Add(Area pArea)
 {
     PrArea area = new PrArea(Connection);
     int intAreaID = -1;
     try
     {
         Open();
         intAreaID = area.Create(pArea);
         Commit();
     }
     catch (Exception exp)
     {
         Rollback();
         throw exp;
     }
     finally
     {
         Close();
     }
     return intAreaID;
 }
コード例 #4
0
ファイル: BArea.cs プロジェクト: huutruongqnvn/vnecoo01
 /// <summary>
 /// @author : TrungMT
 /// @CreateDate:04/03/2008
 /// @Description: Retrieves all area
 /// </summary>
 public DataSet Retrieves(Area pArea)
 {
     PrArea area = new PrArea(Connection);
     try
     {
         Open();
         return area.Search(pArea);
     }
     catch (Exception exp)
     {
         throw exp;
     }
     finally
     {
         Close();
     }
 }