From 1413158ae9f0fc5ac7eb39deeab7d5cc09950ad1 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期四, 01 二月 2024 10:57:51 +0800 Subject: [PATCH] 工序流转卡派工单删除方法,增加调用删除 前控制h_p_Sc_ProcExchSendWorkBill_BeforeDelCtrl 和删除 后控制h_p_Sc_ProcExchSendWorkBill_AfterDelCtrl 的存储过程。 工序委外派工单删除方法,增加 调用删除前控制h_p_WW_EntrustWorkOrderBill_BeforeDelCtrl 和删除后控制h_p_WW_EntrustWorkOrderBill_AfterDelCtrl 的存储过程。 工序进站接收单删除方法,增加调用删除前控制h_p_Sc_StationInBill_BeforeDelCtrl 和删除后控制h_p_Sc_StationInBill_AfterDelCtrl 的存储过程。 工序出站汇报单删除方法,增加调用删除前控制h_p_Sc_StationOutBill_BeforeDelCtrl 和删除后控制h_p_Sc_StationOutBill_AfterDelCtrl 的存储过程 --- DAL/车间管理/ClsSc_StationOutBill.cs | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 47 insertions(+), 0 deletions(-) diff --git "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_StationOutBill.cs" "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_StationOutBill.cs" index 641fcc3..95dabfd 100644 --- "a/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_StationOutBill.cs" +++ "b/DAL/\350\275\246\351\227\264\347\256\241\347\220\206/ClsSc_StationOutBill.cs" @@ -1061,6 +1061,53 @@ } + + public bool DeleteBill(long HInterID, long HProcExchInterID, long HProcExchEntryID, string HBillNo, string procName, string user, ref string sReturn) + { + try + { + oCn.BeginTran(); + //鍒犻櫎鍏宠仈 + // + oCn.RunProc("exec h_p_Mes_ProcessExchangeRelationQty_Out " + HInterID.ToString() + ",-1"); + // + + oCn.RunProc("delete Sc_StationOutBillMain where HInterID=" + HInterID); + oCn.RunProc("delete Sc_StationOutBillSub where HInterID=" + HInterID); + //oCn.RunProc("delete Sc_StationOutBillSub_Item where HInterID=" + HInterID); + //oCn.RunProc("update Sc_ProcessExchangeBillsub set HRelEndDate=null where HInterID=" + HProcExchInterID + " and HEntryID=" + HProcExchEntryID); + + //鍒犻櫎鍚庢帶鍒�================================================================================== + string sql2 = "exec " + procName + " " + HInterID + ",'" + HBillNo + "','" + user + "'"; + DataSet ds = oCn.RunProcReturn(sql2, procName); + if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) + { + + sReturn = "鍒犻櫎澶辫触!鍘熷洜:鍒犻櫎鍚庡垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴"; + oCn.RollBack(); + return false; + } + if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") + { + sReturn = "鍒犻櫎澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); + oCn.RollBack(); + return false; + } + //============================================================================================== + + oCn.Commit(); + return true; + } + catch (Exception e) + { + sReturn = e.Message; + oCn.RollBack(); + throw (e); + } + + + } + public bool CheckCenterIDByUser(long HCenterID) { DataSet Ds; -- Gitblit v1.9.1