From 16bb2f7b48cf2c3cfbb6a026c265d4e52d22eca4 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期六, 29 十月 2022 17:11:14 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 BaseSet/公用资料/其他基础资料/Gy_StdWorkTimesList.cs |   64 +++++++++++++++++++-------------
 1 files changed, 38 insertions(+), 26 deletions(-)

diff --git "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.cs" "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.cs"
index c50d4bd..50433e7 100644
--- "a/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.cs"
+++ "b/BaseSet/\345\205\254\347\224\250\350\265\204\346\226\231/\345\205\266\344\273\226\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StdWorkTimesList.cs"
@@ -7,7 +7,7 @@
 using System.Text;
 using System.Windows.Forms;
 
-namespace BaseSet.鍏敤璧勬枡.鍏朵粬鍩虹璧勬枡
+namespace BaseSet
 {
     public partial class Gy_StdWorkTimesList : Form
     {
@@ -263,23 +263,31 @@
                 sr = CurNode.Text.Split(c);
                 HParentID = sr[0].ToString();
             }
-            //杩囨护鏉′欢
-            if (HParentID == "" || HParentID == "鐗╂枡璧勬枡" || HParentID == "宸ュ簭璧勬枡")
+            if (frmCondition==null)
             {
-                sSql = "Select top 10000 * from " + ViewName + " order by  HItemID Desc";
-            }
-            else
-            {
-                if (wl.Checked == false)
+                //杩囨护鏉′欢
+                if (HParentID == "" || HParentID == "鐗╂枡璧勬枡" || HParentID == "宸ュ簭璧勬枡")
                 {
-                    sSql = "Select top 10000 * from " + ViewName + " where 宸ュ簭浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc";
+                    sSql = "Select top 10000 * from " + ViewName + " order by  HItemID Desc";
                 }
                 else
                 {
-                    sSql = "Select top 10000 * from " + ViewName + " where 鐗╂枡浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc ";
-                }
+                    if (wl.Checked == false)
+                    {
+                        sSql = "Select top 10000 * from " + ViewName + " where 宸ュ簭浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc";
+                    }
+                    else
+                    {
+                        sSql = "Select top 10000 * from " + ViewName + " where 鐗╂枡浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc ";
+                    }
 
+                }
             }
+            else
+            {
+                sSql = frmCondition.SqlStr + sWhere + " order by " + ModName;
+            } 
+            
             //鎵цSQL
             DSet = SubCn.RunProcReturn(sSql, ViewName);
 
@@ -395,18 +403,15 @@
                 else
                 {
                     //瀹℃牳
-                    if (oItem.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
-                    {
-                        MessageBox.Show("瀹℃牳鎴愬姛!", "鎻愮ず");
-                    }
-                    else
+                    if (oItem.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) != true)
                     {
                         MessageBox.Show("瀹℃牳澶辫触!", "鎻愮ず");
                         return;
                     }
                 }
             }
-            MessageBox.Show("瀹℃牳鎴愬姛锛岃鍒锋柊锛�", "鎻愮ず");
+            MessageBox.Show("瀹℃牳鎴愬姛!", "鎻愮ず");
+            Display();
             return;
         }
         //鍙嶅鏍�
@@ -435,18 +440,15 @@
                 else
                 {
                     //瀹℃牳
-                    if (oItem.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
+                    if (oItem.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) != true)
                     {
-                        MessageBox.Show("瀹℃牳鎴愬姛!", "鎻愮ず");
-                    }
-                    else
-                    {
-                        MessageBox.Show("瀹℃牳澶辫触!", "鎻愮ず");
+                        MessageBox.Show("鍙嶅鏍稿け璐�!", "鎻愮ず");
                         return;
                     }
                 }
             }
-            MessageBox.Show("瀹℃牳鎴愬姛锛岃鍒锋柊锛�", "鎻愮ず");
+            MessageBox.Show("鍙嶅鏍告垚鍔�!", "鎻愮ず");
+            Display();
             return;
         }
 
@@ -481,9 +483,11 @@
                 else
                 {
                     oCn.RunProc(" Update Gy_StdWorkTimes set HStopflag=1 Where HItemID=" + lngBillKey.ToString());
+                   
                 }
             }
-            MessageBox.Show("绂佺敤鎴愬姛锛岃鍒锋柊锛�", "鎻愮ず");
+            MessageBox.Show("绂佺敤鎴愬姛锛�", "鎻愮ず");
+            Display();
             return;
         }
 
@@ -512,10 +516,18 @@
                 else
                 {
                     oCn.RunProc(" Update Gy_StdWorkTimes set HStopflag=0 Where HItemID=" + lngBillKey.ToString());
+                    
                 }
             }
-            MessageBox.Show("瀹℃牳鎴愬姛锛岃鍒锋柊锛�", "鎻愮ず");
+            MessageBox.Show("鍙嶇鐢ㄦ垚鍔燂紒", "鎻愮ず");
+            Display();
             return;
         }
+
+        //瀵煎嚭
+        private void dc_Click(object sender, EventArgs e)
+        {
+            DBUtility.Gy_BaseFun.DataToExcel(this.Text, grdMain);
+        }
     }
 }

--
Gitblit v1.9.1