| | |
| | | base.MvarItemKeySub3 = ""; |
| | | base.MvarItemKeySub4 = ""; |
| | | base.MvarItemKey="Sc_MouldStockBillMain"; |
| | | base.MvarReportTitle = "模å
·é¢ç¨å"; |
| | | base.BillType="3796"; |
| | | base.HBillSubType = "3796"; |
| | | base.MvarReportTitle = "模å
·é¢ç¨åºåºå"; |
| | | base.BillType= "3802"; |
| | | base.HBillSubType = "3802"; |
| | | |
| | | } |
| | | |
| | |
| | | { |
| | | 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_MouldProdOutBill_BeforeSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + HSecManagerID.ToString() + "," + HKeeperID.ToString() + "," + HSupID.ToString() + "," + OperationType.ToString(), "h_p_Sc_MouldProdOutBill_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_MouldProdOutBill_AfterSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_Sc_MouldProdOutBill_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() + |
| | | ",HSupTypeID=" + omodel.HSupTypeID.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 + "'" + |
| | | ",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_MouldProdOutBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Sc_MouldProdOutBill_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 |
| | | { |
| | | //å¾å°mainid |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if(omodel.HInterID==0) |
| | | { |
| | | omodel.HInterID = DBUtility.ClsPub.CreateBillID_Prod(BillType, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | //è¥MAINDIéå¤åéæ°è·å |
| | | oCn.BeginTran(); |
| | | //ä¿ååæ§å¶ |
| | | if (!BeforeSave(omodel.HInterID, omodel.HBillNo, omodel.HSecManagerID, omodel.HKeeperID, omodel.HSupID, 1, ref sReturn)) |
| | | { |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | //主表 |
| | | 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" + |
| | | " (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_MouldProdOutBillSub oSub in DetailColl) |
| | | //{ |
| | | // Ds = oCn.RunProcReturn("exec h_p_Sc_MouldProdOutBill_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; |
| | | } |
| | | sReturn = "åæ®å·ï¼" + omodel.HBillNo + " æ°å¢æåï¼"; |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | |
| | | public double HRelationMoney; |
| | | public string HRemark; |
| | | public DateTime HEntryCloseDate; |
| | | public Int64 HStockOrgID; // int //åºåç»ç» |
| | | public Int64 HOWNERID; // int //货主 |
| | | public Int64 HOtherOrgID; // int //å
¶ä»å
³èç»ç» |
| | | public string HOWNERTYPEID; // varchar(100) //货主类å |
| | | } |
| | | } |
| | |
| | | public const Int16 HUnitIDCol = 57; |
| | | |
| | | // |
| | | public const string ModName = "3796"; //åæ®ç±»å |
| | | public const string ModName = "3802"; //åæ®ç±»å |
| | | public const string ModCaption = "模å
·é¢ç¨å"; //åæ®åç§° |
| | | public const string ModRightName = "Sc_MouldProdOutBill"; |
| | | public const string ModRightNameEdit = ModRightName + "_Edit"; |
| | |
| | | { |
| | | public class ClsSc_MouldProdOutBillMain : DBUtility.ClsXt_BaseBillMain |
| | | { |
| | | public Int64 HSupID;// int --ä¾åºå |
| | | public Int64 HSupTypeID;// int --徿¥åä½ |
| | | public Int64 HWHID;// int --ä»åº |
| | | public Int64 HSCWHID;// int --è°åºä»åº |
| | | public Int64 HEmpID;// int --ä¸å¡å |
| | | public Int64 HManagerID;// int --è´è´£äºº |
| | | public Int64 HSecManagerID;// int --éªæ¶ |
| | | public Int64 HKeeperID;// int --ä¿ç®¡å |
| | | public Int64 HDeptID;// int --é¨é¨ |
| | | public string HExplanation;// varchar(200) --ÕªÒª |
| | | public string HInnerBillNo;// varchar(50) --å
é¨åæ®å· |
| | | public string HRemark; //å å·¥è¦æ± |
| | | public bool HRedBlueFlag;// bit --红èå |
| | | public string HSourceBillType; // --æºåç±»å |
| | | public Int64 HSupID; // int --徿¥åä½ |
| | | public Int64 HSupTypeID; // int --徿¥ç±»åï¼1 ä¾åºåã2 客æ·ã 3 车é´é¨é¨ï¼ |
| | | public Int64 HEmpID; // int --ä¸å¡å |
| | | public Int64 HManagerID; // int --è´è´£äºº |
| | | public Int64 HSecManagerID; // int --éªæ¶ |
| | | public Int64 HKeeperID; // int --ä¿ç®¡å |
| | | public Int64 HDeptID; // int --é¨é¨ |
| | | public Int64 HWHID; // int --ä»åº |
| | | public Int64 HSCWHID; // int --è°åºä»åº |
| | | public string HExplanation; // varchar(200) --ÕªÒª |
| | | public string HInnerBillNo; // varchar(50) --å
é¨åæ®å· |
| | | public bool HRedBlueFlag; // bit --红èå |
| | | } |
| | | } |
| | |
| | | { |
| | | public class ClsSc_MouldProdOutBillSub : DBUtility.ClsXt_BaseBillSub |
| | | { |
| | | public DateTime HEntryCloseDate;// datetime --è¡å
³é (é»è®¤ä¸º'') new |
| | | public string HRemark;// varchar(200) --夿³¨ |
| | | public Int64 HMaterID;// int --ç©æID |
| | | public Int64 HPropertyID;// int --è¾
å©å±æ§ |
| | | public Int64 HSecUnitID;// int --è¾
å©è®¡éåä½ |
| | | public Single HSecUnitRate;// money --æ¢ç®ç |
| | | public Int64 HUnitID;// int --计éåä½ |
| | | public double HDesignLife;// dec(18,8) --è®¾è®¡å¯¿å½ |
| | | public double HLeaveLife;// dec(18,8) --å©ä½å¯¿å½ |
| | | public double HUseLife;// dec(18,8) --使ç¨å¯¿å½ |
| | | public double HQtyMust;// dec(18,8) --åºæ¶æ°é |
| | | public double HQty;// dec(18,8) --宿¶æ°é |
| | | public double HPrice;// dec(18,8) --åä»· |
| | | public double HMoney;// dec(18,8) --éé¢ |
| | | public Int64 HWHID;// int --æ¶æä»åº |
| | | public Int64 HSCWHID;// int --è°åºä»åºID |
| | | public Int64 HSPID;// int --ä»ä½ID |
| | | public Int64 HSCSPID;// int --è°åºä»ä½ID |
| | | public Int64 HSPGroupID;// int --ä»ä½ç»ID(ä»åºéæ©å®èªå¨å¸¦åº) |
| | | public string HBatchNo;// varchar(50) --æ¹æ¬¡ |
| | | public string HEngineNum;// varchar(50) --å卿ºå· |
| | | public string HUnderPanNum;// varchar(50) --å°çå· |
| | | public string HLeaveFactCard;// varchar(50) --åºåè¯ |
| | | public Int64 HPOOrderInterID;// int --éè´è®¢å主å
ç |
| | | public Int64 HPOOrderEntryID;// int --éè´è®¢ååå
ç |
| | | public string HPOOrderBillNo;// varchar(50) --éè´è®¢åå· |
| | | public Int64 HSeOrderInterID;// int --éå®è®¢å主å
ç |
| | | public Int64 HSeOrderEntryID;// int --éå®è®¢ååå
ç |
| | | public string HSeOrderBillNo;// varchar(50) --éå®è®¢åå· |
| | | public Int64 HMaterID; // int --模å
·ID |
| | | public Int64 HPropertyID; // int --è¾
å©å±æ§ |
| | | public Int64 HSecUnitID; // int --è¾
å©è®¡éåä½ |
| | | public Single HSecUnitRate; // money --æ¢ç®ç |
| | | public Int64 HUnitID; // int --计éåä½ |
| | | public string HBatchNo; // varchar(50) --æ¹æ¬¡ |
| | | public double HQtyMust; // dec(18,8) --åºæ¶æ°é |
| | | public double HQtyRel; // dec(18,8) |
| | | public double HQty; // dec(18,8) --宿¶æ°é |
| | | public double HPrice; // dec(18,8) --åä»· |
| | | public double HMoney; // dec(18,8) --éé¢ |
| | | public double HDesignLife; // dec(18,8) --è®¾è®¡å¯¿å½ |
| | | public double HLeaveLife; // dec(18,8) --å©ä½å¯¿å½ |
| | | public double HUseLife; // dec(18,8) --使ç¨å¯¿å½ |
| | | public double HUseLifeQty; // dec(18,8) |
| | | public double HNewLifeQty; // dec(18,8) |
| | | public Int64 HWHID; // int --æ¶æä»åº |
| | | public Int64 HSCWHID; // int --è°åºä»åºID |
| | | public Int64 HSPID; // int --ä»ä½ID |
| | | public Int64 HSCSPID; // int --è°åºä»ä½ID |
| | | public Int64 HSPGroupID; // int --ä»ä½ç»ID(ä»åºéæ©å®èªå¨å¸¦åº) |
| | | public string HEngineNum; // varchar(50) --å卿ºå· |
| | | public string HUnderPanNum; // varchar(50) --å°çå· |
| | | public string HLeaveFactCard; // varchar(50) --åºåè¯ |
| | | public Int64 HPOOrderInterID; // int --éè´è®¢å主å
ç |
| | | public Int64 HPOOrderEntryID; // int --éè´è®¢ååå
ç |
| | | public string HPOOrderBillNo; // varchar(50) --éè´è®¢åå· |
| | | public Int64 HSeOrderInterID; // int --éå®è®¢å主å
ç |
| | | public Int64 HSeOrderEntryID; // int --éå®è®¢ååå
ç |
| | | public string HSeOrderBillNo; // varchar(50) --éå®è®¢åå· |
| | | public string HBarCode; |
| | | public Int64 HCorrespondentTypeID; // int --徿¥åä½ç±»åï¼1 ä¾åºåã2 客æ·ã 3 车é´é¨é¨ï¼ |
| | | public Int64 HCorrespondentID; // int --徿¥åä½å
ç |
| | | } |
| | | } |
| | |
| | | public Int64 HSeOrderInterID;// int --éå®è®¢å主å
ç |
| | | public Int64 HSeOrderEntryID;// int --éå®è®¢ååå
ç |
| | | public string HSeOrderBillNo;// varchar(50) --éå®è®¢åå· |
| | | public Int64 HCorrespondentTypeID; // int --徿¥åä½ç±»åï¼1 ä¾åºåã2 客æ·ã 3 车é´é¨é¨ï¼ |
| | | public Int64 HCorrespondentID; // int --徿¥åä½å
ç |
| | | } |
| | | } |
New file |
| | |
| | | using DAL; |
| | | using DBUtility; |
| | | using Model; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Converters; |
| | | using Newtonsoft.Json.Linq; |
| | | using SQLHelper; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Net; |
| | | using System.Net.Http; |
| | | using System.Web.Http; |
| | | using System.Windows.Forms; |
| | | using WebAPI; |
| | | using WebAPI.Models; |
| | | using WebAPI.Service; |
| | | |
| | | namespace WebAPI.Controllers |
| | | { |
| | | public class MouldController : ApiController |
| | | { |
| | | public DBUtility.ClsPub.Enum_BillStatus BillStatus; |
| | | public DataSet ds = new DataSet(); |
| | | private json objJsonResult = new json(); |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | |
| | | |
| | | #region å¨å
·æ«ç 模åè°ç¨æ¹æ³ |
| | | |
| | | #region å¨å
·æ«ç æ¨¡å æ«æå¨å
·æ¡ç è°ç¨æ¹æ³ |
| | | /// <summary> |
| | | /// æ«æå¨å
·æ¡ç |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("MouldController/Get_CheckTypeByMouldBarCode_Json")] |
| | | [HttpGet] |
| | | public object Get_CheckTypeByMouldBarCode_Json(string sBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWhID, Int64 HSCSPID, bool HRedBlueFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockOrgID) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_AddMouldBarCode_New '" + sBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + HSCWhID.ToString() + "," + HSCSPID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HRedBlueFlag + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_WMS_AddMouldBarCode_New"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å°å¨å
·ä¿¡æ¯åå
¥å¨å
·åºå
¥åºä¸´æ¶è¡¨å¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ«æå¨å
·æ¡ç 失败ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region å¨å
·æ«ç 模å è·åå¨å
·å表信æ¯å¤çæ¹æ³ |
| | | /// <summary> |
| | | /// è·åå¨å
·åè¡¨ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("MouldController/GetMouldBillEntryTmpList_Json")] |
| | | [HttpGet] |
| | | public object GetMouldBillEntryTmpList_Json(Int64 HInterID, string HBillNo, string HBillType) |
| | | { |
| | | try |
| | | { |
| | | ds = oCn.RunProcReturn("exec h_p_WMS_MouldBillEntryTmpList " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_MouldBillEntryTmpList"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString)); //è·åå°DataColumnå对象çåå |
| | | } |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "è·åå表信æ¯å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region å¨å
·æ«ç 模å å é¤åè½æé®è°ç¨ å é¤å¨å
·å表éä¸è¡ä¸´æ¶è¡¨è®°å½ |
| | | |
| | | /// <summary> |
| | | /// å é¤å¨å
·å表éä¸è¡ä¸´æ¶è¡¨è®°å½ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("MouldController/set_DelMouldStockBillMain_Temp_Json")] |
| | | [HttpGet] |
| | | public object set_DelPonderationBillMain_Temp_BarCode_Json(Int64 HInterID, string HBillType, string HBarCode) |
| | | { |
| | | try |
| | | { |
| | | oCn.RunProc("Delete from Sc_MouldStockBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HBarCode='" + HBarCode + "'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å 餿å"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "å é¤å¨å
·å表记å½å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region 模å
·é¢ç¨åºåºå |
| | | |
| | | /// <summary> |
| | | /// 模å
·é¢ç¨åºåºåæ°å¢ä¸ä¼ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("MouldController/set_SaveMouldProdOutBill_Json")] |
| | | [HttpPost] |
| | | public object set_SaveMouldProdOutBill_Json([FromBody] JObject oMain) |
| | | { |
| | | BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew; |
| | | DAL.ClsSc_MouldProdOutBill BillNew = new DAL.ClsSc_MouldProdOutBill(); |
| | | var _value = oMain["oMain"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | try |
| | | { |
| | | string sMainStr = "[" + msg1.ToString() + "]"; |
| | | List<Model.ClsSc_MouldProdOutBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_MouldProdOutBillMain>>(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 = "3802"; |
| | | 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 = mainList[0].HSupTypeID; |
| | | 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 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo,HStockOrgID" + |
| | | ") 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 + "','" + omodel.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + |
| | | "," + 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() + |
| | |
| | | <!--<add key="sUrl" value="http://47.96.97.237/WEBS-WMS/WebService1.asmx"/> --> <!--æµè¯æå¡å¨--> |
| | | <!--<add key="surl" value="http://localhost:8082/webs/webservice1.asmx"/> æ¬å°--> |
| | | <!--<add key="sUrl" value="http://192.168.110.57:81/WEBS/WebService1.asmx"/>--> <!--éé¯éæ¬å°é
ç½®--> |
| | | <add key="surl" value="http://localhost/webs-web/webservice1.asmx"/> <!--ç¿æ¶æ¶æ¬å°é
ç½®--> |
| | | <!--<add key="surl" value="http://localhost/webs-web/webservice1.asmx"/>--> <!--ç¿æ¶æ¶æ¬å°é
ç½®--> |
| | | <!--<add key="sUrl" value="http://192.168.1.57:8082/WEBS-WMS/WebService1.asmx"/>ä¹è±--> |
| | | |
| | | <add key="webpages:Version" value="3.0.0.0" /> |
| | |
| | | <Compile Include="Controllers\åºç¡èµæ\åºç¡èµæ\Gy_RepairCheckBillController.cs" /> |
| | | <Compile Include="Controllers\åºç¡èµæ\å·¥èµåºç¡èµæ\Gy_ProcPriceController.cs" /> |
| | | <Compile Include="Controllers\åºæ¶ç®¡ç\YS_ReceiveReportController.cs" /> |
| | | <Compile Include="Controllers\æ¡ç 管ç\MouldController.cs" /> |
| | | <Compile Include="Controllers\æ¡ç 管ç\WEBSController.cs" /> |
| | | <Compile Include="Controllers\ç产管ç\æ¥å·¥å°å·¥åº\Sc_MaterToSourceStepBillController.cs" /> |
| | | <Compile Include="Controllers\ç产管ç\æ¥å·¥å°å·¥åº\Sc_MESBeginStepWorkBillController.cs" /> |