Example #1
0
 /// <summary>
 /// @author : TrungMT
 /// @CreateDate:04/03/2008
 /// @Description: Retrieves all with clip code
 /// </summary>
 public static DataSet Retrieve(int clipId)
 {
     ConnectionFactory Connection = InternalGlobal.MakeConnectionFactory();
     PrClip Clip = new PrClip(Connection);
     try
     {
         Connection.Open();
         return Clip.Search(clipId);
     }
     catch (Exception exp)
     {
         throw exp;
     }
     finally
     {
         Connection.Close();
     }
 }
Example #2
0
 public BClip(int clipId)
 {
     PrClip Clip = new PrClip(Connection);
     try
     {
         Open();
         DataRow dr = Clip.Search(clipId).Tables[0].Rows[0];
         LoadDetails(dr);
     }
     catch (Exception exp)
     {
         throw exp;
     }
     finally
     {
         Close();
     }
 }
Example #3
0
 /// <summary>
 /// @author : TrungMT
 /// @CreateDate:04/03/2008
 /// @Description: Retrieves all Clip denpend on param
 /// </summary>
 public DataSet Retrieves(Clip pClip)
 {
     PrClip Clip = new PrClip(Connection);
     try
     {
         Open();
         return Clip.Search(pClip);
     }
     catch (Exception exp)
     {
         throw exp;
     }
     finally
     {
         Close();
     }
 }
Example #4
0
 /// <summary>
 /// @author : TrungMT
 /// @CreateDate:04/03/2008
 /// @Description: Update 1 Clip with Clip_id
 /// </summary>
 public int Update(Clip pClip)
 {
     PrClip Clip = new PrClip(Connection);
     int intRowAffected = 0;
     try
     {
         Open();
         intRowAffected = Clip.Update(pClip);
         if (pClip.AutoSetUploadDate)
             pClip.UploadDate = Qtc.Libs.Util.DBUtil.getDBSystemTime(Connection);
         Commit();
     }
     catch (Exception exp)
     {
         Rollback();
         throw exp;
     }
     finally
     {
         Close();
     }
     return intRowAffected;
 }
Example #5
0
 /// <summary>
 /// @author : TrungMT
 /// @CreateDate:04/03/2008
 /// @Description: Delete 1 Clip with Clip_id
 /// </summary>
 public int Delete(Clip pClip)
 {
     PrClip Clip = new PrClip(Connection);
     int intRowAffected = 0;
     try
     {
         Open();
         intRowAffected = Clip.Delete(pClip);
         Commit();
     }
     catch (Exception exp)
     {
         Rollback();
         throw exp;
     }
     finally
     {
         Close();
     }
     return intRowAffected;
 }