| | |
| | | ",HWasterQty=" + omodel.HWasterQty.ToString() + |
| | | ",HBadCount=" + omodel.HBadCount.ToString() + |
| | | ",HLastSubProc=" + Convert.ToString(omodel.HLastSubProc ? 1 : 0) + |
| | | ",HPersonNums=" + omodel.HPersonNums.ToString() + |
| | | ",HMachineNums=" + omodel.HMachineNums.ToString() + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | //DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | ",HSupID,HQty,HPrice,HMoney,HBadCount,HCenterID,HProcNo,HOrderProcNO,HSourceNameList" + |
| | | ",HMainSourceInterID,HMainSourceBillNo,HMainSourceBillType,HLastSubProc" + |
| | | ",HEmpID2,HEmpID3,HEmpID4,HEmpID5,HDSQty,HChongQty,HPriceRate,HWorkTimes,HQCCheckID" + |
| | | ",HPersonNums,HMachineNums,HEmpNum" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "'," + omodel.HBillStatus.ToString() + ",getdate(),'" + DBUtility.ClsPub.CurUserName + "',getdate(),'" + omodel.HMouldNum + "'" + |
| | | "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + omodel.HSourceName + "'," + omodel.HPieceQty.ToString() + "," + omodel.HWasterQty.ToString() + "," + omodel.HPlanPieceQty.ToString() + "," + omodel.HBadPNL.ToString() + |
| | |
| | | "," + omodel.HGroupID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HEmpID.ToString() + ",'" + omodel.HBarCode + "','" + omodel.HAddr + "','" + omodel.HBarCodeMaker + "',getdate()" + "," + omodel.HSourceID2.ToString() + "," + omodel.HSourceID3.ToString() + "," + omodel.HSourceID4.ToString() + "," + omodel.HSourceID5.ToString() + |
| | | "," + omodel.HSupID.ToString() + "," + omodel.HQty.ToString() + "," + omodel.HPrice.ToString() + "," + omodel.HMoney.ToString() + "," + omodel.HBadCount.ToString() + "," + omodel.HCenterID.ToString() + "," + omodel.HProcNo.ToString() + ",'" + omodel.HOrderProcNO + "'" + ",'" + omodel.HSourceNameList + "'" + |
| | | "," + omodel.HMainSourceInterID.ToString() + ",'" + omodel.HMainSourceBillNo + "','" + omodel.HMainSourceBillType + "'," + Convert.ToString(omodel.HLastSubProc ? 1 : 0) + |
| | | "," + omodel.HEmpID2.ToString() + "," + omodel.HEmpID3.ToString() + "," + omodel.HEmpID4.ToString() + "," + omodel.HEmpID5.ToString() + "," + omodel.HDSQty.ToString() + "," + omodel.HChongQty.ToString() + "," + omodel.HPriceRate.ToString() + "," + omodel.HWorkTimes.ToString() + "," + omodel.HQCCheckID.ToString() + |
| | | "," + omodel.HEmpID2.ToString() + "," + omodel.HEmpID3.ToString() + "," + omodel.HEmpID4.ToString() + "," + omodel.HEmpID5.ToString() + "," + omodel.HDSQty.ToString() + "," + omodel.HChongQty.ToString() + "," + omodel.HPriceRate.ToString() + "," + omodel.HWorkTimes.ToString() + "," + omodel.HQCCheckID.ToString() + |
| | | "," + omodel.HPersonNums.ToString() + "," + omodel.HMachineNums.ToString() + ",'" + omodel.HEmpNum + "'" + |
| | | ") "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsSc_StationOutBillSub oSub in DetailColl) |
| | |
| | | omodel.HMouldNum = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HMouldNum"]); |
| | | omodel.HQCCheckID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HQCCheckID"]); |
| | | omodel.HSourceNameList = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSourceNameList"]); |
| | | omodel.HPersonNums = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPersonNums"]); |
| | | omodel.HMachineNums = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMachineNums"]); |
| | | // |
| | | //å¾ªç¯ |
| | | DataSet DsSub ; |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | 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; |