| | |
| | | oCn.BeginTran(); |
| | | //æ´æ°ä¸»è¡¨ |
| | | string mainSql = "update Cg_POStockInChangeBillMain set " + |
| | | "HDate = '" + omodel.HDate + "'" + |
| | | " HBillNo = '" + omodel.HBillNo + "'"+ |
| | | ",HDate = '" + omodel.HDate + "'" + |
| | | ", HYear = " + omodel.HDate.Year + |
| | | ", HPeriod = " + omodel.HDate.Month + |
| | | ", HExplanation = '" + omodel.HExplanation + "'" + |
| | |
| | | " where HInterID = " + omodel.HInterID; |
| | | oCn.RunProc(mainSql); |
| | | //å é¤å
³è |
| | | //DeleteRelation(ref sReturn, lngBillKey); |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //å é¤å表 |
| | | DeleteBillSub(lngBillKey); |
| | | |
| | |
| | | { |
| | | string subSql = "insert into Cg_POStockInChangeBillSub " + |
| | | "(HInterID,HEntryID,HBillNo_bak,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HUnitID,HQty,HTaxPrice_Old,HTaxPrice_New,HMoney_New) " + |
| | | ",HMaterID,HUnitID,HQty,HTaxPrice_Old,HTaxPrice_New,HMoney_New,HTaxRate_Old,HTaxRate_New) " + |
| | | " values(" + |
| | | "" + omodel.HInterID.ToString() + |
| | | "," + oSub.HEntryID.ToString() + |
| | |
| | | "," + oSub.HTaxPrice_Old + "" + |
| | | "," + oSub.HTaxPrice_New + "" + |
| | | "," + oSub.HMoney_New + "" + |
| | | "," + oSub.HTaxRate_Old + "" + |
| | | "," + oSub.HTaxRate_New + "" + |
| | | ")"; |
| | | oCn.RunProc(subSql); |
| | | } |
| | | //æ°å¢å
³è |
| | | //AddNewRelation(ref sReturn, lngBillKey); |
| | | AddNewRelation(ref sReturn, lngBillKey); |
| | | |
| | | //=========================ä¿ååæ§å¶ |
| | | DataSet ds2 = oCn.RunProcReturn("h_p_Cg_POStockInChangeBill_AfterSaveCtrl " + omodel.HInterID.ToString() + ", '" + omodel.HBillNo + "',1 ", "h_p_Cg_POStockInChangeBill_AfterSaveCtrl"); |
| | |
| | | { |
| | | string subSql = "insert into Cg_POStockInChangeBillSub " + |
| | | "(HInterID,HEntryID,HBillNo_bak,HRemark,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HUnitID,HQty,HTaxPrice_Old,HTaxPrice_New,HMoney_New) " + |
| | | ",HMaterID,HUnitID,HQty,HTaxPrice_Old,HTaxPrice_New,HMoney_New,HTaxRate_Old,HTaxRate_New) " + |
| | | " values(" + |
| | | "" + omodel.HInterID.ToString() + |
| | | "," + oSub.HEntryID.ToString() + |
| | |
| | | "," + oSub.HTaxPrice_Old + "" + |
| | | "," + oSub.HTaxPrice_New + "" + |
| | | "," + oSub.HMoney_New + "" + |
| | | "," + oSub.HTaxRate_Old + "" + |
| | | "," + oSub.HTaxRate_New + "" + |
| | | ")"; |
| | | oCn.RunProc(subSql); |
| | | } |
| | |
| | | oSub.HTaxPrice_Old = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HTaxPrice_Old"]); |
| | | oSub.HTaxPrice_New = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HTaxPrice_New"]); |
| | | oSub.HMoney_New = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HMoney_New"]); |
| | | oSub.HTaxRate_Old = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HTaxRate_Old"]); |
| | | oSub.HTaxRate_New = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HTaxRate_New"]); |
| | | |
| | | DetailColl.Add(oSub); |
| | | } |