public WebApiResult <string> GetThreadList(ThreadLogReadRequest Request) { System.Data.DataTable dt; if (Request.GUID == "ALL") { dt = AccessHelper.ExecuteDataSet(AccessHelper.conn, "select * from ThreadLog order by AddTime").Tables[0]; dt.Columns.Add("Type"); dt.Columns.Add("filePath"); for (int i = 0; i < dt.Rows.Count; i++) { dt.Rows[i]["Type"] = AccessHelper.ExecuteDataSet(AccessHelper.conn, "select * from Log order by AddTime").Tables[0].Rows[i]["Type"]; dt.Rows[i]["filePath"] = AccessHelper.ExecuteDataSet(AccessHelper.conn, "select * from Log order by AddTime").Tables[0].Rows[i]["SavePath"]; } } else { dt = AccessHelper.ExecuteDataSet(AccessHelper.conn, "select * from ThreadLog where [GUID]=@GUID", new OleDbParameter("@GUID", Request.GUID)).Tables[0]; dt.Columns.Add("Type"); dt.Columns.Add("filePath"); dt.Rows[0]["Type"] = AccessHelper.ExecuteDataSet(AccessHelper.conn, "select * from Log where [GUID]=@GUID", new OleDbParameter("@GUID", Request.GUID)).Tables[0].Rows[0]["Type"]; dt.Rows[0]["filePath"] = AccessHelper.ExecuteDataSet(AccessHelper.conn, "select * from Log where [GUID]=@GUID", new OleDbParameter("@GUID", Request.GUID)).Tables[0].Rows[0]["SavePath"]; } return(new WebApiResult <string>() { success = 1, msg = "", results = JsonHelper.ToJson(dt) }); }
/// <summary> /// 线程日志详情 /// </summary> /// <param name="request"></param> /// <returns></returns> public WebApiResult <string> Any(ThreadLogReadRequest request) { LogService service = new LogService(); return(service.GetThreadList(request)); }