1
yxj
2023-11-07 5ce11d0a8055b7a541b9f88d9068bc98908a3e29
DAL/ÏúÊÛ¹ÜÀí/ClsXs_SeOrderBill.cs
@@ -37,9 +37,34 @@
            try
            {
                //
                //oCn.BeginTran();
                ////更新主表
                //oCn.RunProc("UpDate Xs_SeOrderBillMain set  " +
                //" HBillNo='" + omodel.HBillNo + "'" +  //固定赋值===============
                //",HDate='" + omodel.HDate + "'" +
                //",HYear='" + omodel.HYear.ToString() + "'" +
                //",HPeriod='" + omodel.HPeriod.ToString() + "'" +
                //",HRemark='" + omodel.HRemark + "'" +
                //",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
                //",HUpDateDate=getdate()" +
                //    //========================================
                //",HSSDate='" + omodel.HSSDate.ToShortDateString() + "'" +
                //",HAddress='" + omodel.HAddress + "'" +
                //",HSSID=" + omodel.HSSID.ToString() +
                //",HSellSID=" + omodel.HSellSID.ToString() +
                //",HCusID=" + omodel.HCusID.ToString() +
                //",HCurID=" + omodel.HCurID.ToString() +
                //",HExRate=" + omodel.HExRate.ToString() +
                //",HEmpID=" + omodel.HEmpID.ToString() +
                //",HManagerID=" + omodel.HManagerID.ToString() +
                //",HDeptID=" + omodel.HDeptID.ToString() +
                //",HExplanation='" + omodel.HExplanation + "'" +
                //",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
                //" where HInterID=" + lngBillKey.ToString());
                oCn.BeginTran();
                //更新主表
                oCn.RunProc("UpDate Xs_SeOrderBillMain set  " +
                string mainSql = "UpDate Xs_SeOrderBillMain set  " +
                " HBillNo='" + omodel.HBillNo + "'" +  //固定赋值===============
                ",HDate='" + omodel.HDate + "'" +
                ",HYear='" + omodel.HYear.ToString() + "'" +
@@ -47,20 +72,25 @@
                ",HRemark='" + omodel.HRemark + "'" +
                ",HUpDater='" + DBUtility.ClsPub.CurUserName + "'" +
                ",HUpDateDate=getdate()" +
                    //========================================
                ",HSSDate='" + omodel.HSSDate.ToShortDateString() + "'" +
                //========================================
                ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
                ",HAddress='" + omodel.HAddress + "'" +
                ",HSSID=" + omodel.HSSID.ToString() +
                ",HSellSID=" + omodel.HSellSID.ToString() +
                ",HDeptID=" + omodel.HDeptID.ToString() +
                ",HCusID=" + omodel.HCusID.ToString() +
                ",HEmpID=" + omodel.HEmpID.ToString() +
                ",HCurID=" + omodel.HCurID.ToString() +
                ",HExRate=" + omodel.HExRate.ToString() +
                ",HEmpID=" + omodel.HEmpID.ToString() +
                ",HManagerID=" + omodel.HManagerID.ToString() +
                ",HDeptID=" + omodel.HDeptID.ToString() +
                ",HSellSID=" + omodel.HSellSID.ToString() +
                ",HSSID=" + omodel.HSSID.ToString() +
                ",HSSDate='" + omodel.HSSDate.ToShortDateString() + "'" +
                ",HPayCusID=" + omodel.HPayCusID +
                ",HExplanation='" + omodel.HExplanation + "'" +
                ",HInnerBillNo='" + omodel.HInnerBillNo + "'" +
                " where HInterID=" + lngBillKey.ToString());
                ",HLinkMan='" + omodel.HLinkMan + "'" +
                ",HLinkPhone='" + omodel.HLinkPhone + "'" +
                " where HInterID=" + lngBillKey.ToString();
                oCn.RunProc(mainSql);
                //删除关联
                DeleteRelation(ref sReturn, lngBillKey);
                //删除子表
@@ -69,19 +99,50 @@
                omodel.HInterID = lngBillKey;
                foreach (Model.ClsXs_SeOrderBillSub oSub in DetailColl)
                {
                    oCn.RunProc("Insert into Xs_SeOrderBillSub " +
                      " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                      ",HMaterID,HUnitID,HQty,HPrice,HMoney,HTaxRate" +
                      ",HTaxMoney,HlineTotal,HlineTotalBB,HDate" +
                      ",HTaxPrice,HDiscountRate,HRelTaxPrice,HOutStockQty,HInvoiceQty" +
                      ") 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.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HTaxRate.ToString() +
                      "," + oSub.HTaxMoney.ToString() + "," + oSub.HlineTotal.ToString() + "," + oSub.HlineTotalBB.ToString() + ",'" + oSub.HDate.ToShortDateString() + "'" +
                      "," + oSub.HTaxPrice.ToString() + "," + oSub.HDiscountRate.ToString() + "," + oSub.HRelTaxPrice.ToString() + "," + oSub.HOutStockQty.ToString() + "," + oSub.HInvoiceQty.ToString() +
                      ") ");
                    //oCn.RunProc("Insert into Xs_SeOrderBillSub " +
                    //  " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                    //  ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                    //  ",HMaterID,HUnitID,HQty,HPrice,HMoney,HTaxRate" +
                    //  ",HTaxMoney,HlineTotal,HlineTotalBB,HDate" +
                    //  ",HTaxPrice,HDiscountRate,HRelTaxPrice,HOutStockQty,HInvoiceQty" +
                    //  ") 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.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HTaxRate.ToString() +
                    //  "," + oSub.HTaxMoney.ToString() + "," + oSub.HlineTotal.ToString() + "," + oSub.HlineTotalBB.ToString() + ",'" + oSub.HDate.ToShortDateString() + "'" +
                    //  "," + oSub.HTaxPrice.ToString() + "," + oSub.HDiscountRate.ToString() + "," + oSub.HRelTaxPrice.ToString() + "," + oSub.HOutStockQty.ToString() + "," + oSub.HInvoiceQty.ToString() +
                    //  ") ");
                    string subSql = "Insert into Xs_SeOrderBillSub" +
                        "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HUnitID,HQty,HPrice,HTaxPrice,HMoney" +
                        ",HDiscountRate,HRelTaxPrice,HTaxRate,HTaxMoney,HlineTotal,HlineTotalBB,HDate,HOutStockQty,HInvoiceQty,HRemark) " +
                        "values(" +
                        "" + omodel.HInterID +
                        "," + oSub.HEntryID +
                        "," + oSub.HSourceInterID +
                        "," + oSub.HSourceEntryID +
                        ",'" + (oSub.HSourceBillNo == null ? "" : oSub.HSourceBillNo) +
                        "','" + (oSub.HSourceBillType == null ? "" : oSub.HSourceBillType) +
                        "'," + oSub.HRelationQty +
                        "," + oSub.HRelationMoney +
                        "," + oSub.HMaterID +
                        "," + oSub.HUnitID +
                        "," + oSub.HQty +
                        "," + oSub.HPrice +
                        "," + oSub.HTaxPrice +
                        "," + oSub.HMoney +
                        "," + oSub.HDiscountRate +
                        "," + oSub.HRelTaxPrice +
                        "," + oSub.HTaxRate +
                        "," + oSub.HTaxMoney +
                        "," + oSub.HlineTotal +
                        "," + oSub.HlineTotalBB +
                        ",'" + oSub.HDate +
                        "'," + oSub.HOutStockQty +
                        "," + oSub.HInvoiceQty +
                        ",'" + oSub.HRemark +
                        "')";
                    oCn.RunProc(subSql);
                }
                //
                //foreach (Model.ClsXs_SeOrderBillSub oSub in DetailColl)
@@ -111,48 +172,147 @@
        {
            try
            {
                //得到mainid
                omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
                //若MAINDI重复则重新获取
                if (IsExistBillNo(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HBillNo, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew, omodel.HInterID))
                {
                    omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
                }
                if (IsExistMainID(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HInterID, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew))
                {
                    omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                }
                //
                DataSet ds;
                ////得到mainid
                //omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
                ////若MAINDI重复则重新获取
                //if (IsExistBillNo(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HBillNo, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew, omodel.HInterID))
                //{
                //    omodel.HBillNo = DBUtility.ClsPub.CreateBillCode(BillType, ref DBUtility.ClsPub.sExeReturnInfo, true);
                //}
                //if (IsExistMainID(ref DBUtility.ClsPub.sExeReturnInfo, omodel.HInterID, Pub_Class.ClsPub.Enum_BillStatus.BillStatus_AddNew))
                //{
                //    omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                //}
                ////
                //oCn.BeginTran();
                ////主表
                //oCn.RunProc("Insert Into Xs_SeOrderBillMain   " +
                //"(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                //",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                //",HAddress,HSSID,HSellSID,HCusID,HCurID,HExRate,HSSDate" +
                //",HEmpID,HManagerID,HDeptID,HExplanation,HInnerBillNo" +
                //") " +
                //" 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.HAddress + "'," + omodel.HSSID.ToString() + "," + omodel.HSellSID.ToString() + "," + omodel.HCusID.ToString() + "," + omodel.HCurID.ToString() + "," + omodel.HExRate.ToString() + ",'" + omodel.HSSDate.ToShortDateString() + "'" +
                //", " + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'"+
                //") ");
                oCn.BeginTran();
                //主表
                oCn.RunProc("Insert Into Xs_SeOrderBillMain   " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate" +
                ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                ",HAddress,HSSID,HSellSID,HCusID,HCurID,HExRate,HSSDate" +
                ",HEmpID,HManagerID,HDeptID,HExplanation,HInnerBillNo" +
                ") " +
                " 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.HAddress + "'," + omodel.HSSID.ToString() + "," + omodel.HSellSID.ToString() + "," + omodel.HCusID.ToString() + "," + omodel.HCurID.ToString() + "," + omodel.HExRate.ToString() + ",'" + omodel.HSSDate.ToShortDateString() + "'" +
                ", " + omodel.HEmpID.ToString() + "," + omodel.HManagerID.ToString() + "," + omodel.HDeptID.ToString() + ",'" + omodel.HExplanation + "','" + omodel.HInnerBillNo + "'"+
                ") ");
                //检查主表内码是否重复,若重复则重新生成并继续检查,直到不再重复
                while (true)
                {
                    ds = oCn.RunProcReturn("select * from Xs_SeOrderBillMain where HInterID = " + omodel.HInterID, "Xs_SeOrderBillMain");
                    if (ds != null && ds.Tables[0].Rows.Count > 0)
                    {
                        omodel.HInterID = DBUtility.ClsPub.CreateBillID(BillType, ref DBUtility.ClsPub.sExeReturnInfo);
                    }
                    else
                    {
                        break;
                    }
                }
                //插入主表
                string mainSql = "Insert Into Xs_SeOrderBillMain" +
                    "(HYear,HPeriod,HBillType,HBillSubType,HBillStatus,HExplanation" +
                    ",HInterID,HBillNo,HDate,HInnerBillNo,HAddress,HDeptID,HCusID,HEmpID,HCurID,HExRate,HManagerID,HSellSID,HSSID,HSSDate,HPayCusID,HRemark,HOrgID,HMaker,HMakeDate,HLinkMan,HLinkPhone" +
                    ",HERPInterID,HERPBillType,HSALEORGID,HSALEGROUPID,HRECEIVEID,HSETTLEID,HCHARGEID,HHEADLOCID,HRECCONTACTID,HCORRESPONDORGID,HBUSINESSTYPE) " +
                    "values(" +
                    "" + omodel.HYear +
                    "," + omodel.HPeriod +
                    ",'" + this.BillType +
                    "','" + this.HBillSubType +
                    "'," + omodel.HBillStatus +
                    ",'" + omodel.HExplanation +
                    "'," + omodel.HInterID +
                    ",'" + omodel.HBillNo +
                    "','" + omodel.HDate +
                    "','" + omodel.HInnerBillNo +
                    "','" + omodel.HAddress +
                    "'," + omodel.HDeptID +
                    "," + omodel.HCusID +
                    "," + omodel.HEmpID +
                    "," + omodel.HCurID +
                    "," + omodel.HExRate +
                    "," + omodel.HManagerID +
                    "," + omodel.HSellSID +
                    "," + omodel.HSSID +
                    ",'" + omodel.HSSDate +
                    "'," + omodel.HPayCusID +
                    ",'" + omodel.HRemark +
                    "'," + omodel.HOrgID +
                    ",'" + omodel.HMaker +
                    "','" + omodel.HMakeDate +
                    "','" + omodel.HLinkMan +
                    "','" + omodel.HLinkPhone +
                    "'," + omodel.HERPInterID +
                    ",'" + omodel.HERPBillType +
                    "'," + omodel.HSALEORGID +
                    "," + omodel.HSALEGROUPID +
                    "," + omodel.HRECEIVEID +
                    "," + omodel.HSETTLEID +
                    "," + omodel.HCHARGEID +
                    "," + omodel.HHEADLOCID +
                    "," + omodel.HRECCONTACTID +
                    "," + omodel.HCORRESPONDORGID +
                    ",'" + omodel.HBUSINESSTYPE +
                    "')";
                oCn.RunProc(mainSql);
                //插入子表
                foreach (Model.ClsXs_SeOrderBillSub oSub in DetailColl)
                {
                    oCn.RunProc("Insert into Xs_SeOrderBillSub " +
                      " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                      ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                      ",HMaterID,HUnitID,HQty,HPrice,HMoney,HTaxRate" +
                      ",HTaxMoney,HlineTotal,HlineTotalBB,HDate" +
                      ",HTaxPrice,HDiscountRate,HRelTaxPrice,HOutStockQty,HInvoiceQty" +
                      ") 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.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HTaxRate.ToString() +
                      "," + oSub.HTaxMoney.ToString() + "," + oSub.HlineTotal.ToString() + "," + oSub.HlineTotalBB.ToString() + ",'" + oSub.HDate.ToShortDateString() + "'" +
                      "," + oSub.HTaxPrice.ToString() + "," + oSub.HDiscountRate.ToString() + "," + oSub.HRelTaxPrice.ToString() + "," + oSub.HOutStockQty.ToString() + "," + oSub.HInvoiceQty.ToString() +
                      ") ");
                    //oCn.RunProc("Insert into Xs_SeOrderBillSub " +
                    //  " (HInterID,HEntryID,HCloseMan,HEntryCloseDate,HCloseType,HRemark" +
                    //  ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" +
                    //  ",HMaterID,HUnitID,HQty,HPrice,HMoney,HTaxRate" +
                    //  ",HTaxMoney,HlineTotal,HlineTotalBB,HDate" +
                    //  ",HTaxPrice,HDiscountRate,HRelTaxPrice,HOutStockQty,HInvoiceQty" +
                    //  ") 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.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HTaxRate.ToString() +
                    //  "," + oSub.HTaxMoney.ToString() + "," + oSub.HlineTotal.ToString() + "," + oSub.HlineTotalBB.ToString() + ",'" + oSub.HDate.ToShortDateString() + "'" +
                    //  "," + oSub.HTaxPrice.ToString() + "," + oSub.HDiscountRate.ToString() + "," + oSub.HRelTaxPrice.ToString() + "," + oSub.HOutStockQty.ToString() + "," + oSub.HInvoiceQty.ToString() +
                    //  ") ");
                    string subSql = "Insert into Xs_SeOrderBillSub" +
                        "(HInterID,HEntryID,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney,HMaterID,HUnitID,HQty,HPrice,HTaxPrice,HMoney" +
                        ",HDiscountRate,HRelTaxPrice,HTaxRate,HTaxMoney,HlineTotal,HlineTotalBB,HDate,HOutStockQty,HInvoiceQty,HRemark) " +
                        "values(" +
                        "" + omodel.HInterID +
                        "," + oSub.HEntryID +
                        "," + oSub.HSourceInterID +
                        "," + oSub.HSourceEntryID +
                        ",'" + (oSub.HSourceBillNo==null?"":oSub.HSourceBillNo) +
                        "','" + (oSub.HSourceBillType==null?"":oSub.HSourceBillType) +
                        "'," + oSub.HRelationQty +
                        "," + oSub.HRelationMoney +
                        "," + oSub.HMaterID +
                        "," + oSub.HUnitID +
                        "," + oSub.HQty +
                        "," + oSub.HPrice +
                        "," + oSub.HTaxPrice +
                        "," + oSub.HMoney +
                        "," + oSub.HDiscountRate +
                        "," + oSub.HRelTaxPrice +
                        "," + oSub.HTaxRate +
                        "," + oSub.HTaxMoney +
                        "," + oSub.HlineTotal +
                        "," + oSub.HlineTotalBB +
                        ",'" + oSub.HDate +
                        "'," + oSub.HOutStockQty +
                        "," + oSub.HInvoiceQty +
                        ",'" + oSub.HRemark +
                        "')";
                    oCn.RunProc(subSql);
                }
                //
                //foreach (Model.ClsXs_SeOrderBillSub oSub in DetailColl)
@@ -232,8 +392,13 @@
                omodel.HExplanation = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HExplanation"]);
                omodel.HInnerBillNo = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HInnerBillNo"]);
                omodel.HSSDate = DBUtility.ClsPub.isDate(Ds.Tables[0].Rows[0]["HSSDate"]);
                omodel.HOrgID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HOrgID"]);
                omodel.HPayCusID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HPayCusID"]);
                omodel.HLinkMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HLinkMan"]);
                omodel.HLinkPhone = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HLinkPhone"]);
                //
                //循环
                DataSet DsSub ;
                DsSub = oCn.RunProcReturn("Select * from Xs_SeOrderBillSub Where HInterID=" + lngBillKey.ToString(), "Xs_SeOrderBillSub");