| | |
| | | try |
| | | { |
| | | // |
| | | //oCn.BeginTran(); |
| | | ////æ´æ°ä¸»è¡¨ |
| | | //oCn.RunProc("UpDate Xs_SeOrderBillMain set " + |
| | | //" HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== |
| | | //",HDate='" + omodel.HDate + "'" + |
| | | //",HYear='" + omodel.HYear.ToString() + "'" + |
| | | //",HPeriod='" + omodel.HPeriod.ToString() + "'" + |
| | | //",HRemark='" + omodel.HRemark + "'" + |
| | | //",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + |
| | | //",HUpDateDate=getdate()" + |
| | | // //======================================== |
| | | //",HSSDate='" + omodel.HSSDate.ToShortDateString() + "'" + |
| | | //",HAddress='" + omodel.HAddress + "'" + |
| | | //",HSSID=" + omodel.HSSID.ToString() + |
| | | //",HSellSID=" + omodel.HSellSID.ToString() + |
| | | //",HCusID=" + omodel.HCusID.ToString() + |
| | | //",HCurID=" + omodel.HCurID.ToString() + |
| | | //",HExRate=" + omodel.HExRate.ToString() + |
| | | //",HEmpID=" + omodel.HEmpID.ToString() + |
| | | //",HManagerID=" + omodel.HManagerID.ToString() + |
| | | //",HDeptID=" + omodel.HDeptID.ToString() + |
| | | //",HExplanation='" + omodel.HExplanation + "'" + |
| | | //",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | //" where HInterID=" + lngBillKey.ToString()); |
| | | |
| | | |
| | | oCn.BeginTran(); |
| | | //æ´æ°ä¸»è¡¨ |
| | | oCn.RunProc("UpDate Xs_SeOrderBillMain set " + |
| | | string mainSql = "UpDate Xs_SeOrderBillMain set " + |
| | | " HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== |
| | | ",HDate='" + omodel.HDate + "'" + |
| | | ",HYear='" + omodel.HYear.ToString() + "'" + |
| | |
| | | ",HRemark='" + omodel.HRemark + "'" + |
| | | ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + |
| | | ",HUpDateDate=getdate()" + |
| | | //======================================== |
| | | ",HSSDate='" + omodel.HSSDate.ToShortDateString() + "'" + |
| | | //======================================== |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HAddress='" + omodel.HAddress + "'" + |
| | | ",HSSID=" + omodel.HSSID.ToString() + |
| | | ",HSellSID=" + omodel.HSellSID.ToString() + |
| | | ",HDeptID=" + omodel.HDeptID.ToString() + |
| | | ",HCusID=" + omodel.HCusID.ToString() + |
| | | ",HEmpID=" + omodel.HEmpID.ToString() + |
| | | ",HCurID=" + omodel.HCurID.ToString() + |
| | | ",HExRate=" + omodel.HExRate.ToString() + |
| | | ",HEmpID=" + omodel.HEmpID.ToString() + |
| | | ",HManagerID=" + omodel.HManagerID.ToString() + |
| | | ",HDeptID=" + omodel.HDeptID.ToString() + |
| | | ",HSellSID=" + omodel.HSellSID.ToString() + |
| | | ",HSSID=" + omodel.HSSID.ToString() + |
| | | ",HSSDate='" + omodel.HSSDate.ToShortDateString() + "'" + |
| | | ",HPayCusID=" + omodel.HPayCusID + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | ",HLinkMan='" + omodel.HLinkMan + "'" + |
| | | ",HLinkPhone='" + omodel.HLinkPhone + "'" + |
| | | " where HInterID=" + lngBillKey.ToString(); |
| | | |
| | | oCn.RunProc(mainSql); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //å é¤å表 |
| | |
| | | omodel.HInterID = lngBillKey; |
| | | foreach (Model.ClsXs_SeOrderBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Xs_SeOrderBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HUnitID,HQty,HPrice,HMoney,HTaxRate" + |
| | | ",HTaxMoney,HlineTotal,HlineTotalBB,HDate" + |
| | | ",HTaxPrice,HDiscountRate,HRelTaxPrice,HOutStockQty,HInvoiceQty" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + 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.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HTaxRate.ToString() + |
| | | "," + oSub.HTaxMoney.ToString() + "," + oSub.HlineTotal.ToString() + "," + oSub.HlineTotalBB.ToString() + ",'" + oSub.HDate.ToShortDateString() + "'" + |
| | | "," + oSub.HTaxPrice.ToString() + "," + oSub.HDiscountRate.ToString() + "," + oSub.HRelTaxPrice.ToString() + "," + oSub.HOutStockQty.ToString() + "," + oSub.HInvoiceQty.ToString() + |
| | | ") "); |
| | | //oCn.RunProc("Insert into Xs_SeOrderBillSub " + |
| | | // " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | // ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | // ",HMaterID,HUnitID,HQty,HPrice,HMoney,HTaxRate" + |
| | | // ",HTaxMoney,HlineTotal,HlineTotalBB,HDate" + |
| | | // ",HTaxPrice,HDiscountRate,HRelTaxPrice,HOutStockQty,HInvoiceQty" + |
| | | // ") values(" |
| | | // + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + 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.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HTaxRate.ToString() + |
| | | // "," + oSub.HTaxMoney.ToString() + "," + oSub.HlineTotal.ToString() + "," + oSub.HlineTotalBB.ToString() + ",'" + oSub.HDate.ToShortDateString() + "'" + |
| | | // "," + oSub.HTaxPrice.ToString() + "," + oSub.HDiscountRate.ToString() + "," + oSub.HRelTaxPrice.ToString() + "," + oSub.HOutStockQty.ToString() + "," + oSub.HInvoiceQty.ToString() + |
| | | // ") "); |
| | | |
| | | string subSql = "Insert into Xs_SeOrderBillSub" + |
| | | "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HUnitID,HQty,HPrice,HTaxPrice,HMoney" + |
| | | ",HDiscountRate,HRelTaxPrice,HTaxRate,HTaxMoney,HlineTotal,HlineTotalBB,HDate,HOutStockQty,HInvoiceQty,HRemark) " + |
| | | "values(" + |
| | | "" + omodel.HInterID + |
| | | "," + oSub.HEntryID + |
| | | "," + oSub.HSourceInterID + |
| | | "," + oSub.HSourceEntryID + |
| | | ",'" + (oSub.HSourceBillNo == null ? "" : oSub.HSourceBillNo) + |
| | | "','" + (oSub.HSourceBillType == null ? "" : oSub.HSourceBillType) + |
| | | "'," + oSub.HRelationQty + |
| | | "," + oSub.HRelationMoney + |
| | | "," + oSub.HMaterID + |
| | | "," + oSub.HUnitID + |
| | | "," + oSub.HQty + |
| | | "," + oSub.HPrice + |
| | | "," + oSub.HTaxPrice + |
| | | "," + oSub.HMoney + |
| | | "," + oSub.HDiscountRate + |
| | | "," + oSub.HRelTaxPrice + |
| | | "," + oSub.HTaxRate + |
| | | "," + oSub.HTaxMoney + |
| | | "," + oSub.HlineTotal + |
| | | "," + oSub.HlineTotalBB + |
| | | ",'" + oSub.HDate + |
| | | "'," + oSub.HOutStockQty + |
| | | "," + oSub.HInvoiceQty + |
| | | ",'" + oSub.HRemark + |
| | | "')"; |
| | | oCn.RunProc(subSql); |
| | | } |
| | | // |
| | | //foreach (Model.ClsXs_SeOrderBillSub oSub in DetailColl) |
| | |
| | | { |
| | | try |
| | | { |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | if (IsExistBillNo(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HBillNo, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew, omodel.HInterID)) |
| | | { |
| | | omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | } |
| | | if (IsExistMainID(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HInterID, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew)) |
| | | { |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | // |
| | | DataSet ds; |
| | | |
| | | ////å¾å°mainid |
| | | //omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | ////è¥MAINDIéå¤åéæ°è·å |
| | | //if (IsExistBillNo(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HBillNo, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew, omodel.HInterID)) |
| | | //{ |
| | | // omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true); |
| | | //} |
| | | //if (IsExistMainID(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HInterID, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew)) |
| | | //{ |
| | | // omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //} |
| | | //// |
| | | //oCn.BeginTran(); |
| | | ////主表 |
| | | //oCn.RunProc("Insert Into Xs_SeOrderBillMain " + |
| | | //"(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | //",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | //",HAddress,HSSID,HSellSID,HCusID,HCurID,HExRate,HSSDate" + |
| | | //",HEmpID,HManagerID,HDeptID,HExplanation,HInnerBillNo" + |
| | | //") " + |
| | | //" values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | //", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | //",'" + omodel.HAddress + "'," + omodel.HSSID.ToString() + "," + omodel.HSellSID.ToString() + "," + omodel.HCusID.ToString() + "," + omodel.HCurID.ToString() + "," + omodel.HExRate.ToString() + ",'" + omodel.HSSDate.ToShortDateString() + "'" + |
| | | //", " + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'"+ |
| | | //") "); |
| | | |
| | | oCn.BeginTran(); |
| | | //主表 |
| | | oCn.RunProc("Insert Into Xs_SeOrderBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HAddress,HSSID,HSellSID,HCusID,HCurID,HExRate,HSSDate" + |
| | | ",HEmpID,HManagerID,HDeptID,HExplanation,HInnerBillNo" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | ",'" + omodel.HAddress + "'," + omodel.HSSID.ToString() + "," + omodel.HSellSID.ToString() + "," + omodel.HCusID.ToString() + "," + omodel.HCurID.ToString() + "," + omodel.HExRate.ToString() + ",'" + omodel.HSSDate.ToShortDateString() + "'" + |
| | | ", " + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'"+ |
| | | ") "); |
| | | |
| | | //æ£æ¥ä¸»è¡¨å
ç æ¯å¦éå¤ï¼è¥éå¤åéæ°çæå¹¶ç»§ç»æ£æ¥ï¼ç´å°ä¸åéå¤ |
| | | while (true) |
| | | { |
| | | ds = oCn.RunProcReturn("select * from Xs_SeOrderBillMain where HInterID = " + omodel.HInterID, "Xs_SeOrderBillMain"); |
| | | if (ds != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | //æå
¥ä¸»è¡¨ |
| | | string mainSql = "Insert Into Xs_SeOrderBillMain" + |
| | | "(HYear,HPeriod,HBillType,HBillSubType,HBillStatus,HExplanation" + |
| | | ",HInterID,HBillNo,HDate,HInnerBillNo,HAddress,HDeptID,HCusID,HEmpID,HCurID,HExRate,HManagerID,HSellSID,HSSID,HSSDate,HPayCusID,HRemark,HOrgID,HMaker,HMakeDate,HLinkMan,HLinkPhone" + |
| | | ",HERPInterID,HERPBillType,HSALEORGID,HSALEGROUPID,HRECEIVEID,HSETTLEID,HCHARGEID,HHEADLOCID,HRECCONTACTID,HCORRESPONDORGID,HBUSINESSTYPE) " + |
| | | "values(" + |
| | | "" + omodel.HYear + |
| | | "," + omodel.HPeriod + |
| | | ",'" + this.BillType + |
| | | "','" + this.HBillSubType + |
| | | "'," + omodel.HBillStatus + |
| | | ",'" + omodel.HExplanation + |
| | | |
| | | "'," + omodel.HInterID + |
| | | ",'" + omodel.HBillNo + |
| | | "','" + omodel.HDate + |
| | | "','" + omodel.HInnerBillNo + |
| | | "','" + omodel.HAddress + |
| | | "'," + omodel.HDeptID + |
| | | "," + omodel.HCusID + |
| | | "," + omodel.HEmpID + |
| | | "," + omodel.HCurID + |
| | | "," + omodel.HExRate + |
| | | "," + omodel.HManagerID + |
| | | "," + omodel.HSellSID + |
| | | "," + omodel.HSSID + |
| | | ",'" + omodel.HSSDate + |
| | | "'," + omodel.HPayCusID + |
| | | ",'" + omodel.HRemark + |
| | | "'," + omodel.HOrgID + |
| | | ",'" + omodel.HMaker + |
| | | "','" + omodel.HMakeDate + |
| | | |
| | | "','" + omodel.HLinkMan + |
| | | "','" + omodel.HLinkPhone + |
| | | |
| | | "'," + omodel.HERPInterID + |
| | | ",'" + omodel.HERPBillType + |
| | | "'," + omodel.HSALEORGID + |
| | | "," + omodel.HSALEGROUPID + |
| | | "," + omodel.HRECEIVEID + |
| | | "," + omodel.HSETTLEID + |
| | | "," + omodel.HCHARGEID + |
| | | "," + omodel.HHEADLOCID + |
| | | "," + omodel.HRECCONTACTID + |
| | | "," + omodel.HCORRESPONDORGID + |
| | | ",'" + omodel.HBUSINESSTYPE + |
| | | "')"; |
| | | |
| | | oCn.RunProc(mainSql); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsXs_SeOrderBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Xs_SeOrderBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HUnitID,HQty,HPrice,HMoney,HTaxRate" + |
| | | ",HTaxMoney,HlineTotal,HlineTotalBB,HDate" + |
| | | ",HTaxPrice,HDiscountRate,HRelTaxPrice,HOutStockQty,HInvoiceQty" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + 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.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HTaxRate.ToString() + |
| | | "," + oSub.HTaxMoney.ToString() + "," + oSub.HlineTotal.ToString() + "," + oSub.HlineTotalBB.ToString() + ",'" + oSub.HDate.ToShortDateString() + "'" + |
| | | "," + oSub.HTaxPrice.ToString() + "," + oSub.HDiscountRate.ToString() + "," + oSub.HRelTaxPrice.ToString() + "," + oSub.HOutStockQty.ToString() + "," + oSub.HInvoiceQty.ToString() + |
| | | ") "); |
| | | //oCn.RunProc("Insert into Xs_SeOrderBillSub " + |
| | | // " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | // ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | // ",HMaterID,HUnitID,HQty,HPrice,HMoney,HTaxRate" + |
| | | // ",HTaxMoney,HlineTotal,HlineTotalBB,HDate" + |
| | | // ",HTaxPrice,HDiscountRate,HRelTaxPrice,HOutStockQty,HInvoiceQty" + |
| | | // ") values(" |
| | | // + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate.ToShortDateString() + "'," + 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.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HTaxRate.ToString() + |
| | | // "," + oSub.HTaxMoney.ToString() + "," + oSub.HlineTotal.ToString() + "," + oSub.HlineTotalBB.ToString() + ",'" + oSub.HDate.ToShortDateString() + "'" + |
| | | // "," + oSub.HTaxPrice.ToString() + "," + oSub.HDiscountRate.ToString() + "," + oSub.HRelTaxPrice.ToString() + "," + oSub.HOutStockQty.ToString() + "," + oSub.HInvoiceQty.ToString() + |
| | | // ") "); |
| | | string subSql = "Insert into Xs_SeOrderBillSub" + |
| | | "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HUnitID,HQty,HPrice,HTaxPrice,HMoney" + |
| | | ",HDiscountRate,HRelTaxPrice,HTaxRate,HTaxMoney,HlineTotal,HlineTotalBB,HDate,HOutStockQty,HInvoiceQty,HRemark) " + |
| | | "values(" + |
| | | "" + omodel.HInterID + |
| | | "," + oSub.HEntryID + |
| | | "," + oSub.HSourceInterID + |
| | | "," + oSub.HSourceEntryID + |
| | | ",'" + (oSub.HSourceBillNo==null?"":oSub.HSourceBillNo) + |
| | | "','" + (oSub.HSourceBillType==null?"":oSub.HSourceBillType) + |
| | | "'," + oSub.HRelationQty + |
| | | "," + oSub.HRelationMoney + |
| | | "," + oSub.HMaterID + |
| | | "," + oSub.HUnitID + |
| | | "," + oSub.HQty + |
| | | "," + oSub.HPrice + |
| | | "," + oSub.HTaxPrice + |
| | | "," + oSub.HMoney + |
| | | "," + oSub.HDiscountRate + |
| | | "," + oSub.HRelTaxPrice + |
| | | "," + oSub.HTaxRate + |
| | | "," + oSub.HTaxMoney + |
| | | "," + oSub.HlineTotal + |
| | | "," + oSub.HlineTotalBB + |
| | | ",'" + oSub.HDate + |
| | | "'," + oSub.HOutStockQty + |
| | | "," + oSub.HInvoiceQty + |
| | | ",'" + oSub.HRemark + |
| | | "')"; |
| | | oCn.RunProc(subSql); |
| | | } |
| | | // |
| | | //foreach (Model.ClsXs_SeOrderBillSub oSub in DetailColl) |
| | |
| | | omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]); |
| | | omodel.HInnerBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo"]); |
| | | omodel.HSSDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HSSDate"]); |
| | | omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]); |
| | | omodel.HPayCusID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPayCusID"]); |
| | | |
| | | omodel.HLinkMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HLinkMan"]); |
| | | omodel.HLinkPhone = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HLinkPhone"]); |
| | | // |
| | | |
| | | |
| | | //å¾ªç¯ |
| | | DataSet DsSub ; |
| | | DsSub = oCn.RunProcReturn("Select * from Xs_SeOrderBillSub Where HInterID=" + lngBillKey.ToString(), "Xs_SeOrderBillSub"); |