| | |
| | | //新增单据 |
| | | public override bool AddBill(ref string sReturn) |
| | | { |
| | | string ww = ""; |
| | | try |
| | | { |
| | | //得到mainid |
| | |
| | | " values(" + omodel.HYear + "," + omodel.HPeriod + ",'" + this.BillType + "'," + omodel.HInterID + "" + |
| | | ",'" + omodel.HDate + "','" + omodel.HBillNo.ToString() + "'," + omodel.HBillStatus + ",'" + omodel.HRemark + "'," + omodel.HICMOInterID + "" + |
| | | ",'" + omodel.HICMOBillNo.ToString() + "','" + omodel.HBarCode_Pack.ToString() + "'," + omodel.HMaterID + "," + omodel.HUnitID + "" + |
| | | ",'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.GetServerDate(-1) + "'" + |
| | | ",'Admin','" + DBUtility.ClsPub.GetServerDate(-1) + "'" + |
| | | ") "); |
| | | ////插入子表 |
| | | string HSourceInterID = "0"; |
| | |
| | | HQty += oSub.HQty; |
| | | } |
| | | //箱码插入条码档案表 |
| | | //Int64 ZHInterID = DBUtility.ClsPub.CreateBillID_Prod("85", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | oCn.RunProc("insert into Gy_BarCodeBill(HInterID,HEntryID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HBatchNo,HMakeDate " + |
| | | ",HSourceInterID, HSourceEntryID, HSourceBillNo, HSourceBillType, HUseFlag, HStopflag, HSupID, HGroupID, HPrintQty)" + |
| | | "values('" + HSourceInterID + "', 1, '" + omodel.HBarCode_Pack + "', '箱号条码', '" + HMaterID + "', '" + HUnitID + "','" + HQty + "', '', getdate()" + |
| | | "values('" + HSourceInterID + "', 1, '" + omodel.HBarCode_Pack + "', '托盘条码', '" + HMaterID + "', '" + HUnitID + "','" + HQty + "', '', getdate()" + |
| | | ", '" + HSourceInterID + "', '" + HSourceEntryID + "', '" + HSourceBillNo + "', '" + HSourceBillType + "', 1, 0, 0, 0, 0)"); |
| | | oCn.RunProcReturn("exec h_p_Sc_PackUnionBill_SumSubBill2 " + omodel.HInterID + ",'"+ omodel.HBillNo.ToString() + "','"+ this.BillType + "','Admin'", "h_p_JIT_MESBeginWorkBill_SaveCtrl"); |
| | | sReturn = "新增单据成功!"; |
| | | oCn.Commit(); |
| | | return true; |
| | |
| | | { |
| | | sReturn = e.Message; |
| | | oCn.RollBack(); |
| | | throw (e); |
| | | return false; |
| | | } |
| | | } |
| | | //显示单据 |