/// <summary> /// 获取送检单列表 /// </summary> /// <param name="keyword"></param> /// <param name="strSort"></param> /// <param name="pageSize">页面数据大小</param> /// <param name="curPage">当前页</param> /// <param name="pageCount">页数</param> /// <param name="recCount"></param> /// <param name="outDataSet">输出数据集</param> /// <returns></returns> public string getSendQCDoneReportList(string keyword, string strSort, int pageSize, int curPage, out int pageCount, out int recCount, out DataSet outDataSet) { string result = ""; pageCount = 0; recCount = 0; outDataSet = new DataSet(); DBClass dbc = new DBClass(); try { #region SQL语句条件 string whereStr = " 1=1 "; ////支持多级关键字查询(如需定义多关键字,请取消以下注释,并修改程序) //if (keyword != "") //{ // foreach (string s in keyword.Split(" , ".ToCharArray())) // { // if (s.Trim() != "") // whereStr = whereStr + " and ([UserId] like '%" + s + "%' or [Descript] like '%" + s + "%' or [Descript] like '%" + s + "%' or [IP] like '%" + s + "%') "; // } //} if (strSort == "") { strSort = "CreateDate desc"; } #endregion //SQL语句数组,组合分页语句 string[] sql = new string[] { /* select */ @"*", /* from */ @"V_SendQCDoneReport", /* where */ whereStr, /* order by */ strSort }; outDataSet = dbc.getPageDataSet(sql, curPage, pageSize, out pageCount, out recCount); result = "0|获取成功"; } catch (Exception e) { result = "1|" + e.Message; } return(result); }
/// <summary> /// 获取检验报告列表 /// </summary> /// <param name="keyword"></param> /// <param name="strSort"></param> /// <param name="pageSize">页面数据大小</param> /// <param name="curPage">当前页</param> /// <param name="pageCount">页数</param> /// <param name="recCount"></param> /// <param name="outDataSet">输出数据集</param> /// <returns></returns> public string getSendQCReportDoneList(string keyword, string strSort, int pageSize, int curPage, out int pageCount, out int recCount, out DataSet outDataSet) { string result = ""; pageCount = 0; recCount = 0; outDataSet = new DataSet(); DBClass dbc = new DBClass(); try { #region SQL语句条件 string whereStr = " 1=1 "; ////支持多级关键字查询(如需定义多关键字,请取消以下注释,并修改程序) //if (keyword != "") //{ // foreach (string s in keyword.Split(" , ".ToCharArray())) // { // if (s.Trim() != "") // whereStr = whereStr + " and ([UserId] like '%" + s + "%' or [Descript] like '%" + s + "%' or [Descript] like '%" + s + "%' or [IP] like '%" + s + "%') "; // } //} if (strSort == "") { strSort = "CreateDate desc"; } #endregion //SQL语句数组,组合分页语句 string[] sql = new string[] { /* select */ @"SendQCReportId, CreateDate, VendorName, REVERSE(substring(REVERSE(ProductName),1,(charindex('.',REVERSE(ProductName))-1))) AS ProductName, ProductDescription, POName, CONVERT(DECIMAL(18,1),DeliveryQty) AS DeliveryQty, IQCStatus, QCResult", /* from */ @"V_GetSendQCReportWithLot", /* where */ whereStr, /* order by */ strSort }; outDataSet = dbc.getPageDataSet(sql, curPage, pageSize, out pageCount, out recCount); result = "0|获取成功"; } catch (Exception e) { result = "1|" + e.Message; } return(result); }