public PageModel <Model.TaskRunLog> PageRunLog(int?taskid, int?nodeid, int?resultType, string runguid, string keywords, DateTime?begintime, DateTime?endtime, int pno) { int pagesize = 20; using (RLib.DB.DbConn dbconn = Pub.GetConn()) { int totalcount = 0; var model = tasklogdal.GetRunLogPage(dbconn, taskid, nodeid, resultType, runguid, keywords, begintime, endtime, pno, pagesize, out totalcount); return(new PageModel <Model.TaskRunLog>() { List = model, PageNo = pno, PageSize = pagesize, TotalCount = totalcount }); } }
public List <TaskRunLog> TaskRunLog(int?taskid) { using (RLib.DB.DbConn dbconn = Pub.GetConn()) { int total = 0; var logs = tasklogdal.GetRunLogPage(dbconn, taskid, null, null, "", "", null, null, 1, 50, out total); var ml = logs.Select(x => new TaskRunLog() { EndDbTime = x.EndDbTime, EndServerTime = x.EndServerTime, LogId = x.LogId, LogText = x.LogText, NodeId = x.NodeId, ResultType = x.ResultType, RunDbTime = x.RunDbTime, RunGuid = x.RunGuid, RunServerTime = x.RunServerTime, RunType = x.RunType, TaskId = x.TaskId }).ToList(); return(ml); } }