using System; using System.Collections.Generic; using System.Text; using System.Data; namespace DAL { public class ClsSc_ProcEntrustExchReport:DBUtility.ClsXt_BaseBill { public Model.ClsSc_ProcEntrustExchReportMain omodel = new Model.ClsSc_ProcEntrustExchReportMain(); public List DetailColl = new List(); public ClsSc_ProcEntrustExchReport() { base.MvarItemKeySub = "Sc_ProcExchReportSub"; base.MvarItemKeySub2 = ""; base.MvarItemKeySub3 = ""; base.MvarItemKeySub4 = ""; base.MvarItemKey="Sc_ProcExchReportMain"; base.MvarReportTitle="委外工序流转卡汇报单"; base.BillType = "3794"; base.HBillSubType = "3794"; } #region 固定代码 ~ClsSc_ProcEntrustExchReport() { DetailColl = null; } #endregion 自定义方法 //修改单据 public override bool ModifyBill(Int64 lngBillKey, ref string sReturn) { try { // oCn.BeginTran(); //更新主表 oCn.RunProc("UpDate Sc_ProcExchReportMain set " + " HBillNo='" + omodel.HBillNo + "'" + //固定赋值=============== ",HDate='" + omodel.HDate + "'" + ",HYear='" + omodel.HYear.ToString() + "'" + ",HPeriod='" + omodel.HPeriod.ToString() + "'" + ",HRemark='" + omodel.HRemark + "'" + ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" + ",HUpDateDate=getdate()" + //======================================== ",HICMOInterID=" + omodel.HICMOInterID.ToString() + ",HICMOBillNo='" + omodel.HICMOBillNo + "'" + ",HSupID=" + omodel.HSupID.ToString() + ",HDeptID=" + omodel.HDeptID.ToString() + ",HDeptNumber='" + omodel.HDeptNumber + "'" + ",HGroupID=" + omodel.HGroupID.ToString() + ",HGroupNumber='" + omodel.HGroupNumber + "'" + ",HMaterID=" + omodel.HMaterID.ToString() + ",HMaterNumber='" + omodel.HMaterNumber + "'" + ",HUnitID=" + omodel.HUnitID.ToString() + ",HUnitNumber='" + omodel.HUnitNumber + "'" + ",HPlanQty=" + omodel.HPlanQty.ToString() + ",HInStockQty=" + omodel.HInStockQty.ToString() + ",HSumTimes=" + omodel.HSumTimes.ToString() + ",HExplanation='" + omodel.HExplanation + "'" + ",HInnerBillNo='" + omodel.HInnerBillNo + "'" + " where HInterID=" + lngBillKey.ToString()); //删除关联 DeleteRelation(ref sReturn, lngBillKey); //删除子表 DeleteBillSub(lngBillKey); //插入子表 omodel.HInterID = lngBillKey; foreach (Model.ClsSc_ProcEntrustExchReportSub oSub in DetailColl) { oCn.RunProc("Insert into Sc_ProcExchReportSub " + " (HInterID,HEntryID,HBillNo_bak," + "HCloseMan,HEntryCloseDate,HCloseType,HRemark," + "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," + "HProcID,HProcNumber,HMaterID,HMaterNumber,HEmpID,HEmpNumber" + ",HSourceID,HRelBeginDate,HRelEndDate,HTimes,HQty,HCheckQty" + ",HBadCount,HWasterQty,HWasterQty2,HWeight,HPrice,HMoney" + ",HBadPrirce,HBadMoney,HWasterPrice,HWasterMoney,HQualityRate,HSecUnitQty1" + ",HSecUnitRate1,HSecUnitQty2,HSecUnitRate2,HUsingQty,HSelfBadCount,HPreBadCount" + ",HPayMentQty,HOtherDeduct,HRelPay,HOtherItem1,HOtherItem2,HOtherItem3" + ",HOtherItem4,HOtherItem5,HPackType,HCheckEmpID,HProcPlanInterID,HProcPlanEntryID" + ",HProcPlanBillNo,HICMOInterID,HICMOBillNo,HWWOrderInterID,HWWOrderEntryID,HWWOrderBillNo" + ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo,HProcExchInterID,HProcExchEntryID,HProcExchBillNo" + ") values(" + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + omodel.HBillNo + "'" + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + 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.HProcID.ToString() + ",'" + oSub.HProcNumber + "'," + oSub.HMaterID.ToString() + ",'" + oSub.HMaterNumber + "'," + oSub.HEmpID.ToString() +",'" + oSub.HEmpNumber + "'" + "," + oSub.HSourceID.ToString() + ",'" + oSub.HRelBeginDate.ToShortDateString() + "','" + oSub.HRelEndDate.ToShortDateString() + "'," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() +"," + oSub.HCheckQty.ToString() + "," + oSub.HBadCount.ToString() + "," + oSub.HWasterQty.ToString() + "," + oSub.HWasterQty2.ToString() + "," + oSub.HWeight.ToString() + "," + oSub.HPrice.ToString() +"," + oSub.HMoney.ToString() + "," + oSub.HBadPrirce.ToString() + "," + oSub.HBadMoney.ToString() + "," + oSub.HWasterPrice.ToString() + "," + oSub.HWasterMoney.ToString() + "," + oSub.HQualityRate.ToString() +"," + oSub.HSecUnitQty1.ToString() + "," + oSub.HSecUnitRate1.ToString() + "," + oSub.HSecUnitQty2.ToString() + "," + oSub.HSecUnitRate2.ToString() + "," + oSub.HUsingQty.ToString() + "," + oSub.HSelfBadCount.ToString() +"," + oSub.HPreBadCount.ToString() + "," + oSub.HPayMentQty.ToString() + "," + oSub.HOtherDeduct.ToString() + "," + oSub.HRelPay.ToString() + ",'" + oSub.HOtherItem1 + "','" + oSub.HOtherItem2 +"','" + oSub.HOtherItem3 + "'" + ",'" + oSub.HOtherItem4 + "','" + oSub.HOtherItem5 + "','" + oSub.HPackType + "'," + oSub.HCheckEmpID.ToString() + "," + oSub.HProcPlanInterID.ToString() +"," + oSub.HProcPlanEntryID.ToString() + ",'" + oSub.HProcPlanBillNo + "'," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HWWOrderInterID.ToString() + "," + oSub.HWWOrderEntryID.ToString() +",'" + oSub.HWWOrderBillNo + "'" + "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'," + oSub.HProcExchInterID.ToString() + "," + oSub.HProcExchEntryID.ToString() +",'" + oSub.HProcExchBillNo + "'" + ") "); } // //foreach (Model.ClsSc_ProcEntrustExchReportSub oSub in DetailColl) //{ // Ds = oCn.RunProcReturn("exec h_p_Sc_ProcExchReport_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 = "修改单据成功!"; oCn.Commit(); return true; } catch (Exception e) { sReturn = e.Message; oCn.RollBack(); throw (e); } } //新增单据 public override bool AddBill(ref string sReturn) { try { //得到mainid omodel.HInterID = DBUtility.ClsPub.CreateBillID("3773", ref DBUtility.ClsPub.sExeReturnInfo); //若MAINDI重复则重新获取 oCn.BeginTran(); //主表 oCn.RunProc("Insert Into Sc_ProcExchReportMain " + "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" + ",HYear,HPeriod,HRemark,HSupID" + ",HICMOInterID,HICMOBillNo,HDeptID,HDeptNumber,HGroupID" + ",HGroupNumber,HMaterID,HMaterNumber,HUnitID,HUnitNumber" + ",HPlanQty,HInStockQty,HSumTimes,HExplanation,HInnerBillNo" + ") "+ " values('" + this.BillType + "','" + this.HBillSubType + "'," +omodel.HInterID.ToString() + ",'" + omodel.HBillNo + "','" + omodel.HDate + "','" + DBUtility.ClsPub.CurUserName + "',getdate()" + "," + omodel.HYear.ToString() + "," + omodel.HPeriod.ToString() + ",'" + omodel.HRemark + "'," + omodel.HSupID.ToString() + "," + omodel.HICMOInterID.ToString() + ",'" + omodel.HICMOBillNo + "'," + omodel.HDeptID.ToString() + ",'" + omodel.HDeptNumber + "'," + omodel.HGroupID.ToString() + ",'" + omodel.HGroupNumber + "'," + omodel.HMaterID.ToString() + ",'" + omodel.HMaterNumber + "'," + omodel.HUnitID.ToString() + ",'" + omodel.HUnitNumber + "'" + "," + omodel.HPlanQty.ToString() + "," + omodel.HInStockQty.ToString() + "," + omodel.HSumTimes.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'" + ") "); //插入子表 foreach (Model.ClsSc_ProcEntrustExchReportSub oSub in DetailColl) { oCn.RunProc("Insert into Sc_ProcExchReportSub " + " (HInterID,HEntryID,HBillNo_bak," + "HCloseMan,HEntryCloseDate,HCloseType,HRemark," + "HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney," + "HProcID,HProcNumber,HMaterID,HMaterNumber,HEmpID,HEmpNumber" + ",HSourceID,HRelBeginDate,HRelEndDate,HTimes,HQty,HCheckQty" + ",HBadCount,HWasterQty,HWasterQty2,HWeight,HPrice,HMoney" + ",HBadPrirce,HBadMoney,HWasterPrice,HWasterMoney,HQualityRate,HSecUnitQty1" + ",HSecUnitRate1,HSecUnitQty2,HSecUnitRate2,HUsingQty,HSelfBadCount,HPreBadCount" + ",HPayMentQty,HOtherDeduct,HRelPay,HOtherItem1,HOtherItem2,HOtherItem3" + ",HOtherItem4,HOtherItem5,HPackType,HCheckEmpID,HProcPlanInterID,HProcPlanEntryID" + ",HProcPlanBillNo,HICMOInterID,HICMOBillNo,HWWOrderInterID,HWWOrderEntryID,HWWOrderBillNo" + ",HSeOrderInterID,HSeOrderEntryID,HSeOrderBillNo,HProcExchInterID,HProcExchEntryID,HProcExchBillNo" + ") values(" + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + omodel.HBillNo + "'" + ",'" + oSub.HCloseMan + "','" + oSub.HEntryCloseDate + "'," + 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.HProcID.ToString() + ",'" + oSub.HProcNumber + "'," + oSub.HMaterID.ToString() + ",'" + oSub.HMaterNumber + "'," + oSub.HEmpID.ToString() + ",'" + oSub.HEmpNumber + "'" + "," + oSub.HSourceID.ToString() + ",'" + oSub.HRelBeginDate.ToShortDateString() + "','" + oSub.HRelEndDate.ToShortDateString() + "'," + oSub.HTimes.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HCheckQty.ToString() + "," + oSub.HBadCount.ToString() + "," + oSub.HWasterQty.ToString() + "," + oSub.HWasterQty2.ToString() + "," + oSub.HWeight.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HBadPrirce.ToString() + "," + oSub.HBadMoney.ToString() + "," + oSub.HWasterPrice.ToString() + "," + oSub.HWasterMoney.ToString() + "," + oSub.HQualityRate.ToString() + "," + oSub.HSecUnitQty1.ToString() + "," + oSub.HSecUnitRate1.ToString() + "," + oSub.HSecUnitQty2.ToString() + "," + oSub.HSecUnitRate2.ToString() + "," + oSub.HUsingQty.ToString() + "," + oSub.HSelfBadCount.ToString() + "," + oSub.HPreBadCount.ToString() + "," + oSub.HPayMentQty.ToString() + "," + oSub.HOtherDeduct.ToString() + "," + oSub.HRelPay.ToString() + ",'" + oSub.HOtherItem1 + "','" + oSub.HOtherItem2 + "','" + oSub.HOtherItem3 + "'" + ",'" + oSub.HOtherItem4 + "','" + oSub.HOtherItem5 + "','" + oSub.HPackType + "'," + oSub.HCheckEmpID.ToString() + "," + oSub.HProcPlanInterID.ToString() + "," + oSub.HProcPlanEntryID.ToString() + ",'" + oSub.HProcPlanBillNo + "'," + oSub.HICMOInterID.ToString() + ",'" + oSub.HICMOBillNo + "'," + oSub.HWWOrderInterID.ToString() + "," + oSub.HWWOrderEntryID.ToString() + ",'" + oSub.HWWOrderBillNo + "'" + "," + oSub.HSeOrderInterID.ToString() + "," + oSub.HSeOrderEntryID.ToString() + ",'" + oSub.HSeOrderBillNo + "'," + oSub.HProcExchInterID.ToString() + "," + oSub.HProcExchEntryID.ToString() + ",'" + oSub.HProcExchBillNo + "'" + ") "); } // //foreach (Model.ClsSc_ProcEntrustExchReportSub oSub in DetailColl) //{ // Ds = oCn.RunProcReturn("exec h_p_Sc_ProcExchReport_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 = "新增单据成功!"; oCn.Commit(); return true; } catch (Exception e) { sReturn = e.Message; oCn.RollBack(); throw (e); } } //显示单据 public override bool ShowBill(Int64 lngBillKey, ref string sReturn) { try { //查询主表 DataSet Ds ; Ds = oCn.RunProcReturn("Select * from Sc_ProcExchReportMain Where HInterID=" + lngBillKey.ToString(), "Sc_ProcExchReportMain"); if(Ds.Tables[0].Rows.Count==0) { sReturn = "单据未找到!"; return false; } //固定赋值=========================================== omodel.HInterID =DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HInterID"]); omodel.HBillNo = Ds.Tables[0].Rows[0]["HBillNo"].ToString().Trim(); omodel.HDate =DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HDate"]); omodel.HYear = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HYear"]); omodel.HPeriod = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPeriod"]); omodel.HCheckItemNowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNowID"]); omodel.HCheckItemNextID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckItemNextID"]); omodel.HCheckFlowID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCheckFlowID"]); omodel.HRemark = Ds.Tables[0].Rows[0]["HRemark"].ToString().Trim(); omodel.HBillStatus = DBUtility.ClsPub.isInt(Ds.Tables[0].Rows[0]["HBillStatus"]); omodel.HBillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillType"]); omodel.HBillSubType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HBillSubType"]); omodel.HMaker = Ds.Tables[0].Rows[0]["HMaker"].ToString().Trim(); omodel.HMakeDate = Ds.Tables[0].Rows[0]["HMakeDate"].ToString().Trim(); omodel.HUpDateDate = Ds.Tables[0].Rows[0]["HUpDateDate"].ToString().Trim(); omodel.HUpDater = Ds.Tables[0].Rows[0]["HUpDater"].ToString().Trim(); omodel.HBackDate = Ds.Tables[0].Rows[0]["HBackDate"].ToString().Trim(); omodel.HBacker = Ds.Tables[0].Rows[0]["HBacker"].ToString().Trim(); omodel.HCheckDate = Ds.Tables[0].Rows[0]["HCheckDate"].ToString().Trim(); omodel.HChecker = Ds.Tables[0].Rows[0]["HChecker"].ToString().Trim(); omodel.HCloseDate = Ds.Tables[0].Rows[0]["HCloseDate"].ToString().Trim(); omodel.HCloseMan = Ds.Tables[0].Rows[0]["HCloseMan"].ToString().Trim(); omodel.HDeleteDate = Ds.Tables[0].Rows[0]["HDeleteDate"].ToString().Trim(); omodel.HDeleteMan = Ds.Tables[0].Rows[0]["HDeleteMan"].ToString().Trim(); //======================================================== //== omodel.HICMOInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HICMOInterID"]); omodel.HICMOBillNo = Ds.Tables[0].Rows[0]["HICMOBillNo"].ToString().Trim(); omodel.HSupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSupID"]); omodel.HDeptID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HDeptID"]); omodel.HDeptNumber = Ds.Tables[0].Rows[0]["HDeptNumber"].ToString().Trim(); omodel.HGroupID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HGroupID"]); omodel.HGroupNumber = Ds.Tables[0].Rows[0]["HGroupNumber"].ToString().Trim(); omodel.HMaterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMaterID"]); omodel.HMaterNumber = Ds.Tables[0].Rows[0]["HMaterNumber"].ToString().Trim(); omodel.HUnitID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HUnitID"]); omodel.HUnitNumber = Ds.Tables[0].Rows[0]["HUnitNumber"].ToString().Trim(); omodel.HPlanQty = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HPlanQty"]); omodel.HInStockQty = DBUtility.ClsPub.isDoule(Ds.Tables[0].Rows[0]["HInStockQty"]); omodel.HSumTimes = DBUtility.ClsPub.isSingle(Ds.Tables[0].Rows[0]["HSumTimes"]); omodel.HExplanation = Ds.Tables[0].Rows[0]["HExplanation"].ToString().Trim(); omodel.HInnerBillNo = Ds.Tables[0].Rows[0]["HInnerBillNo"].ToString().Trim(); // //循环 DataSet DsSub ; DsSub = oCn.RunProcReturn("Select * from Sc_ProcExchReportSub Where HInterID=" + lngBillKey.ToString() + " order by HEntryID ", "Sc_ProcExchReportSub"); DetailColl.Clear();//清空 for (int i = 0; i < DsSub.Tables[0].Rows.Count; i++) { Model.ClsSc_ProcEntrustExchReportSub oSub = new Model.ClsSc_ProcEntrustExchReportSub(); // 固定赋值=============================================== oSub.HInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HInterID"]); oSub.HBillNo_bak = DsSub.Tables[0].Rows[i]["HBillNo_bak"].ToString().Trim(); oSub.HEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEntryID"]); oSub.HSourceInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceInterID"]); oSub.HSourceEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceEntryID"]); oSub.HSourceBillType = DsSub.Tables[0].Rows[i]["HSourceBillType"].ToString().Trim(); oSub.HSourceBillNo = DsSub.Tables[0].Rows[i]["HSourceBillNo"].ToString().Trim(); oSub.HRelationQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationQty"]); oSub.HRelationMoney = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HRelationMoney"]); oSub.HCloseMan = DBUtility.ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HCloseMan"]); oSub.HCloseType = DBUtility.ClsPub.isBool(DsSub.Tables[0].Rows[i]["HCloseType"]); oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[i]["HEntryCloseDate"]); oSub.HRemark = DsSub.Tables[0].Rows[i]["HRemark"].ToString().Trim(); //=================================================== oSub.HProcID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcID"]); oSub.HProcNumber = DsSub.Tables[0].Rows[i]["HProcNumber"].ToString().Trim(); oSub.HMaterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HMaterID"]); oSub.HMaterNumber = DsSub.Tables[0].Rows[i]["HMaterNumber"].ToString().Trim(); oSub.HEmpID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HEmpID"]); oSub.HEmpNumber = DsSub.Tables[0].Rows[i]["HEmpNumber"].ToString().Trim(); oSub.HSourceID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSourceID"]); oSub.HRelBeginDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[0]["HRelBeginDate"]); oSub.HRelEndDate = DBUtility.ClsPub.isDate(DsSub.Tables[0].Rows[0]["HRelEndDate"]); oSub.HTimes = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HTimes"]); oSub.HQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HQty"]); oSub.HCheckQty = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HCheckQty"]); oSub.HBadCount = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HBadCount"]); oSub.HWasterQty = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HWasterQty"]); oSub.HWasterQty2 = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HWasterQty2"]); oSub.HWeight = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HWeight"]); oSub.HPrice = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HPrice"]); oSub.HMoney = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HMoney"]); oSub.HBadPrirce = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HBadPrirce"]); oSub.HBadMoney = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HBadMoney"]); oSub.HWasterPrice = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HWasterPrice"]); oSub.HWasterMoney = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HWasterMoney"]); oSub.HQualityRate = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HQualityRate"]); oSub.HSecUnitQty1 = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HSecUnitQty1"]); oSub.HSecUnitRate1 = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HSecUnitRate1"]); oSub.HSecUnitQty2 = DBUtility.ClsPub.isDoule(DsSub.Tables[0].Rows[i]["HSecUnitQty2"]); oSub.HSecUnitRate2 = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HSecUnitRate2"]); oSub.HUsingQty = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HUsingQty"]); oSub.HSelfBadCount = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HSelfBadCount"]); oSub.HPreBadCount = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HPreBadCount"]); oSub.HPayMentQty = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HPayMentQty"]); oSub.HOtherDeduct = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HOtherDeduct"]); oSub.HRelPay = DBUtility.ClsPub.isSingle(DsSub.Tables[0].Rows[i]["HRelPay"]); oSub.HOtherItem1 = DsSub.Tables[0].Rows[i]["HOtherItem1"].ToString().Trim(); oSub.HOtherItem2 = DsSub.Tables[0].Rows[i]["HOtherItem2"].ToString().Trim(); oSub.HOtherItem3 = DsSub.Tables[0].Rows[i]["HOtherItem3"].ToString().Trim(); oSub.HOtherItem4 = DsSub.Tables[0].Rows[i]["HOtherItem4"].ToString().Trim(); oSub.HOtherItem5 = DsSub.Tables[0].Rows[i]["HOtherItem5"].ToString().Trim(); oSub.HPackType = DsSub.Tables[0].Rows[i]["HPackType"].ToString().Trim(); oSub.HCheckEmpID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HCheckEmpID"]); oSub.HProcPlanInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcPlanInterID"]); oSub.HProcPlanEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcPlanEntryID"]); oSub.HProcPlanBillNo = DsSub.Tables[0].Rows[i]["HProcPlanBillNo"].ToString().Trim(); oSub.HICMOInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HICMOInterID"]); oSub.HICMOBillNo = DsSub.Tables[0].Rows[i]["HICMOBillNo"].ToString().Trim(); oSub.HWWOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWWOrderInterID"]); oSub.HWWOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HWWOrderEntryID"]); oSub.HWWOrderBillNo = DsSub.Tables[0].Rows[i]["HWWOrderBillNo"].ToString().Trim(); oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderInterID"]); oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HSeOrderEntryID"]); oSub.HSeOrderBillNo = DsSub.Tables[0].Rows[i]["HSeOrderBillNo"].ToString().Trim(); oSub.HProcExchInterID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcExchInterID"]); oSub.HProcExchEntryID = DBUtility.ClsPub.isLong(DsSub.Tables[0].Rows[i]["HProcExchEntryID"]); oSub.HProcExchBillNo = DsSub.Tables[0].Rows[i]["HProcExchBillNo"].ToString().Trim(); DetailColl.Add(oSub); } sReturn = "显示单据成功!"; return true; } catch (Exception e) { sReturn = e.Message; throw (e); } } } }