Example #1
0
 /// <summary>
 /// @author : TrungMT
 /// @CreateDate:04/07/2008
 /// @Description: retrieve 1 AdvProperties with Properties_Code
 /// </summary>
 /// <param name="pstrPropertiesCode">string</param>
 public DataSet Retrieves(string pstrPropertiesCode)
 {
     PrAdvProperties AdvProperties = new PrAdvProperties(Connection);
     try
     {
         Open();
         return AdvProperties.Search(pstrPropertiesCode);
     }
     catch (Exception exp)
     {
         throw exp;
     }
     finally
     {
         Close();
     }
 }
Example #2
0
 /// <summary>
 /// @author : TrungMT
 /// @CreateDate:04/07/2008
 /// @Description: Insert 1 AdvProperties and return AdvProperties_id auto increment
 /// </summary>
 public int Add(AdvProperties pAdvProperties)
 {
     PrAdvProperties AdvProperties = new PrAdvProperties(Connection);
     int intAdvPropertiesID = -1;
     try
     {
         Open();
         intAdvPropertiesID = AdvProperties.Create(pAdvProperties);
         Commit();
     }
     catch (Exception exp)
     {
         Rollback();
         throw exp;
     }
     finally
     {
         Close();
     }
     return intAdvPropertiesID;
 }
Example #3
0
 /// <summary>
 /// @author : TrungMT
 /// @CreateDate:04/07/2008
 /// @Description: Delete 1 AdvProperties with AdvProperties_id
 /// </summary>
 public int Delete(AdvProperties pAdvProperties)
 {
     PrAdvProperties AdvProperties = new PrAdvProperties(Connection);
     int intRowAffected = 0;
     try
     {
         Open();
         intRowAffected = AdvProperties.Delete(pAdvProperties);
         Commit();
     }
     catch (Exception exp)
     {
         Rollback();
         throw exp;
     }
     finally
     {
         Close();
     }
     return intRowAffected;
 }
Example #4
0
 /// <summary>
 /// @author : TrungMT
 /// @CreateDate:04/07/2008
 /// @Description: Update 1 AdvProperties with AdvProperties_id
 /// </summary>
 public int Update(DataRowCollection prowsAdvProperties)
 {
     PrAdvProperties AdvProperties = new PrAdvProperties(Connection);
     int intRowAffected = 0;
     try
     {
         Open();
         AdvProperties properties = new AdvProperties();
         foreach (DataRow row in prowsAdvProperties)
             AdvProperties.Update(row);
         Commit();
     }
     catch (Exception exp)
     {
         Rollback();
         throw exp;
     }
     finally
     {
         Close();
     }
     return intRowAffected;
 }