| | |
| | | |
| | | oCn.BeginTran(); |
| | | string mainSql = "UpDate Xs_SeOrderBillMain set " + |
| | | " HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== |
| | | " HBillSubType='" + omodel.HBillSubType + "'" + |
| | | ",HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== |
| | | ",HDate='" + omodel.HDate + "'" + |
| | | ",HYear='" + omodel.HYear.ToString() + "'" + |
| | | ",HPeriod='" + omodel.HPeriod.ToString() + "'" + |
| | |
| | | // ") "); |
| | | |
| | | string subSql = "Insert into Xs_SeOrderBillSub" + |
| | | "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HUnitID,HQty,HPrice,HTaxPrice,HMoney" + |
| | | "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationQty_SellOutCheck,HRelationMoney_SellOutCheck,HRelationQty_ICMO,HRelationQty_SellBack,HRelationQty_SellBackCheck,HRelationMoney,HMaterID,HUnitID,HQty,HPrice,HTaxPrice,HMoney" + |
| | | ",HDiscountRate,HRelTaxPrice,HTaxRate,HTaxMoney,HlineTotal,HlineTotalBB,HDate,HOutStockQty,HInvoiceQty,HRemark,HOrderLevID" + |
| | | ",HCusMaterNumber,HCusModel,HCusMaterName,HisStockGoods) " + |
| | | "values(" + |
| | |
| | | ",'" + (oSub.HSourceBillNo == null ? "" : oSub.HSourceBillNo) + |
| | | "','" + (oSub.HSourceBillType == null ? "" : oSub.HSourceBillType) + |
| | | "'," + oSub.HRelationQty + |
| | | "," + oSub.HRelationQty_SellOutCheck + |
| | | "," + oSub.HRelationMoney_SellOutCheck + |
| | | "," + oSub.HRelationQty_ICMO + |
| | | "," + oSub.HRelationQty_SellBack + |
| | | "," + oSub.HRelationQty_SellBackCheck + |
| | | "," + oSub.HRelationMoney + |
| | | "," + oSub.HMaterID + |
| | | "," + oSub.HUnitID + |
| | |
| | | "" + omodel.HYear + |
| | | "," + omodel.HPeriod + |
| | | ",'" + this.BillType + |
| | | "','" + this.HBillSubType + |
| | | "','" + omodel.HBillSubType + |
| | | "'," + omodel.HBillStatus + |
| | | ",'" + omodel.HExplanation + |
| | | |
| | |
| | | // "," + 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" + |
| | | "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationQty_SellOutCheck,HRelationMoney_SellOutCheck,HRelationQty_ICMO,HRelationQty_SellBack,HRelationQty_SellBackCheck,HRelationMoney,HMaterID,HUnitID,HQty,HPrice,HTaxPrice,HMoney" + |
| | | ",HDiscountRate,HRelTaxPrice,HTaxRate,HTaxMoney,HlineTotal,HlineTotalBB,HDate,HOutStockQty,HInvoiceQty,HRemark,HOrderLevID" + |
| | | ",HCusMaterNumber,HCusModel,HCusMaterName,HisStockGoods) " + |
| | | "values(" + |
| | |
| | | ",'" + (oSub.HSourceBillNo==null?"":oSub.HSourceBillNo) + |
| | | "','" + (oSub.HSourceBillType==null?"":oSub.HSourceBillType) + |
| | | "'," + oSub.HRelationQty + |
| | | "," + oSub.HRelationQty_SellOutCheck + |
| | | "," + oSub.HRelationMoney_SellOutCheck + |
| | | "," + oSub.HRelationQty_ICMO + |
| | | "," + oSub.HRelationQty_SellBack + |
| | | "," + oSub.HRelationQty_SellBackCheck + |
| | | "," + oSub.HRelationMoney + |
| | | "," + oSub.HMaterID + |
| | | "," + oSub.HUnitID + |
| | |
| | | oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]); |
| | | oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim(); |
| | | //=================================================== |
| | | oSub.HRelationQty_SellOutCheck = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty_SellOutCheck"]); |
| | | oSub.HRelationMoney_SellOutCheck = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney_SellOutCheck"]); |
| | | oSub.HRelationQty_ICMO = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty_ICMO"]); |
| | | oSub.HRelationQty_SellBack = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty_SellBack"]); |
| | | oSub.HRelationQty_SellBackCheck = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty_SellBackCheck"]); |
| | | //=================================================== |
| | | oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]); |
| | | oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]); |
| | | oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]); |