/// <summary> ///查询用户列表信息 /// </summary> /// <param name="info">UserInfo实体类</param> /// <param name="pageSize">网页列表一次最多显示多少行记录</param> /// <param name="currentPage">用户查询的第几页信息</param> /// <param name="sortInfo">排列的列名实体类,可以指定几个列名,并且可以指定排列是升序还是降序</param> /// <param name="isFirstSearch">代表是否第一点击查询(如果是则需要对totalRecNum赋值,否则不需要,这样可以避免每次都去计算记录总数)</param> /// <param name="totalRecNum">根据查询条件查询的总记录数</param> /// <param name="retValue"返回string(DataSet格式)类型,字段包括用户名称、用户工号、所在用户组等信息</param> /// <returns>返回bool类型,错误返回false,正确返回true</returns> public static bool QueryUserList(UserInfo info, int pageSize, int currentPage, SortInfo sortInfo, bool isFirstSearch, out int totalRecNum, out string retValue) { totalRecNum = 0; retValue = null; #region 处理查询语句和排序语句 string sqlSelect = @"select U.UserID,U.JobNo,U.PassWord,U.RealName,U.JobDuty, U.UserGroupID,U.RoleID,R.RoleName,UG.UserGroupName "; string[] sortColumns = null; if (sortInfo != null && !string.IsNullOrEmpty(sortInfo.SortSql)) { sortColumns = sortInfo.SortSql.Split(','); string sqlSortIn = null; if (sortColumns != null && sortColumns.Length > 0) { foreach (string sortItem in sortColumns) { sqlSortIn += sortItem + ","; } sqlSortIn = sqlSortIn.Substring(0, sqlSortIn.Length - 1); } sqlSelect += ",Row_Number() Over(Order By " + sqlSortIn + ") AS serialNum"; } else { sqlSelect += ",Row_Number() Over(Order By UserID) AS serialNum"; } string sqlFrom = @" from [User] U Left Join UserGroup UG On U.UserGroupID=UG.UserGroupID Left Join [Role] R On U.RoleID=R.RoleID Where 1=1 "; #endregion #region 处理参数 List <System.Data.SqlClient.SqlParameter> listSqlPara = new List <System.Data.SqlClient.SqlParameter>(); if (info != null) { System.Data.SqlClient.SqlParameter sqlPara = null; if (!string.IsNullOrEmpty(info.JobNo)) { sqlFrom += " AND JobNo like '%'+@JobNo+'%'"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.NVarChar; sqlPara.ParameterName = "JobNo"; sqlPara.Value = info.JobNo; listSqlPara.Add(sqlPara); } } #endregion return(ExcutePage.ExcutePageCommand(sqlSelect, sqlFrom, sortColumns, pageSize, currentPage, listSqlPara, isFirstSearch, out totalRecNum, out retValue)); }
/// <summary> ///查询用户组列表信息 /// </summary> /// <param name="info">UserGroupInfo实体类</param> /// <param name="pageSize">网页列表一次最多显示多少行记录</param> /// <param name="currentPage">用户查询的第几页信息</param> /// <param name="sortInfo">排列的列名实体类,可以指定几个列名,并且可以指定排列是升序还是降序</param> /// <param name="isFirstSearch">代表是否第一点击查询(如果是则需要对totalRecNum赋值,否则不需要,这样可以避免每次都去计算记录总数)</param> /// <param name="totalRecNum">根据查询条件查询的总记录数</param> /// <param name="retValue"返回string(DataSet格式)类型,字段包括用户组名称、是否有手持机权限等等信息</param> /// <returns>返回bool类型,错误返回false,正确返回true</returns> public static bool QueryUserGroupList(UserGroupInfo info, int pageSize, int currentPage, SortInfo sortInfo, bool isFirstSearch, out int totalRecNum, out string retValue) { totalRecNum = 0; retValue = null; #region 处理查询语句和排序语句 string sqlSelect = @"select UserGroupID,UserGroupName,HasHandSetRole,HasLoadCarRole, HasGateSysRole,HasWebSiteRole"; string[] sortColumns = null; if (sortInfo != null && !string.IsNullOrEmpty(sortInfo.SortSql)) { sortColumns = sortInfo.SortSql.Split(','); string sqlSortIn = null; if (sortColumns != null && sortColumns.Length > 0) { foreach (string sortItem in sortColumns) { sqlSortIn += sortItem + ","; } sqlSortIn = sqlSortIn.Substring(0, sqlSortIn.Length - 1); } sqlSelect += ",Row_Number() Over(Order By " + sqlSortIn + ") AS serialNum"; } else { sqlSelect += ",Row_Number() Over(Order By UserGroupID) AS serialNum"; } string sqlFrom = @"from UserGroup Where 1=1 "; #endregion #region 处理参数 List <System.Data.SqlClient.SqlParameter> listSqlPara = new List <System.Data.SqlClient.SqlParameter>(); if (info != null) { System.Data.SqlClient.SqlParameter sqlPara = null; if (!string.IsNullOrEmpty(info.UserGroupName)) { sqlFrom += " AND UserGroupName=@UserGroupName"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.NVarChar; sqlPara.ParameterName = "UserGroupName"; sqlPara.Value = info.UserGroupName; listSqlPara.Add(sqlPara); } } #endregion return(ExcutePage.ExcutePageCommand(sqlSelect, sqlFrom, sortColumns, pageSize, currentPage, listSqlPara, isFirstSearch, out totalRecNum, out retValue)); }
/// <summary> ///查询叉车列表信息 /// </summary> /// <param name="info">DeviceInfo实体类(主要是叉车编号,如果什么实体类为null,则代表查询所有叉车信息)</param> /// <param name="pageSize">网页列表一次最多显示多少行记录</param> /// <param name="currentPage">用户查询的第几页信息</param> /// <param name="sortInfo">排列的列名实体类,可以指定几个列名,并且可以指定排列是升序还是降序</param> /// <param name="isFirstSearch">代表是否第一点击查询(如果是则需要对totalRecNum赋值,否则不需要,这样可以避免每次都去计算记录总数)</param> /// <param name="totalRecNum">根据查询条件查询的总记录数</param> /// <param name="retValue">返回string(DataSet格式)类型,字段包括仓库名称、叉车编号、楼层、备注等信息</param> /// <returns>返回bool类型,错误返回false,正确返回true</returns> public static bool QueryDeviceList(DeviceInfo info, int pageSize, int currentPage, SortInfo sortInfo, bool isFirstSearch, out int totalRecNum, out string retValue) { totalRecNum = 0; retValue = null; #region 处理查询语句和排序语句 string sqlSelect = @"select d.*"; string[] sortColumns = null; if (sortInfo != null && !string.IsNullOrEmpty(sortInfo.SortSql)) { sortColumns = sortInfo.SortSql.Split(','); string sqlSortIn = null; if (sortColumns != null && sortColumns.Length > 0) { foreach (string sortItem in sortColumns) { sqlSortIn += "d." + sortItem + ","; } sqlSortIn = sqlSortIn.Substring(0, sqlSortIn.Length - 1); } sqlSelect += ",Row_Number() Over(Order By " + sqlSortIn + ") AS serialNum"; } else { sqlSelect += ",Row_Number() Over(Order By d.DeviceID) AS serialNum"; } string sqlFrom = @" from View_Device d Where d.DeviceType='C'"; #endregion #region 处理参数 List <System.Data.SqlClient.SqlParameter> listSqlPara = new List <System.Data.SqlClient.SqlParameter>(); if (info != null) { System.Data.SqlClient.SqlParameter sqlPara = null; if (!string.IsNullOrEmpty(info.DeviceCode)) { sqlFrom += " AND d.DeviceCode like '%'+@DeviceCode+'%'"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.NChar; sqlPara.ParameterName = "DeviceCode"; sqlPara.Value = info.DeviceCode; listSqlPara.Add(sqlPara); } } #endregion return(ExcutePage.ExcutePageCommand(sqlSelect, sqlFrom, sortColumns, pageSize, currentPage, listSqlPara, isFirstSearch, out totalRecNum, out retValue)); }
/// <summary> /// 作业任务单据查询 /// </summary> /// <param name="info"> TruckEir实体类</param> /// <param name="pageSize">网页列表一次最多显示多少行记录</param> /// <param name="currentPage">用户查询的第几页信息</param> /// <param name="sortInfo">排列的列名实体类,可以指定几个列名,并且可以指定排列是升序还是降序</param> /// <param name="isFirstSearch">代表是否第一点击查询(如果是则需要对totalRecNum赋值,否则不需要,这样可以避免每次都去计算记录总数)</param> /// <param name="totalRecNum">根据查询条件查询的总记录数</param> /// <param name="retValue">返回string(DataSet格式)类型,</param> /// <returns>返回bool类型,错误返回false,正确返回true</returns> public static bool QueryTruckEirList(Dictionary <string, string> queryCondition, int pageSize, int currentPage, SortInfo sortInfo, bool isFirstSearch, out int totalRecNum, out string retValue) { totalRecNum = 0; retValue = null; #region 处理查询语句和排序语句 string sqlSelect = @"select te.TEID,t.PRMBNumber, te.PRMBLot,te.PRMBRelation,te.PRMBSerial,te.TEAttribute,te.TETaskType,te.TEInWeight, te.TEInTime,te.TEInMan,te.TEOutWeight,te.TEOutTime,te.TEOutMan,te.TEStatus,m.MaterialNumber,m.MaterialName"; string[] sortColumns = null; if (sortInfo != null && !string.IsNullOrEmpty(sortInfo.SortSql)) { sortColumns = sortInfo.SortSql.Split(','); string sqlSortIn = null; if (sortColumns != null && sortColumns.Length > 0) { foreach (string sortItem in sortColumns) { sqlSortIn += "te." + sortItem + ","; } sqlSortIn = sqlSortIn.Substring(0, sqlSortIn.Length - 1); } sqlSelect += ",Row_Number() Over(Order By " + sqlSortIn + ") AS serialNum"; } else { sqlSelect += ",Row_Number() Over(Order By te.TEID desc) AS serialNum"; } string sqlFrom = @"from truckeir te inner join Material m on te.MaterialId=m.MaterialId inner join ( select prid,prnumber as prmbnumber from postrequisition union select mbid as prid,mbnumber as prmbnumber from movelocationbill) t on te.prmbid=t.prid Where 1=1"; #endregion #region 处理参数 List <System.Data.SqlClient.SqlParameter> listSqlPara = new List <System.Data.SqlClient.SqlParameter>(); if (queryCondition != null) { System.Data.SqlClient.SqlParameter sqlPara = null; if (!string.IsNullOrEmpty(queryCondition["TETaskType"])) { sqlFrom += " AND te.TETaskType=@TETaskType"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.NVarChar; sqlPara.ParameterName = "TETaskType"; sqlPara.Value = queryCondition["TETaskType"]; listSqlPara.Add(sqlPara); } if (!string.IsNullOrEmpty(queryCondition["PRMBLot"])) { sqlFrom += " AND te.PRMBLot like '%'+@PRMBLot+'%'"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.NVarChar; sqlPara.ParameterName = "PRMBLot"; sqlPara.Value = queryCondition["PRMBLot"]; listSqlPara.Add(sqlPara); } if (!string.IsNullOrEmpty(queryCondition["MaterialNumber"])) { sqlFrom += " AND m.MaterialNumber like '%'+@MaterialNumber+'%'"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.NVarChar; sqlPara.ParameterName = "MaterialNumber"; sqlPara.Value = queryCondition["MaterialNumber"]; listSqlPara.Add(sqlPara); } if (!string.IsNullOrEmpty(queryCondition["PlanStartTime"])) { sqlFrom += " AND te.TEInTime>=@PlanStartTime"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.DateTime; sqlPara.ParameterName = "PlanStartTime"; sqlPara.Value = Convert.ToDateTime(queryCondition["PlanStartTime"] + " 00:00:00"); listSqlPara.Add(sqlPara); } if (!string.IsNullOrEmpty(queryCondition["PlanEndTime"])) { sqlFrom += " AND te.TEInTime<=@PlanEndTime"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.DateTime; sqlPara.ParameterName = "PlanEndTime"; sqlPara.Value = Convert.ToDateTime(queryCondition["PlanEndTime"] + " 23:59:59"); listSqlPara.Add(sqlPara); } } #endregion return(ExcutePage.ExcutePageCommand(sqlSelect, sqlFrom, sortColumns, pageSize, currentPage, listSqlPara, isFirstSearch, out totalRecNum, out retValue)); }
/// <summary> /// 查询叉车工作详细工作记录 /// </summary> /// <param name="queryCondition">查询条件</param> /// <param name="pageSize">网页列表一次最多显示多少行记录</param> /// <param name="currentPage">用户查询的第几页信息</param> /// <param name="sortInfo">排列的列名实体类,可以指定几个列名,并且可以指定排列是升序还是降序</param> /// <param name="isFirstSearch">代表是否第一点击查询(如果是则需要对totalRecNum赋值,否则不需要,这样可以避免每次都去计算记录总数)</param> /// <param name="totalRecNum">根据查询条件查询的总记录数</param> /// <param name="retValue">返回string(DataSet格式)类型,字段包括司机、日期、合同、批次、计划时间和计划仓位等信息</param> /// <returns>返回bool类型,错误返回false,正确返回true</returns> public static bool QueryWorkItemList(Dictionary <string, string> queryCondition, int pageSize, int currentPage, SortInfo sortInfo, bool isFirstSearch, out int totalRecNum, out string retValue) { totalRecNum = 0; retValue = null; #region 处理查询语句和排序语句 string sqlSelect = @"select w.*"; string[] sortColumns = null; string sqlSortIn = string.Empty; if (sortInfo != null && !string.IsNullOrEmpty(sortInfo.SortSql)) { sortColumns = sortInfo.SortSql.Split(','); if (sortColumns != null && sortColumns.Length > 0) { foreach (string sortItem in sortColumns) { sqlSortIn += "w." + sortItem + ","; } sqlSortIn = sqlSortIn.Substring(0, sqlSortIn.Length - 1); } sqlSelect += ",Row_Number() Over(Order By " + sqlSortIn + ") AS serialNum"; } else { sqlSelect += ",Row_Number() Over(Order By w.WorkItemhisID) AS serialNum"; } string sqlFrom = @" from View_WorkItemHis w where 1=1"; #endregion #region 处理参数 List <System.Data.SqlClient.SqlParameter> listSqlPara = new List <System.Data.SqlClient.SqlParameter>(); if (queryCondition != null) { System.Data.SqlClient.SqlParameter sqlPara = null; if (!string.IsNullOrEmpty(queryCondition["WorkType"])) { sqlFrom += " AND w.TETaskType = @WorkType"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.NVarChar; sqlPara.ParameterName = "WorkType"; sqlPara.Value = queryCondition["WorkType"]; listSqlPara.Add(sqlPara); } if (!string.IsNullOrEmpty(queryCondition["PRMBlot"])) { sqlFrom += " AND w.PRMBlot like '%'+@PRMBlot+'%'"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.NVarChar; sqlPara.ParameterName = "PRMBlot"; sqlPara.Value = queryCondition["PRMBlot"]; listSqlPara.Add(sqlPara); } if (!string.IsNullOrEmpty(queryCondition["JobNo"])) { sqlFrom += " AND w.JobNo like '%'+@JobNo+'%'"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.NVarChar; sqlPara.ParameterName = "JobNo"; sqlPara.Value = queryCondition["JobNo"]; listSqlPara.Add(sqlPara); } if (!string.IsNullOrEmpty(queryCondition["StartTime"])) { sqlFrom += " AND w.OpTime >= @OpBeginTime"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.DateTime; sqlPara.ParameterName = "OpBeginTime"; sqlPara.Value = Convert.ToDateTime(queryCondition["StartTime"] + " 00:00:00"); listSqlPara.Add(sqlPara); } if (!string.IsNullOrEmpty(queryCondition["EndTime"])) { sqlFrom += " AND w.OpTime <= @OpEndTime"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.DateTime; sqlPara.ParameterName = "OpEndTime"; sqlPara.Value = Convert.ToDateTime(queryCondition["EndTime"] + " 23:59:59"); listSqlPara.Add(sqlPara); } } #endregion return(ExcutePage.ExcutePageCommand(sqlSelect, sqlFrom, sortColumns, pageSize, currentPage, listSqlPara, isFirstSearch, out totalRecNum, out retValue)); }
/// <summary> /// 根据仓位编号查询仓位信息 /// </summary> /// <param name="info">WarePlaceInfo实体类</param> /// <param name="pageSize">网页列表一次最多显示多少行记录</param> /// <param name="currentPage">用户查询的第几页信息</param> /// <param name="sortInfo">排列的列名实体类,可以指定几个列名,并且可以指定排列是升序还是降序</param> /// <param name="isFirstSearch">代表是否第一点击查询(如果是则需要对totalRecNum赋值,否则不需要,这样可以避免每次都去计算记录总数)</param> /// <param name="totalRecNum">根据查询条件查询的总记录数</param> /// <param name="retValue">返回Xml格式字符串实体类,字段包括标签号、人工仓位编号、长、宽、高,最大容量等</param> /// <returns>返回bool类型,错误返回false,正确返回true</returns> public static bool QueryStorageDetailList(WarePlaceInfo info, int pageSize, int currentPage, SortInfo sortInfo, bool isFirstSearch, out int totalRecNum, out string retValue) { totalRecNum = 0; retValue = null; #region 处理查询语句和排序语句 string sqlSelect = @"select wp.*"; string[] sortColumns = null; if (sortInfo != null && !string.IsNullOrEmpty(sortInfo.SortSql)) { sortColumns = sortInfo.SortSql.Split(','); string sqlSortIn = null; if (sortColumns != null && sortColumns.Length > 0) { foreach (string sortItem in sortColumns) { sqlSortIn += "wp." + sortItem + ","; } sqlSortIn = sqlSortIn.Substring(0, sqlSortIn.Length - 1); } sqlSelect += ",Row_Number() Over(Order By " + sqlSortIn + ") AS serialNum"; } else { sqlSelect += ",Row_Number() Over(Order By wp.id) AS serialNum"; } string sqlFrom = @" from View_WarePlace wp where 1=1"; #endregion #region 处理参数 List <System.Data.SqlClient.SqlParameter> listSqlPara = new List <System.Data.SqlClient.SqlParameter>(); if (info != null) { System.Data.SqlClient.SqlParameter sqlPara = null; if (!string.IsNullOrEmpty(info.WPNumber)) { sqlFrom += " AND wp.WPNumber like '%'+@WPNumber+'%'"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.NVarChar; sqlPara.ParameterName = "WPNumber"; sqlPara.Value = info.WPNumber; listSqlPara.Add(sqlPara); } if (!string.IsNullOrEmpty(info.WHID)) { sqlFrom += " AND wp.WHID=@WHID"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.NVarChar; sqlPara.ParameterName = "WHID"; sqlPara.Value = info.WHID; listSqlPara.Add(sqlPara); } } #endregion return(ExcutePage.ExcutePageCommand(sqlSelect, sqlFrom, sortColumns, pageSize, currentPage, listSqlPara, isFirstSearch, out totalRecNum, out retValue)); }
/// <summary> /// 查询EAS移库通知列表 /// </summary> /// <param name="queryCondition">查询条件</param> /// <param name="pageSize">网页列表一次最多显示多少行记录</param> /// <param name="currentPage">用户查询的第几页信息</param> /// <param name="sortInfo">排列的列名实体类,可以指定几个列名,并且可以指定排列是升序还是降序</param> /// <param name="isFirstSearch">代表是否第一点击查询(如果是则需要对totalRecNum赋值,否则不需要,这样可以避免每次都去计算记录总数)</param> /// <param name="totalRecNum">根据查询条件查询的总记录数</param> /// <param name="retValue">返回string(DataSet格式)类型</param> /// <returns>返回bool类型,错误返回false,正确返回true</returns> public static bool QueryMovePlanList(Dictionary <string, string> queryCondition, int pageSize, int currentPage, SortInfo sortInfo, bool isFirstSearch, out int totalRecNum, out string retValue) { totalRecNum = 0; retValue = null; #region 处理查询语句和排序语句 string sqlSelect = @"select mlb.*,m.MaterialNumber,m.MaterialName"; string[] sortColumns = null; if (sortInfo != null && !string.IsNullOrEmpty(sortInfo.SortSql)) { sortColumns = sortInfo.SortSql.Split(','); string sqlSortIn = null; if (sortColumns != null && sortColumns.Length > 0) { foreach (string sortItem in sortColumns) { sqlSortIn += "mlb." + sortItem + ","; } sqlSortIn = sqlSortIn.Substring(0, sqlSortIn.Length - 1); } sqlSelect += ",Row_Number() Over(Order By " + sqlSortIn + ") AS serialNum"; } else { sqlSelect += ",Row_Number() Over(Order By mlb.ID desc) AS serialNum"; } string sqlFrom = @" from MoveLocationBill mlb,Material m Where mlb.MaterialId=m.MaterialId "; #endregion #region 处理参数 List <System.Data.SqlClient.SqlParameter> listSqlPara = new List <System.Data.SqlClient.SqlParameter>(); if (queryCondition != null) { System.Data.SqlClient.SqlParameter sqlPara = null; if (!string.IsNullOrEmpty(queryCondition["PRType"])) { sqlFrom += " AND mlb.MBType=@PRType"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.NVarChar; sqlPara.ParameterName = "PRType"; sqlPara.Value = queryCondition["PRType"]; listSqlPara.Add(sqlPara); } if (!string.IsNullOrEmpty(queryCondition["PRNumber"])) { sqlFrom += " and mlb.MBNumber like '%'+@PRNumber+'%'"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.NVarChar; sqlPara.ParameterName = "PRNumber"; sqlPara.Value = queryCondition["PRNumber"]; listSqlPara.Add(sqlPara); } if (!string.IsNullOrEmpty(queryCondition["PRLot"])) { sqlFrom += " and mlb.MBLot like '%'+@PRLot+'%'"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.NVarChar; sqlPara.ParameterName = "PRLot"; sqlPara.Value = queryCondition["PRLot"]; listSqlPara.Add(sqlPara); } if (!string.IsNullOrEmpty(queryCondition["StartTime"])) { sqlFrom += " and mlb.MBBizDate >= @StartTime"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.DateTime; sqlPara.ParameterName = "StartTime"; sqlPara.Value = Convert.ToDateTime(queryCondition["StartTime"]); listSqlPara.Add(sqlPara); } if (!string.IsNullOrEmpty(queryCondition["EndTime"])) { sqlFrom += " and mlb.MBBizDate <= @EndTime"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.DateTime; sqlPara.ParameterName = "EndTime"; sqlPara.Value = Convert.ToDateTime(queryCondition["EndTime"]); listSqlPara.Add(sqlPara); } if (!string.IsNullOrEmpty(queryCondition["MBID"])) { sqlFrom += " and mlb.MBID = @MBID and mlb.MBRelation=3"; sqlPara = new System.Data.SqlClient.SqlParameter(); sqlPara.SqlDbType = SqlDbType.NVarChar; sqlPara.ParameterName = "MBID"; sqlPara.Value = queryCondition["MBID"]; listSqlPara.Add(sqlPara); } else { sqlFrom += " and mlb.MBRelation<>3"; } } #endregion return(ExcutePage.ExcutePageCommand(sqlSelect, sqlFrom, sortColumns, pageSize, currentPage, listSqlPara, isFirstSearch, out totalRecNum, out retValue)); }