From bd2d1fb06fe96c991447d87d366e0f7f3024da79 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期四, 23 十二月 2021 15:44:26 +0800
Subject: [PATCH] nothing

---
 DAL/源单/Cls_S_Xt_BaseBill.cs |   57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 56 insertions(+), 1 deletions(-)

diff --git "a/DAL/\346\272\220\345\215\225/Cls_S_Xt_BaseBill.cs" "b/DAL/\346\272\220\345\215\225/Cls_S_Xt_BaseBill.cs"
index 2c3f12d..027945d 100644
--- "a/DAL/\346\272\220\345\215\225/Cls_S_Xt_BaseBill.cs"
+++ "b/DAL/\346\272\220\345\215\225/Cls_S_Xt_BaseBill.cs"
@@ -25,7 +25,8 @@
         public string sOrderSql2 = "";
         public string sKeyCol2 = "";
         public string sShowItemSql2 = "";
-        public DAL.frmHlpBillList oFrm = new DAL.frmHlpBillList();
+        public frmHlpBillList oFrm;
+        //public DAL.frmHlpBillList oFrm = new DAL.frmHlpBillList();
         public List<DBUtility.BillSelect> oBillSelectColl = new List<DBUtility.BillSelect>();
         public List<DBUtility.BillSelect_A3> oBillSelectColl2 = new List<DBUtility.BillSelect_A3>();
         //
@@ -53,6 +54,7 @@
             tSQL = sWhere + sCondtion + sOrderSql;
             try
             {
+                oFrm = new frmHlpBillList();
                 oFrm.sPrimaryCol = sKeyCol;
                 oFrm.Text = mvarReportTitle;
                 oFrm.lblCaption.Text = mvarReportTitle;
@@ -112,6 +114,7 @@
             tSQL = sWhere + sCondtion2 + sOrderSql2;
             try
             {
+                oFrm = new frmHlpBillList();
                 oFrm.sPrimaryCol = sKeyCol2;
                 oFrm.Text = mvarReportTitle2;
                 oFrm.lblCaption.Text = mvarReportTitle2;
@@ -168,6 +171,7 @@
             tSQL = sWhere + sCondtion2 + sOrderSql2;
             try
             {
+                oFrm = new frmHlpBillList();
                 oFrm.sPrimaryCol = sKeyCol2;
                 oFrm.Text = mvarReportTitle2;
                 oFrm.lblCaption.Text = mvarReportTitle2;
@@ -257,6 +261,7 @@
             tSQL = sWhere + sCondtion + sOrderSql;
             try
             {
+                oFrm = new frmHlpBillList();
                 oFrm.sPrimaryCol = sKeyCol;
                 oFrm.Text = mvarReportTitle;
                 oFrm.lblCaption.Text = mvarReportTitle;
@@ -295,6 +300,56 @@
             return true;
         }
 
+        //鏍规嵁婧愬崟鍙� 妯℃嫙鏌ヨ鏁版嵁
+        /// <summary>
+        /// 鏄剧ず鏁版嵁
+        /// </summary>
+        /// <param name="sWhere">涓籗QL</param>
+        /// <param name="sCondtion">杩囨护鏉′欢</param>
+        /// <param name="sOrderSql">鎺掑簭鏉′欢</param>
+        /// <param name="sKeyCol">涓嶅彲閲嶅鍒�</param>
+        /// <returns></returns>
+        public virtual bool RefreshBySourceBillNo(string sWhere)
+        {
+            string sErr = "";
+            string tSQL;
+            ClsCN oCn = new ClsCN();
+            tSQL = " select hmainid,hsubid,鍗曟嵁鍙� from " + ViewName + sWhere + sOrderSql;
+            try
+            {
+                DataSet ds = oCn.RunProcReturn(tSQL, ViewName, ref DBUtility.ClsPub.sExeReturnInfo);
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    return false;
+                }
+                //杩斿洖鏁版嵁鍒伴泦鍚堜腑
+                oBillSelectColl.Clear();
+
+                //寰幆 閫変腑琛�
+                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
+                {
+                    BillSelect oSelect = new BillSelect();
+                    oSelect.BillNo = ClsPub.isStrNull(ds.Tables[0].Rows[i]["鍗曟嵁鍙�"]);
+                    oSelect.BillMainID = ClsPub.isLong(ds.Tables[0].Rows[i]["hmainid"]);
+                    oSelect.BillSubID = ClsPub.isLong(ds.Tables[0].Rows[i]["hsubid"]);
+                    oSelect.BillTitle = mvarReportTitle;
+                    oSelect.BillType = mvarItemKey;
+                    oBillSelectColl.Add(oSelect);
+                }
+                //
+                if (oBillSelectColl.Count > 0)
+                    return true;
+                else
+                    return false;
+            }
+            catch (Exception e)
+            {
+                sErr = e.Message;
+            }
+            return true;
+        }
+
+
 
     }
 }

--
Gitblit v1.9.1