| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sqlWhere == null || sqlWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select top 500 * from h_v_QC_PatrolProcCheckBillList where 关闭人='' order by hmainid desc ", "h_v_QC_PatrolProcCheckBillList"); |
| | | ds = oCN.RunProcReturn("select top 500 * from h_v_QC_PatrolProcCheckBillMainList where 关闭人='' order by hmainid desc ", "h_v_QC_PatrolProcCheckBillMainList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_QC_PatrolProcCheckBillList where 关闭人='' "; |
| | | string sql1 = "select * from h_v_QC_PatrolProcCheckBillMainList where 关闭人='' "; |
| | | string sql = sql1 + sqlWhere+ " order by 制单日期 desc "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_QC_PatrolProcCheckBillList"); |
| | | ds = oCN.RunProcReturn(sql, "h_v_QC_PatrolProcCheckBillMainList"); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | |
| | | { |
| | | //判断单据是否已经审核 |
| | | DataSet ds; |
| | | string sql = "select * from Gy_QCCheckProjectMain where HInterID = " + HInterID; |
| | | string sql; |
| | | if(HInterID=="0") |
| | | { |
| | | sql = "select top 1 * from Gy_QCCheckProjectMain order by HInterID desc"; |
| | | |
| | | } |
| | | else |
| | | sql = "select * from Gy_QCCheckProjectMain where HInterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, oBill.MvarItemKey); |
| | | if(ds!=null) |
| | | { |
| | | oBill.omodel.HInterID = Convert.ToInt64(ds.Tables[0].Rows[0]["HInterID"]); |
| | | HInterID = Convert.ToInt64(ds.Tables[0].Rows[0]["HInterID"]).ToString(); |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HChecker"] != null && ds.Tables[0].Rows[0]["HChecker"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | UserName = oItem.HMaker; |
| | | oItem.HMakeDate = DBUtility.ClsPub.isStrNull(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | oItem.HYear = DBUtility.ClsPub.isLong(DateTime.Now.Year); |
| | | oItem.HDate = DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")); |
| | | oItem.HDate=oItem.HDate.ToString()==""? DBUtility.ClsPub.isDate(DateTime.Now.ToString("yyyy-MM-dd")) : oItem.HDate; |
| | | oItem.HBillType = "7506"; |
| | | oItem.HBillSubType = "7506"; |
| | | oItem.HBillStatus = 0; |