| | |
| | | try |
| | | { |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (omodel.HInterID == 0 || omodel.HInterID.ToString() == null || omodel.HInterID.ToString() == "undefined") |
| | | { |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCn.BeginTran(); |
| | | //主表 |
| | |
| | | "(HYear,HPeriod,HBillType,HInterID" + |
| | | ",HDate,HBillNo,HBillStatus,HRemark,HICMOInterID" + |
| | | ",HICMOBillNo,HBarCode_P,HMaterID,HUnitID" + |
| | | ",HMaker,HMakeDate" + |
| | | ",HMaker,HMakeDate,HBillSubType" + |
| | | ") " + |
| | | " 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_P.ToString() + "'," + omodel.HMaterID + "," + omodel.HUnitID + "" + |
| | | ",'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.GetServerDate(-1) + "'" + |
| | | ",'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.GetServerDate(-1) + "','" + this.BillType + "'" + |
| | | ") "); |
| | | ////æå
¥å表 |
| | | foreach (Model.ClsSc_AssemblyBillSub oSub in DetailColl) |
| | |
| | | " (HInterID,HEntryID,HMaterID,HUnitID,HQty,HSourceID" + |
| | | ",HEquipID,HGroupID,HWorkerID,HScanDate,HBarCode,HBarCode_P" + |
| | | ",HCloseMan,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney)" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HBillNo_bak)" + |
| | | " values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HSourceID.ToString() + "" + |
| | | "," + oSub.HEquipID.ToString() + "," + oSub.HGroupID.ToString() + "," + oSub.HWorkerID.ToString() + ",'" + oSub.HScanDate.ToShortDateString() + "','" + oSub.HBarCode + "','" + oSub.HBarCode_P + "'" + |
| | | ",'" + oSub.HCloseMan + "'," + Convert.ToString(oSub.HCloseType ? 1 : 0) + ",'" + oSub.HRemark + "'" + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + ",'" + omodel.HBillNo + "'" + |
| | | ") "); |
| | | } |
| | | sReturn = "æ°å¢åæ®æåï¼"; |