| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | Sc_WorkBillSortBillMain omdelMian = new Sc_WorkBillSortBillMain(); |
| | | List<Sc_WorkBillSortBillSub> omodelsub = new List<Sc_WorkBillSortBillSub>(); |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | |
| | | #region æ¥è®¡åå·¥å å表 |
| | | [Route("Sc_WorkBillSortBill/Sc_WorkBillSortBillList")] |
| | |
| | | { |
| | | var NumData = HInterID.Split(','); |
| | | |
| | | //è·åç³»ç»åæ° |
| | | string sReturn = ""; |
| | | oSystemParameter.ShowBill(ref sReturn); |
| | | |
| | | for (int i = 0; i < NumData.Length; i++) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_JIT_Sc_WorkBillSortBillList where 1=1 and hmainid=" + NumData[i], "h_v_JIT_Sc_WorkBillSortBillList"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | if (oSystemParameter.omodel.WMS_CampanyName == "æ·»åº·ç§æ") |
| | | { |
| | | if (ds.Tables[0].Rows[0]["åæ®ç¶æ"].ToString() != "1") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½ååæ®ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran();//å¼å¯äºå¡ |
| | | |
| | | oCN.RunProc($"delete from Sc_WorkBillSortBillSub where HInterID={ NumData[i]}"); |
| | |
| | | |
| | | oCN.Commit();//ç»æäºå¡ |
| | | } |
| | | else |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_JIT_Sc_WorkBillSortBillList where 1=1 and hmainid=" + NumData[i], "h_v_JIT_Sc_WorkBillSortBillList"); |
| | | |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["åæ®ç¶æ"].ToString() != "1") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å½ååæ®ä¸è½å é¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCN.BeginTran();//å¼å¯äºå¡ |
| | | |
| | | oCN.RunProc($"delete from Sc_WorkBillSortBillSub where HInterID={ NumData[i]}"); |
| | | oCN.RunProc($"delete from Sc_WorkBillSortBillMain where HInterID={ NumData[i]}"); |
| | | |
| | | oCN.Commit();//ç»æäºå¡ |
| | | } |
| | | } |
| | | } |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |