|  |  |  | 
|---|
|  |  |  | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); | 
|---|
|  |  |  | if (sWhere == null || sWhere.Equals("")) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | ds = oCN.RunProcReturn("select  * from h_v_Gy_QCCheckProjectList", "h_v_Gy_QCCheckProjectList"); | 
|---|
|  |  |  | ds = oCN.RunProcReturn("select  * from h_v_Gy_QCCheckProjectList order by hmainid desc ", "h_v_Gy_QCCheckProjectList"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | string sql1 = "select * from h_v_Gy_QCCheckProjectList where 1=1"; | 
|---|
|  |  |  | string sql = sql1 + sWhere; | 
|---|
|  |  |  | string sql = sql1 + sWhere+ " order by hmainid desc "; | 
|---|
|  |  |  | ds = oCN.RunProcReturn(sql, "h_v_Gy_QCCheckProjectList"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); | 
|---|
|  |  |  | if (sqlWhere == null || sqlWhere.Equals("")) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | ds = oCN.RunProcReturn("select top 500 * from h_v_QC_FirstPieceCheckBillList  where  关闭人='' ", "h_v_QC_FirstPieceCheckBillList"); | 
|---|
|  |  |  | ds = oCN.RunProcReturn("select top 500 * from h_v_QC_FirstPieceCheckBillList  where  关闭人='' order by hmainid desc ", "h_v_QC_FirstPieceCheckBillList"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | string sql1 = "select * from h_v_QC_FirstPieceCheckBillList where 关闭人='' "; | 
|---|
|  |  |  | string sql = sql1 + sqlWhere; | 
|---|
|  |  |  | string sql = sql1 + sqlWhere+ " order by hmainid desc "; | 
|---|
|  |  |  | ds = oCN.RunProcReturn(sql, "h_v_QC_FirstPieceCheckBillList"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); | 
|---|
|  |  |  | if (sqlWhere == null || sqlWhere.Equals("")) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | ds = oCN.RunProcReturn("select top 500 * from h_v_QC_PatrolProcCheckBillList where  关闭人=''", "h_v_QC_PatrolProcCheckBillList"); | 
|---|
|  |  |  | ds = oCN.RunProcReturn("select top 500 * from h_v_QC_PatrolProcCheckBillList where  关闭人='' order by hmainid desc ", "h_v_QC_PatrolProcCheckBillList"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | else | 
|---|
|  |  |  | { | 
|---|
|  |  |  | string sql1 = "select * from h_v_QC_PatrolProcCheckBillList where 关闭人='' "; | 
|---|
|  |  |  | string sql = sql1 + sqlWhere; | 
|---|
|  |  |  | string sql = sql1 + sqlWhere+ " order by hmainid desc "; | 
|---|
|  |  |  | ds = oCN.RunProcReturn(sql, "h_v_QC_PatrolProcCheckBillList"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|