Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
| | |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey="Sc_MouldStockBillMain"; |
| | | base.MvarReportTitle = "模å
·å
¥åºå"; |
| | | base.BillType="3795"; |
| | | base.HBillSubType = "3795"; |
| | | base.MvarReportTitle = "模å
·éè´å
¥åºå"; |
| | | base.BillType="3801"; |
| | | base.HBillSubType = "3801"; |
| | | |
| | | } |
| | | |
| | |
| | | { |
| | | DetailColl = null; |
| | | } |
| | | |
| | | |
| | | #endregion èªå®ä¹æ¹æ³ |
| | | |
| | | //ä¿ååæ§å¶ |
| | | public bool BeforeSave(Int64 HInterID, string HBillNo, Int64 HSecManagerID, Int64 HKeeperID, Int64 HSupID, Int64 OperationType, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | DataSet Ds = oCn.RunProcReturn("Exec h_p_Sc_MouldProdInBill_BeforeSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + HSecManagerID.ToString() + "," + HKeeperID.ToString() + "," + HSupID.ToString() + "," + OperationType.ToString(), "h_p_Sc_MouldProdInBill_BeforeSaveCtrl"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sReturn = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //ä¿ååæ§å¶ |
| | | public bool AfterSave(Int64 HInterID, string HBillNo, Int64 OperationType, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | DataSet Ds = oCn.RunProcReturn("Exec h_p_Sc_MouldProdInBill_AfterSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Sc_MouldProdInBill_AfterSaveCtrl"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sReturn = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //ä¿®æ¹åæ® |
| | | public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | |
| | | { |
| | | // |
| | | oCn.BeginTran(); |
| | | //ä¿ååæ§å¶ |
| | | if (!BeforeSave(lngBillKey, omodel.HBillNo, omodel.HSecManagerID, omodel.HKeeperID, omodel.HSupID, 2, ref sReturn)) |
| | | { |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //æ´æ°ä¸»è¡¨ |
| | | oCn.RunProc("UpDate Sc_MouldStockBillMain set " + |
| | | " HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== |
| | |
| | | ",HUpDateDate=getdate()" + |
| | | //======================================== |
| | | ",HSupID=" + omodel.HSupID.ToString() + |
| | | ",HWHID=" + omodel.HWHID.ToString() + |
| | | ",HSCWHID=" + omodel.HSCWHID.ToString() + |
| | | ",HEmpID=" + omodel.HEmpID.ToString() + |
| | | ",HManagerID=" + omodel.HManagerID.ToString() + |
| | | ",HSecManagerID=" + omodel.HSecManagerID.ToString() + |
| | | ",HKeeperID=" + omodel.HKeeperID.ToString() + |
| | | ",HDeptID=" + omodel.HDeptID.ToString() + |
| | | ",HWHID=" + omodel.HWHID.ToString() + |
| | | ",HSCWHID=" + omodel.HSCWHID.ToString() + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HRedBlueFlag=" + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ",HStockOrgID=" + omodel.HSTOCKORGID.ToString() + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | foreach (Model.ClsSc_MouldStockBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Sc_MouldStockBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + |
| | | ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" + |
| | | ",HDesignLife,HLeaveLife,HUseLife" + |
| | | ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" + |
| | | ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + |
| | | " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" + |
| | | ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HBatchNo" + |
| | | ",HQtyMust,HQtyRel,HQty,HPrice,HMoney,HDesignLife" + |
| | | ",HLeaveLife,HUseLife,HUseLifeQty,HNewLifeQty,HWHID,HSCWHID" + |
| | | ",HSPID,HSCSPID,HSPGroupID,HBarCode,HCorrespondentTypeID,HCorrespondentID" + |
| | | ",HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + |
| | | ",HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID" + |
| | | ") 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.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + |
| | | "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() + |
| | | "," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() + |
| | | "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" + |
| | | "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'"+ |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'" + |
| | | "," + oSub.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + ",'" + oSub.HBatchNo + "'" + |
| | | "," + oSub.HQtyMust.ToString() + "," + oSub.HQtyRel.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HDesignLife.ToString() + |
| | | "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() + "," + oSub.HUseLifeQty.ToString() + "," + oSub.HNewLifeQty.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + |
| | | "," + oSub.HSPID.ToString() + "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBarCode + "'," + oSub.HCorrespondentTypeID.ToString() + "," + oSub.HCorrespondentID.ToString() + |
| | | "," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + |
| | | "," + oSub.HStockOrgID.ToString() + "," + oSub.HOWNERID.ToString() + "," + oSub.HOtherOrgID.ToString() + ",'" + oSub.HOWNERTYPEID + "'" + |
| | | ") "); |
| | | } |
| | | // |
| | | //foreach (Model.ClsSc_MouldProdInBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Sc_MouldProdInBill_Qty " + oSub.HICMOInterID, ""); |
| | | // if (Ds.Tables[0].Rows.Count == 0) |
| | | // return; |
| | | // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y") |
| | | // { |
| | | // sReturn = "æ±æ¥æ°éè¶
è¿è®¡åæ°éï¼ä¸å
许ä¿å"; |
| | | // return false; |
| | | // } |
| | | //} |
| | | sReturn = "ä¿®æ¹åæ®æåï¼"; |
| | | //ä¿ååæ§å¶ |
| | | if (!AfterSave(lngBillKey, omodel.HBillNo, 2, ref sReturn)) |
| | | { |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | sReturn = "åæ®å·ï¼" + omodel.HBillNo + " ä¿®æ¹æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | //è·åç³»ç»åæ° |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(omodel.HSTOCKORGID, ref sReturn) == false) |
| | | { |
| | | sReturn = "è·åç³»ç»åæ°å¤±è´¥ï¼ " + sReturn; |
| | | return false; |
| | | } |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | if (omodel.HInterID == 0) |
| | | { |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | //ä¿ååæ§å¶ |
| | | if (!BeforeSave(omodel.HInterID, omodel.HBillNo, omodel.HSecManagerID, omodel.HKeeperID, omodel.HSupID, 1, ref sReturn)) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | oCn.BeginTran(); |
| | | //主表 |
| | | oCn.RunProc("Insert Into Sc_MouldStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | ",HProcID"+ |
| | | ",HSupID,HSupTypeID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HWHID,HSCWHID,HRedBlueFlag" + |
| | | ",HExplanation,HInnerBillNo,HStockOrgID" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "'" + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate.ToShortDateString() + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | ", " + omodel.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() + |
| | | ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ","+ '0' + |
| | | ", " + omodel.HSupID.ToString() + "," + omodel.HSupTypeID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() + |
| | | ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HSTOCKORGID.ToString() + |
| | | ") "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsSc_MouldStockBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Sc_MouldStockBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + |
| | | ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" + |
| | | ",HDesignLife,HLeaveLife,HUseLife" + |
| | | ",HSCSPID,HSPGroupID,HBatchNo,HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo" + |
| | | ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + |
| | | ") 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.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + |
| | | "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() + |
| | | "," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() + |
| | | "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'" + |
| | | "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + |
| | | ") "); |
| | | " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" + |
| | | ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HBatchNo" + |
| | | ",HQtyMust,HQtyRel,HQty,HPrice,HMoney,HDesignLife" + |
| | | ",HLeaveLife,HUseLife,HUseLifeQty,HNewLifeQty,HWHID,HSCWHID" + |
| | | ",HSPID,HSCSPID,HSPGroupID,HBarCode,HCorrespondentTypeID,HCorrespondentID" + |
| | | ",HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + |
| | | ",HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'" + |
| | | "," + oSub.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + ",'" + oSub.HBatchNo + "'" + |
| | | "," + oSub.HQtyMust.ToString() + "," + oSub.HQtyRel.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HDesignLife.ToString() + |
| | | "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() + "," + oSub.HUseLifeQty.ToString() + "," + oSub.HNewLifeQty.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + |
| | | "," + oSub.HSPID.ToString() + "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBarCode + "'," + oSub.HCorrespondentTypeID.ToString() + "," + oSub.HCorrespondentID.ToString() + |
| | | "," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + |
| | | "," + oSub.HStockOrgID.ToString() + "," + oSub.HOWNERID.ToString() + "," + oSub.HOtherOrgID.ToString() + ",'" + oSub.HOWNERTYPEID + "'" + |
| | | ") "); |
| | | } |
| | | |
| | | //foreach (Model.ClsSc_MouldProdInBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Sc_MouldProdInBill_Qty " + oSub.HICMOInterID, ""); |
| | | // if (Ds.Tables[0].Rows.Count == 0) |
| | | // return; |
| | | // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y") |
| | | // { |
| | | // sReturn = "æ±æ¥æ°éè¶
è¿è®¡åæ°éï¼ä¸å
许ä¿å"; |
| | | // return false; |
| | | // } |
| | | //} |
| | | // |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | //ä¿ååæ§å¶ |
| | | if (!AfterSave(omodel.HInterID, omodel.HBillNo, 1, ref sReturn)) |
| | | { |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | |
| | | if (oSystemParameter.omodel.Sc_MouldProdInBill_AutoCheck.ToUpper() == "Y") //ç³»ç»åæ° èªå¨å®¡æ ¸ |
| | | { |
| | | //å®¡æ ¸åæ® |
| | | oCn.RunProc("Update Sc_MouldStockBillMain Set HChecker='" + DBUtility.ClsPub.CurUserName + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + omodel.HInterID.ToString()); |
| | | sReturn = "åæ®å·ï¼" + omodel.HBillNo + " æ°å¢å®¡æ ¸æåï¼"; |
| | | } |
| | | else |
| | | { |
| | | sReturn = "åæ®å·ï¼" + omodel.HBillNo + " æ°å¢æåï¼"; |
| | | } |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | |
| | | { |
| | | DetailColl = null; |
| | | } |
| | | |
| | | |
| | | #endregion èªå®ä¹æ¹æ³ |
| | | |
| | | //ä¿ååæ§å¶ |
| | | public bool BeforeSave(Int64 HInterID, string HBillNo, Int64 HSecManagerID, Int64 HKeeperID, Int64 HSupID, Int64 OperationType, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | DataSet Ds = oCn.RunProcReturn("Exec h_p_Sc_MouldRepairOutBill_BeforeSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + HSecManagerID.ToString() + "," + HKeeperID.ToString() + "," + HSupID.ToString() + "," + OperationType.ToString(), "h_p_Sc_MouldRepairOutBill_BeforeSaveCtrl"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sReturn = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //ä¿ååæ§å¶ |
| | | public bool AfterSave(Int64 HInterID, string HBillNo, Int64 OperationType, ref string sReturn) |
| | | { |
| | | try |
| | | { |
| | | DataSet Ds = oCn.RunProcReturn("Exec h_p_Sc_MouldRepairOutBill_AfterSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Sc_MouldRepairOutBill_AfterSaveCtrl"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sReturn = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw (e); |
| | | } |
| | | } |
| | | |
| | | //ä¿®æ¹åæ® |
| | | public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) |
| | | { |
| | |
| | | { |
| | | // |
| | | oCn.BeginTran(); |
| | | //ä¿ååæ§å¶ |
| | | if (!BeforeSave(lngBillKey, omodel.HBillNo, omodel.HSecManagerID, omodel.HKeeperID, omodel.HSupID, 2, ref sReturn)) |
| | | { |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //æ´æ°ä¸»è¡¨ |
| | | oCn.RunProc("UpDate Sc_MouldStockBillMain set " + |
| | | " HBillNo='" + omodel.HBillNo + "'" + //åºå®èµå¼=============== |
| | |
| | | ",HUpDateDate=getdate()" + |
| | | //======================================== |
| | | ",HSupID=" + omodel.HSupID.ToString() + |
| | | ",HWHID=" + omodel.HWHID.ToString() + |
| | | ",HSCWHID=" + omodel.HSCWHID.ToString() + |
| | | ",HEmpID=" + omodel.HEmpID.ToString() + |
| | | ",HManagerID=" + omodel.HManagerID.ToString() + |
| | | ",HSecManagerID=" + omodel.HSecManagerID.ToString() + |
| | | ",HKeeperID=" + omodel.HKeeperID.ToString() + |
| | | ",HDeptID=" + omodel.HDeptID.ToString() + |
| | | ",HWHID=" + omodel.HWHID.ToString() + |
| | | ",HSCWHID=" + omodel.HSCWHID.ToString() + |
| | | ",HExplanation='" + omodel.HExplanation + "'" + |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HRepairType='"+omodel.HRepairType+"'"+ |
| | | ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + |
| | | ",HRedBlueFlag=" + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ",HStockOrgID=" + omodel.HSTOCKORGID.ToString() + |
| | | " where HInterID=" + lngBillKey.ToString()); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | |
| | | foreach (Model.ClsSc_MouldStockBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Sc_MouldStockBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + |
| | | ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" + |
| | | ",HDesignLife,HLeaveLife,HUseLife,HNowModel,HNowLife" + |
| | | ",HSCSPID,HSPGroupID,HBatchNo" + |
| | | ",HNewModel,HLastProdModel,HWallThickness,HHardness,HDiameter,HQtyRel" + |
| | | ",HMouldType,HInitModel,HInitDesignLife,HLifeUnitID" + |
| | | " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" + |
| | | ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HBatchNo" + |
| | | ",HQtyMust,HQtyRel,HQty,HPrice,HMoney,HDesignLife" + |
| | | ",HLeaveLife,HUseLife,HUseLifeQty,HNewLifeQty,HWHID,HSCWHID" + |
| | | ",HSPID,HSCSPID,HSPGroupID,HBarCode,HCorrespondentTypeID,HCorrespondentID" + |
| | | ",HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + |
| | | ",HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID" + |
| | | ",HNowModel,HNowLife,HNewModel,HLastProdModel,HWallThickness,HHardness" + |
| | | ",HDiameter,HMouldType,HInitModel,HInitDesignLife,HLifeUnitID" + |
| | | ") 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.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + |
| | | "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() + |
| | | "," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() + ",'" + oSub.HNowModel + "'," + oSub.HNowLife.ToString() + |
| | | "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "'" + |
| | | ",'" + oSub.HNewModel + "','" + oSub.HLastProdModel + "','" + oSub.HWallThickness + "','" + oSub.HHardness + "','" + oSub.HDiameter + "'," + oSub.HQtyRel.ToString() + |
| | | "," + oSub.HMouldType.ToString() + ",'" + oSub.HInitModel + "'," + oSub.HInitDesignLife.ToString() + "," + oSub.HLifeUnitID.ToString() + |
| | | ") "); |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'" + |
| | | "," + oSub.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + ",'" + oSub.HBatchNo + "'" + |
| | | "," + oSub.HQtyMust.ToString() + "," + oSub.HQtyRel.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HDesignLife.ToString() + |
| | | "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() + "," + oSub.HUseLifeQty.ToString() + "," + oSub.HNewLifeQty.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + |
| | | "," + oSub.HSPID.ToString() + "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBarCode + "'," + oSub.HCorrespondentTypeID.ToString() + "," + oSub.HCorrespondentID.ToString() + |
| | | "," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + |
| | | "," + oSub.HStockOrgID.ToString() + "," + oSub.HOWNERID.ToString() + "," + oSub.HOtherOrgID.ToString() + ",'" + oSub.HOWNERTYPEID + "'" + |
| | | ",'" + oSub.HNowModel + "'," + oSub.HNowLife.ToString() + ",'" + oSub.HNewModel + "','" + oSub.HLastProdModel + "','" + oSub.HWallThickness + "','" + oSub.HHardness + "'" + |
| | | ",'" + oSub.HDiameter + "'," + oSub.HMouldType.ToString() + ",'" + oSub.HInitModel + "'," + oSub.HInitDesignLife.ToString() + "," + oSub.HLifeUnitID.ToString() + |
| | | ") "); |
| | | |
| | | oCn.RunProc("exec h_p_Sc_MouldFileChangeStatus " + oSub.HMaterID.ToString() + ",'" + oSub.HNowModel.ToString() + "'," + oSub.HNowLife.ToString() + ",'æ¹å¶ä¸'"); |
| | | } |
| | | // |
| | | //oCn.RunProcReturn("exec h_p_Sc_MouldFileChangeStatus " + omodel.HInterID.ToString() + ",'æ¹å¶ä¸'", "gy_czygl"); |
| | | //foreach (Model.ClsSc_MouldStockBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Sc_MouldRepairOutBill_Qty " + oSub.HICMOInterID, ""); |
| | | // if (Ds.Tables[0].Rows.Count == 0) |
| | | // return; |
| | | // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y") |
| | | // { |
| | | // sReturn = "æ±æ¥æ°éè¶
è¿è®¡åæ°éï¼ä¸å
许ä¿å"; |
| | | // return false; |
| | | // } |
| | | //} |
| | | DataSet Ds; |
| | | foreach (Model.ClsSc_MouldStockBillSub oSub in DetailColl) |
| | | { |
| | |
| | | return false; |
| | | } |
| | | } |
| | | sReturn = "ä¿®æ¹åæ®æåï¼"; |
| | | //ä¿ååæ§å¶ |
| | | if (!AfterSave(lngBillKey, omodel.HBillNo, 2, ref sReturn)) |
| | | { |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | sReturn = "åæ®å·ï¼" + omodel.HBillNo + " ä¿®æ¹æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | |
| | | { |
| | | try |
| | | { |
| | | //è·åç³»ç»åæ° |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | if (oSystemParameter.ShowBillByOrgID(omodel.HSTOCKORGID, ref sReturn) == false) |
| | | { |
| | | sReturn = "è·åç³»ç»åæ°å¤±è´¥ï¼ " + sReturn; |
| | | return false; |
| | | } |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | if (omodel.HInterID == 0) |
| | | { |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | //ä¿ååæ§å¶ |
| | | if (!BeforeSave(omodel.HInterID, omodel.HBillNo, omodel.HSecManagerID, omodel.HKeeperID, omodel.HSupID, 1, ref sReturn)) |
| | | { |
| | | return false; |
| | | } |
| | | |
| | | oCn.BeginTran(); |
| | | //主表 |
| | | oCn.RunProc("Insert Into Sc_MouldStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" + |
| | | "" + |
| | | ") " + |
| | | " 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.HSupID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() + |
| | | ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ") "); |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + |
| | | ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + |
| | | ",HSupID,HSupTypeID,HEmpID,HManagerID,HSecManagerID" + |
| | | ",HKeeperID,HDeptID,HWHID,HSCWHID,HRedBlueFlag" + |
| | | ",HExplanation,HInnerBillNo,HStockOrgID" + |
| | | ") " + |
| | | " values('" + this.BillType + "','" + this.HBillSubType + "'," + omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate.ToShortDateString() + "'" + |
| | | ", " + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + |
| | | ", " + omodel.HSupID.ToString() + "," + omodel.HSupTypeID.ToString() + "," + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HSecManagerID.ToString() + |
| | | ", " + omodel.HKeeperID.ToString() + "," + omodel.HDeptID.ToString() + "," + omodel.HWHID.ToString() + "," + omodel.HSCWHID.ToString() + "," + DBUtility.ClsPub.BoolToString(omodel.HRedBlueFlag) + |
| | | ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'," + omodel.HSTOCKORGID.ToString() + |
| | | ") "); |
| | | //æå
¥å表 |
| | | foreach (Model.ClsSc_MouldStockBillSub oSub in DetailColl) |
| | | { |
| | | oCn.RunProc("Insert into Sc_MouldStockBillSub " + |
| | | " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + |
| | | ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HQtyMust" + |
| | | ",HQty,HPrice,HMoney,HWHID,HSCWHID,HSPID" + |
| | | ",HDesignLife,HLeaveLife,HUseLife,HNewLifeQty" + |
| | | ",HSCSPID,HSPGroupID,HBatchNo,HBackFlag,HNowModel,HNowLife" + |
| | | ",HNewModel,HLastProdModel,HWallThickness,HHardness,HDiameter,HQtyRel" + |
| | | ",HMouldType,HInitModel,HInitDesignLife,HLifeUnitID" + |
| | | ") 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.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQtyMust.ToString() + |
| | | "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + "," + oSub.HSPID.ToString() + |
| | | "," + oSub.HDesignLife.ToString() + "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() + "," + oSub.HNewLifeQty.ToString() + |
| | | "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBatchNo + "','" + oSub.HBackFlag + "','" + oSub.HNowModel + "'," + oSub.HNowLife.ToString() + |
| | | ",'" + oSub.HNewModel + "','" + oSub.HLastProdModel + "','" + oSub.HWallThickness + "','" + oSub.HHardness + "','" + oSub.HDiameter + "'," + oSub.HQtyRel.ToString() + |
| | | "," + oSub.HMouldType.ToString() + ",'" + oSub.HInitModel + "'," + oSub.HInitDesignLife.ToString() + "," + oSub.HLifeUnitID.ToString() + |
| | | ") "); |
| | | " (HInterID,HEntryID,HRemark,HRelationQty,HRelationMoney" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType" + |
| | | ",HMaterID,HPropertyID,HSecUnitID,HSecUnitRate,HUnitID,HBatchNo" + |
| | | ",HQtyMust,HQtyRel,HQty,HPrice,HMoney,HDesignLife" + |
| | | ",HLeaveLife,HUseLife,HUseLifeQty,HNewLifeQty,HWHID,HSCWHID" + |
| | | ",HSPID,HSCSPID,HSPGroupID,HBarCode,HCorrespondentTypeID,HCorrespondentID" + |
| | | ",HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo,HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo" + |
| | | ",HStockOrgID,HOWNERID,HOtherOrgID,HOWNERTYPEID" + |
| | | ",HNowModel,HNowLife,HNewModel,HLastProdModel,HWallThickness,HHardness" + |
| | | ",HDiameter,HMouldType,HInitModel,HInitDesignLife,HLifeUnitID" + |
| | | ") values(" |
| | | + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'" + |
| | | "," + oSub.HMaterID.ToString() + "," + oSub.HPropertyID.ToString() + "," + oSub.HSecUnitID.ToString() + "," + oSub.HSecUnitRate.ToString() + "," + oSub.HUnitID.ToString() + ",'" + oSub.HBatchNo + "'" + |
| | | "," + oSub.HQtyMust.ToString() + "," + oSub.HQtyRel.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HDesignLife.ToString() + |
| | | "," + oSub.HLeaveLife.ToString() + "," + oSub.HUseLife.ToString() + "," + oSub.HUseLifeQty.ToString() + "," + oSub.HNewLifeQty.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSCWHID.ToString() + |
| | | "," + oSub.HSPID.ToString() + "," + oSub.HSCSPID.ToString() + "," + oSub.HSPGroupID.ToString() + ",'" + oSub.HBarCode + "'," + oSub.HCorrespondentTypeID.ToString() + "," + oSub.HCorrespondentID.ToString() + |
| | | "," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'" + |
| | | "," + oSub.HStockOrgID.ToString() + "," + oSub.HOWNERID.ToString() + "," + oSub.HOtherOrgID.ToString() + ",'" + oSub.HOWNERTYPEID + "'" + |
| | | ",'" + oSub.HNowModel + "'," + oSub.HNowLife.ToString() + ",'" + oSub.HNewModel + "','" + oSub.HLastProdModel + "','" + oSub.HWallThickness + "','" + oSub.HHardness + "'" + |
| | | ",'" + oSub.HDiameter + "'," + oSub.HMouldType.ToString() + ",'" + oSub.HInitModel + "'," + oSub.HInitDesignLife.ToString() + "," + oSub.HLifeUnitID.ToString() + |
| | | ") "); |
| | | |
| | | |
| | | oCn.RunProc("exec h_p_Sc_MouldFileChangeStatus " + oSub.HMaterID.ToString() + ",'" + oSub.HNowModel.ToString() + "'," + oSub.HNowLife.ToString() + ",'æ¹å¶ä¸'"); |
| | | oCn.RunProc("exec h_p_Sc_MouldFileChangeStatus " + oSub.HMaterID.ToString() + ",'" + oSub.HNowModel + "'," + oSub.HNowLife.ToString() + ",'æ¹å¶ä¸'"); |
| | | } |
| | | |
| | | //foreach (Model.ClsSc_MouldStockBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Sc_MouldRepairOutBill_Qty " + oSub.HICMOInterID, ""); |
| | | // if (Ds.Tables[0].Rows.Count == 0) |
| | | // return; |
| | | // if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBool"]) == "Y") |
| | | // { |
| | | // sReturn = "æ±æ¥æ°éè¶
è¿è®¡åæ°éï¼ä¸å
许ä¿å"; |
| | | // return false; |
| | | // } |
| | | //} |
| | | // |
| | | DataSet Ds; |
| | | foreach (Model.ClsSc_MouldStockBillSub oSub in DetailColl) |
| | | { |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_ICStockBill_CheckKF " + omodel.HInterID + "," + oSub.HMaterID + "," + oSub.HWHID + "," + oSub.HSPID + ", 1", "gy_czygl"); |
| | | if (Ds.Tables[0].Rows.Count == 0) |
| | | if (oSub.HBarCode == "") |
| | | { |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0][0]) == "N") |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0][1]) + ", ä¸å
许ä¿åï¼"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | Ds = oCn.RunProcReturn("exec h_p_Kf_ICStockBill_CheckKF " + omodel.HInterID.ToString() + "," + oSub.HMaterID.ToString() + "," + oSub.HWHID.ToString() + "," + oSub.HSPID.ToString() + ", 1", "h_p_Kf_ICStockBill_CheckKF"); |
| | | if (Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0][0]) == "N") |
| | | { |
| | | sReturn = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0][1]) + ", ä¸å
许ä¿åï¼"; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | sReturn = "æ°å¢åæ®æåï¼"; |
| | | //ä¿ååæ§å¶ |
| | | if (!AfterSave(omodel.HInterID, omodel.HBillNo, 1, ref sReturn)) |
| | | { |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | |
| | | if (oSystemParameter.omodel.Sc_MouldRepairOutBill_AutoCheck.ToUpper() == "Y") //ç³»ç»åæ° èªå¨å®¡æ ¸ |
| | | { |
| | | //å®¡æ ¸åæ® |
| | | oCn.RunProc("Update Sc_MouldStockBillMain Set HChecker='" + DBUtility.ClsPub.CurUserName + "',HCheckDate=getdate(),HBillStatus=2 where HInterID= " + omodel.HInterID.ToString()); |
| | | sReturn = "åæ®å·ï¼" + omodel.HBillNo + " æ°å¢å®¡æ ¸æåï¼"; |
| | | } |
| | | else |
| | | { |
| | | sReturn = "åæ®å·ï¼" + omodel.HBillNo + " æ°å¢æåï¼"; |
| | | } |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | |
| | | public string HInnerBillNo;// varchar(50) --å
é¨åæ®å· |
| | | public string HRemark; //å å·¥è¦æ± |
| | | public bool HRedBlueFlag;// bit --红èå |
| | | public Int64 HSupTypeID; // int --徿¥ç±»åï¼1 ä¾åºåã2 客æ·ã 3 车é´é¨é¨ï¼ |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | #region å¨å
·æäº¤çåå¤çæ¹æ³ |
| | | |
| | | #region 模å
·éè´å
¥åºå ä¸ä¼ çå |
| | | |
| | | /// <summary> |
| | | /// 模å
·éè´å
¥åºåæ°å¢ä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("MouldController/set_SaveMouldProdInBill_Json")] |
| | | [HttpPost] |
| | | public object set_SaveMouldProdInBill_Json([FromBody] JObject oMain) |
| | | { |
| | | BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew; |
| | | DAL.ClsSc_MouldProdInBill BillNew = new DAL.ClsSc_MouldProdInBill(); |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | try |
| | | { |
| | | string sMainStr = "[" + msg1.ToString() + "]"; |
| | | List<Model.ClsSc_MouldProdInBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_MouldProdInBillMain>>(sMainStr); |
| | | |
| | | //忮巿¯å¦éå¤ |
| | | if (BillNew.IsExistBillNo(ref ClsPub.sExeReturnInfo, mainList[0].HBillNo, BillStatus, mainList[0].HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·éå¤ï¼ä¸å
许ä¿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(mainList[0].HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åºå®èµå¼================================= |
| | | BillNew.omodel.HYear = sYear; |
| | | BillNew.omodel.HPeriod = sPeriod; |
| | | BillNew.omodel.HBillType = "3801"; |
| | | BillNew.omodel.HInterID = mainList[0].HInterID; |
| | | BillNew.omodel.HBillNo = mainList[0].HBillNo; |
| | | BillNew.omodel.HDate = mainList[0].HDate; |
| | | BillNew.omodel.HRemark = mainList[0].HRemark; |
| | | BillNew.omodel.HMaker = mainList[0].HMaker; |
| | | BillNew.omodel.HSTOCKORGID = mainList[0].HSTOCKORGID; |
| | | DBUtility.ClsPub.CurUserName = mainList[0].HMaker; |
| | | //==================================================== |
| | | BillNew.omodel.HSupID = mainList[0].HSupID; |
| | | BillNew.omodel.HSupTypeID = 1; //ï¼1 ä¾åºåã2 客æ·ã 3 车é´é¨é¨ï¼ |
| | | BillNew.omodel.HEmpID = mainList[0].HEmpID; |
| | | BillNew.omodel.HManagerID = mainList[0].HManagerID; |
| | | BillNew.omodel.HSecManagerID = mainList[0].HSecManagerID; |
| | | BillNew.omodel.HKeeperID = mainList[0].HKeeperID; |
| | | BillNew.omodel.HDeptID = mainList[0].HDeptID; |
| | | BillNew.omodel.HWHID = mainList[0].HWHID; |
| | | BillNew.omodel.HSCWHID = mainList[0].HSCWHID; |
| | | BillNew.omodel.HExplanation = mainList[0].HExplanation; |
| | | BillNew.omodel.HInnerBillNo = mainList[0].HInnerBillNo; |
| | | BillNew.omodel.HRedBlueFlag = mainList[0].HRedBlueFlag; |
| | | //å表èµå¼ |
| | | ds = oCn.RunProcReturn("exec h_p_Sc_GetMouldStockBill_Temp " + BillNew.omodel.HInterID.ToString() + ",'" + BillNew.omodel.HBillType + "'", "h_p_Sc_GetMouldStockBill_Temp"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ²¡ææ«ç ä¿¡æ¯ï¼è¯·å
æ«ææ¡ç ï¼ç¡®è®¤æ 误ååæäº¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++) |
| | | { |
| | | Model.ClsSc_MouldStockBillSub oSub = new Model.ClsSc_MouldStockBillSub(); |
| | | //åºå®èµå¼======================================== |
| | | oSub.HEntryID = i + 1; |
| | | oSub.HRemark = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HRemark"]); |
| | | oSub.HSourceInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSourceInterID"]); |
| | | oSub.HSourceEntryID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSourceEntryID"]); |
| | | oSub.HSourceBillType = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HSourceBillType"]); |
| | | oSub.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HSourceBillNo"]); |
| | | oSub.HRelationQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HRelationQty"]); |
| | | oSub.HRelationMoney = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HRelationMoney"]); |
| | | //============================= |
| | | oSub.HMaterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HMaterID"]); |
| | | oSub.HPropertyID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HAuxPropID"]); |
| | | oSub.HSecUnitID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSecUnitID"]); |
| | | oSub.HSecUnitRate = DBUtility.ClsPub.isSingle(ds.Tables[0].Rows[i]["HSecUnitRate"]); |
| | | oSub.HUnitID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HUnitID"]); |
| | | oSub.HBatchNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HBatchNo"]); |
| | | oSub.HQtyMust = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HQtyMust"]); |
| | | oSub.HQtyRel = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HQtyRel"]); |
| | | oSub.HQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HQty"]); |
| | | oSub.HPrice = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HPrice"]); |
| | | oSub.HMoney = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HMoney"]); |
| | | oSub.HDesignLife = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HDesignLife"]); |
| | | oSub.HLeaveLife = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HLeaveLife"]); |
| | | oSub.HUseLife = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HUseLife"]); |
| | | oSub.HUseLifeQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HUseLifeQty"]); |
| | | oSub.HNewLifeQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HNewLifeQty"]); |
| | | oSub.HWHID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HWHID"]); |
| | | oSub.HSCWHID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSCWHID"]); |
| | | oSub.HSPID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSPID"]); |
| | | oSub.HSCSPID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSCSPID"]); |
| | | oSub.HSPGroupID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSPGroupID"]); |
| | | oSub.HBarCode = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HBarCode"]); |
| | | oSub.HCorrespondentTypeID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HCorrespondentTypeID"]); |
| | | oSub.HCorrespondentID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HCorrespondentID"]); |
| | | oSub.HPOOrderInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HPOOrderInterID"]); |
| | | oSub.HPOOrderEntryID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HPOOrderEntryID"]); |
| | | oSub.HPOOrderBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HPOOrderBillNo"]); |
| | | oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSeOrderInterID"]); |
| | | oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSeOrderEntryID"]); |
| | | oSub.HSeOrderBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HSeOrderBillNo"]); |
| | | oSub.HStockOrgID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HStockOrgID"]); |
| | | oSub.HOWNERID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HOWNERID"]); |
| | | oSub.HOtherOrgID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HOtherOrgID"]); |
| | | oSub.HOWNERTYPEID = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HOWNERTYPEID"]); |
| | | BillNew.DetailColl.Add(oSub); |
| | | } |
| | | } |
| | | //ä¿å |
| | | bool bResult; |
| | | bResult = BillNew.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | if (bResult) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "模å
·éè´å
¥åºåä¸ä¼ 失败ï¼" + e.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 模å
·é¢ç¨åºåºå ä¸ä¼ çå |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region 模å
·æ¹å¶åºåºå ä¸ä¼ çå |
| | | |
| | | /// <summary> |
| | | /// 模å
·æ¹å¶åºåºåæ°å¢ä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("MouldController/set_SaveMouldRepairOutBill_Json")] |
| | | [HttpPost] |
| | | public object set_SaveMouldRepairOutBill_Json([FromBody] JObject oMain) |
| | | { |
| | | BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew; |
| | | DAL.ClsSc_MouldRepairOutBill BillNew = new DAL.ClsSc_MouldRepairOutBill(); |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | try |
| | | { |
| | | string sMainStr = "[" + msg1.ToString() + "]"; |
| | | List<Model.ClsSc_MouldRepairOutBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_MouldRepairOutBillMain>>(sMainStr); |
| | | |
| | | //忮巿¯å¦éå¤ |
| | | if (BillNew.IsExistBillNo(ref ClsPub.sExeReturnInfo, mainList[0].HBillNo, BillStatus, mainList[0].HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·éå¤ï¼ä¸å
许ä¿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(mainList[0].HDate, ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = s; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åºå®èµå¼================================= |
| | | BillNew.omodel.HYear = sYear; |
| | | BillNew.omodel.HPeriod = sPeriod; |
| | | BillNew.omodel.HBillType = "3825"; |
| | | BillNew.omodel.HInterID = mainList[0].HInterID; |
| | | BillNew.omodel.HBillNo = mainList[0].HBillNo; |
| | | BillNew.omodel.HDate = mainList[0].HDate; |
| | | BillNew.omodel.HRemark = mainList[0].HRemark; |
| | | BillNew.omodel.HMaker = mainList[0].HMaker; |
| | | BillNew.omodel.HSTOCKORGID = mainList[0].HSTOCKORGID; |
| | | DBUtility.ClsPub.CurUserName = mainList[0].HMaker; |
| | | //==================================================== |
| | | BillNew.omodel.HSupID = mainList[0].HSupID; |
| | | BillNew.omodel.HSupTypeID = 1; //ï¼1 ä¾åºåã2 客æ·ã 3 车é´é¨é¨ï¼ |
| | | BillNew.omodel.HEmpID = mainList[0].HEmpID; |
| | | BillNew.omodel.HManagerID = mainList[0].HManagerID; |
| | | BillNew.omodel.HSecManagerID = mainList[0].HSecManagerID; |
| | | BillNew.omodel.HKeeperID = mainList[0].HKeeperID; |
| | | BillNew.omodel.HDeptID = mainList[0].HDeptID; |
| | | BillNew.omodel.HWHID = mainList[0].HWHID; |
| | | BillNew.omodel.HSCWHID = mainList[0].HSCWHID; |
| | | BillNew.omodel.HExplanation = mainList[0].HExplanation; |
| | | BillNew.omodel.HInnerBillNo = mainList[0].HInnerBillNo; |
| | | BillNew.omodel.HRedBlueFlag = mainList[0].HRedBlueFlag; |
| | | //å表èµå¼ |
| | | ds = oCn.RunProcReturn("exec h_p_Sc_GetMouldStockBill_Temp " + BillNew.omodel.HInterID.ToString() + ",'" + BillNew.omodel.HBillType + "'", "h_p_Sc_GetMouldStockBill_Temp"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ²¡ææ«ç ä¿¡æ¯ï¼è¯·å
æ«ææ¡ç ï¼ç¡®è®¤æ 误ååæäº¤ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++) |
| | | { |
| | | Model.ClsSc_MouldStockBillSub oSub = new Model.ClsSc_MouldStockBillSub(); |
| | | //åºå®èµå¼======================================== |
| | | oSub.HEntryID = i + 1; |
| | | oSub.HRemark = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HRemark"]); |
| | | oSub.HSourceInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSourceInterID"]); |
| | | oSub.HSourceEntryID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSourceEntryID"]); |
| | | oSub.HSourceBillType = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HSourceBillType"]); |
| | | oSub.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HSourceBillNo"]); |
| | | oSub.HRelationQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HRelationQty"]); |
| | | oSub.HRelationMoney = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HRelationMoney"]); |
| | | //============================= |
| | | oSub.HMaterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HMaterID"]); |
| | | oSub.HPropertyID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HAuxPropID"]); |
| | | oSub.HSecUnitID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSecUnitID"]); |
| | | oSub.HSecUnitRate = DBUtility.ClsPub.isSingle(ds.Tables[0].Rows[i]["HSecUnitRate"]); |
| | | oSub.HUnitID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HUnitID"]); |
| | | oSub.HBatchNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HBatchNo"]); |
| | | oSub.HQtyMust = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HQtyMust"]); |
| | | oSub.HQtyRel = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HQtyRel"]); |
| | | oSub.HQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HQty"]); |
| | | oSub.HPrice = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HPrice"]); |
| | | oSub.HMoney = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HMoney"]); |
| | | oSub.HDesignLife = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HDesignLife"]); |
| | | oSub.HLeaveLife = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HLeaveLife"]); |
| | | oSub.HUseLife = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HUseLife"]); |
| | | oSub.HUseLifeQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HUseLifeQty"]); |
| | | oSub.HNewLifeQty = DBUtility.ClsPub.isDoule(ds.Tables[0].Rows[i]["HNewLifeQty"]); |
| | | oSub.HWHID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HWHID"]); |
| | | oSub.HSCWHID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSCWHID"]); |
| | | oSub.HSPID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSPID"]); |
| | | oSub.HSCSPID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSCSPID"]); |
| | | oSub.HSPGroupID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSPGroupID"]); |
| | | oSub.HBarCode = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HBarCode"]); |
| | | oSub.HCorrespondentTypeID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HCorrespondentTypeID"]); |
| | | oSub.HCorrespondentID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HCorrespondentID"]); |
| | | oSub.HPOOrderInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HPOOrderInterID"]); |
| | | oSub.HPOOrderEntryID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HPOOrderEntryID"]); |
| | | oSub.HPOOrderBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HPOOrderBillNo"]); |
| | | oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSeOrderInterID"]); |
| | | oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HSeOrderEntryID"]); |
| | | oSub.HSeOrderBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HSeOrderBillNo"]); |
| | | oSub.HStockOrgID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HStockOrgID"]); |
| | | oSub.HOWNERID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HOWNERID"]); |
| | | oSub.HOtherOrgID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[i]["HOtherOrgID"]); |
| | | oSub.HOWNERTYPEID = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[i]["HOWNERTYPEID"]); |
| | | BillNew.DetailColl.Add(oSub); |
| | | } |
| | | } |
| | | //ä¿å |
| | | bool bResult; |
| | | bResult = BillNew.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | |
| | | if (bResult) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; //æåï¼ |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "模å
·æ¹å¶åºåºåä¸ä¼ 失败ï¼" + e.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 模å
·è°æ¨å ä¸ä¼ çå |
| | | |
| | | /// <summary> |