Пример #1
0
 public DateTime[] GetMinWorkRunDisTime()
 {
     DateTime[] ts = new DateTime[3];
     using (RLib.DB.DbConn dbconn = Pub.GetConn())
     {
         ts[0] = new DAL.TaskLogDal().GetMinWorkLogDate(dbconn);
         ts[1] = new DAL.TaskLogDal().GetMinRunLogDate(dbconn);
         ts[2] = new DAL.DispatchDal().GetMinLogDate(dbconn);
         return(ts);
     }
 }
Пример #2
0
 public int DeleteRunLog(DateTime endtime)
 {
     if ((DateTime.Now - endtime).TotalDays < 3)
     {
         throw new MException("近三天的日志不能清除!");
     }
     using (RLib.DB.DbConn dbconn = Pub.GetConn())
     {
         int deletecount = new DAL.TaskLogDal().DeleteRunLog(dbconn, endtime);
         return(deletecount);
     }
 }