| | |
| | | string ssSQL = "Insert into CB_ChangeMoneyBillSub " + |
| | | "(HInterID,HBillNo_bak,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HUnitID,HQty,HQtyMust,HPrice,HMoney,HWHID ,HSCWHID,HSPID,HSCSPID,HBatchNo)" + |
| | | ",HMaterID,HCostItemID,HDeptID,HMoney)" + |
| | | "values('" + omodel.HInterID + "','" + omodel.HBillNo + "','" + 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.HQtyMust.ToString() + "','" + oSub.HPrice.ToString() + "','" + oSub.HMoney.ToString() + "','" + oSub.HWHID.ToString() + |
| | | "','" + oSub.HSCWHID.ToString() + "','" + oSub.HSPID.ToString() + "','" + oSub.HSCSPID.ToString() + "','" + oSub.HBatchNo.ToString() + "') "; |
| | | "','" + oSub.HMaterID.ToString() + "','" + oSub.HCostItemID.ToString() + "','" + oSub.HDeptID.ToString() + "','" + oSub.HMoney.ToString() + "') "; |
| | | oCn.RunProc(ssSQL); |
| | | } |
| | | // |
| | |
| | | "','" + omodel.HBillNo.ToString() + "','" + omodel.HBillStatus + "','" + omodel.HCheckItemNowID + "','" + omodel.HCheckItemNextID + "','" + omodel.HCheckFlowID + "','" + omodel.HRemark + |
| | | "','" +""+ "','" + "" + "','" + omodel.HBackRemark + "','"+DBUtility.ClsPub.CurUserName+"',getdate(),'"+ omodel.HMainSourceBillType + "','" + omodel.HMainSourceInterID.ToString() + "','" + omodel.HMainSourceEntryID.ToString() + |
| | | "','" + omodel.HMainSourceBillNo.ToString() + "','" + omodel.HPrintQty.ToString() + "','" + omodel.HSupID.ToString() + "','" + omodel.HWHID.ToString() + "','" + omodel.HSCWHID + "','" + omodel.HEmpID + |
| | | "','" + omodel.HManagerID.ToString() + "','" + omodel.HSecManagerID.ToString() + "','" + omodel.HKeeperID.ToString() + "','" + omodel.HDeptID.ToString() + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + |
| | | "') "; |
| | | |
| | | oCn.RunProc(sSQL); |
| | | "','" + omodel.HManagerID.ToString() + "','" + omodel.HSecManagerID.ToString() + "','" + omodel.HKeeperID.ToString() + "','" + omodel.HDeptID.ToString() + "','" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" + |
| | | ") "; |
| | | |
| | | oCn.RunProc(sSQL); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsCB_ChangeMoneyBillSub oSub in DetailColl) |
| | | { |
| | | string ssSQL = "Insert into CB_ChangeMoneyBillSub " + |
| | | "(HInterID,HBillNo_bak,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HUnitID,HQty,HQtyMust,HPrice,HMoney,HWHID ,HSCWHID,HSPID,HSCSPID,HBatchNo)" + |
| | | ",HMaterID,HCostItemID,HDeptID,HMoney)" + |
| | | "values('" + omodel.HInterID + "','" + omodel.HBillNo + "','" + oSub.HEntryID.ToString() + "','" + oSub.HCloseMan + "','" + getdate + "','" + 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.HQtyMust.ToString() + "','" + oSub.HPrice.ToString() + "','" + oSub.HMoney.ToString() + "','" + oSub.HWHID.ToString() + |
| | | "','" + oSub.HSCWHID.ToString() + "','" + oSub.HSPID.ToString() + "','" + oSub.HSCSPID.ToString() + "','" + oSub.HBatchNo.ToString() + "') "; |
| | | "','" + oSub.HMaterID.ToString() + "','" + oSub.HCostItemID.ToString() + "','" + oSub.HDeptID.ToString() + "','" + oSub.HMoney.ToString() + "') "; |
| | | oCn.RunProc(ssSQL); |
| | | } |
| | | //1 |
| | |
| | | oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]); |
| | | //=================================================== |
| | | oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]); |
| | | oSub.HUnitID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HUnitID"]); |
| | | oSub.HQtyMust = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HQtyMust"]); |
| | | oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]); |
| | | oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"]); |
| | | oSub.HCostItemID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HCostItemID"]); |
| | | oSub.HDeptID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HDeptID"]); |
| | | oSub.HMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HMoney"]); |
| | | oSub.HWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWHID"]); |
| | | oSub.HSCWHID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCWHID"]); |
| | | oSub.HSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSPID"]); |
| | | oSub.HSCSPID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSCSPID"]); |
| | | oSub.HBatchNo = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HBatchNo"]); |
| | | DetailColl.Add(oSub); |
| | | } |
| | | sReturn = "æ¾ç¤ºåæ®æåï¼"; |