/// <summary> /// @author : TrungMT /// @CreateDate:04/07/2008 /// @Description: retrieve many ScheduleDetail with workstation id and schedule date /// </summary> /// <param name="pintScheduleDetailID">int</param> //public DataSet CreateSchedule(ScheduleDetail pScheduleDetail) //{ // PrScheduleDetail ScheduleDetail = new PrScheduleDetail(Connection); // try // { // Open(); // ScheduleDetail.CreateSchedule(pScheduleDetail); // Commit(); // return ScheduleDetail.Search(pScheduleDetail.WorkstationId, pScheduleDetail.ScheduleDate); // } // catch (Exception exp) // { // Rollback(); // throw exp; // } // finally // { // Close(); // } //} /// <summary> /// @author : TrungMT /// @CreateDate:04/07/2008 /// @Description: wrilte download log /// </summary> /// <param name="pintScheduleDetailID">int</param> public void CheckDownloaded(DataRowCollection pDataRowsColl, int pintWorkstationID, DateTime pdteDateTime) { PrScheduleDetail ScheduleDetail = new PrScheduleDetail(Connection); ScheduleDetail pScheduleDetail = new ScheduleDetail(); pScheduleDetail.WorkstationId = pintWorkstationID; pScheduleDetail.ScheduleDate = pdteDateTime; try { Open(); foreach (DataRow row in pDataRowsColl) { pScheduleDetail.ScheduleId = (int) row["SCHEDULE_ID"]; pScheduleDetail.Downloaded = (byte) row["DOWNLOADED"]; if (pScheduleDetail.Downloaded == 1) ScheduleDetail.CheckDownloaded(pScheduleDetail); } Commit(); } catch (Exception exp) { Rollback(); throw exp; } finally { Close(); } }
/// <summary> /// @author : TrungMT /// @CreateDate:04/07/2008 /// @Description: wrilte download log /// </summary> /// <param name="pintScheduleDetailID">int</param> public bool CheckDownloaded(ScheduleDetail pScheduleDetail) { PrScheduleDetail ScheduleDetail = new PrScheduleDetail(Connection); try { Open(); bool bln = ScheduleDetail.CheckDownloaded(pScheduleDetail); Commit(); return bln; } catch (Exception exp) { Rollback(); throw exp; } finally { Close(); } }
/// <summary> /// @author : TrungMT /// @CreateDate:04/07/2008 /// @Description: retrieve many ScheduleDetail with workstation id and schedule date /// </summary> /// <param name="pintScheduleDetailID">int</param> public DataSet RetrievesAll(ScheduleDetail pScheduleDetail) { PrScheduleDetail ScheduleDetail = new PrScheduleDetail(Connection); try { Open(); return ScheduleDetail.Search(pScheduleDetail.WorkstationId, pScheduleDetail.ScheduleDate); } catch (Exception exp) { throw exp; } finally { Close(); } }
/// <summary> /// @author : TrungMT /// @CreateDate:04/07/2008 /// @Description: Update 1 ScheduleDetail with ScheduleDetail_id /// </summary> public int Update(ScheduleDetail pScheduleDetail) { PrScheduleDetail ScheduleDetail = new PrScheduleDetail(Connection); int intRowAffected = 0; try { Open(); intRowAffected = ScheduleDetail.Update(pScheduleDetail); Commit(); } catch (Exception exp) { Rollback(); throw exp; } finally { Close(); } return intRowAffected; }
/// <summary> /// @author : TrungMT /// @CreateDate:04/07/2008 /// @Description: retrieve many ScheduleDetail with workstation id and schedule date /// </summary> /// <param name="pintScheduleDetailID">int</param> public DataSet GetFromScheduleForWorkstation(ScheduleDetail pScheduleDetail) { PrScheduleDetail ScheduleDetail = new PrScheduleDetail(Connection); try { Open(); return ScheduleDetail.GetFromScheduleForWorkstation(pScheduleDetail.WorkstationId, pScheduleDetail.ScheduleDate); } catch (Exception exp) { throw exp; } finally { Close(); } }