/// <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(); } }