From 3c6cad1224e7cb985f03d15cc98a4a2074a5af49 Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期一, 22 十二月 2025 22:25:33 +0800
Subject: [PATCH] 增加轮播看板

---
 DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkStart.cs |   83 +++++++++++++++++++++++++++++++++++------
 1 files changed, 71 insertions(+), 12 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkStart.cs b/DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkStart.cs
index fb44e15..b723762 100644
--- a/DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkStart.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkStart.cs
@@ -4,6 +4,7 @@
 using System;
 using System.Data;
 using System.IO;
+using System.Windows;
 
 namespace Gs.DevApp.DevFrm.Work
 {
@@ -13,27 +14,87 @@
         /// pc鍙渶瑕佽繃绔�
         /// </summary>
         private string isPc = "鎶曞叆,鐢垫,姘存,缁堟";
-        //鐢垫鍙栧�艰矾寰�
+        /// <summary>
+        /// 鐢垫鍙栧�艰矾寰勶紝鐩墠閮芥槸瀛樼‖鐩�
+        /// </summary>
         string dianJianPath = "";
         public Frm_WorkStart()
         {
             InitializeComponent();
             _getListJyxm();
             btnLogin.Click += BtnLogin_Click;
+            txt_gx.EditValueChanged += (s, e) =>
+            {
+                string fGx = txt_gx.Text.Trim();
+                if (fGx == "G003:姘存")
+                {
+                    chkWater.Visible = true;
+                }
+                else
+                    chkWater.Visible = false;
+
+
+                if (fGx == "G001:鎶曞叆")
+                {
+                    btnFg.Visible = true;
+                }
+                else
+                    btnFg.Visible = false;
+
+            };
+
+            btnFg.Click += BtnFg_Click;
         }
 
-        private void BtnLogin_Click(object sender, EventArgs e)
+        /// <summary>
+        /// 杩斿伐绫诲瀷杩涘叆
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        /// <exception cref="NotImplementedException"></exception>
+        private void BtnFg_Click(object sender, EventArgs e)
         {
             if (txt_bc.SelectedIndex <= 0)
             {
                 txt_bc.Focus();
-                Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇烽�夋嫨鐝锛�");
+                Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鐝锛�");
                 return;
             }
             if (txt_gx.SelectedIndex <= 0)
             {
                 txt_gx.Focus();
-                Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇烽�夋嫨宸ュ簭锛�");
+                Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨宸ュ簭锛�");
+                return;
+            }
+            string fGx = txt_gx.Text.Trim();
+            string fBc = txt_bc.Text.Trim();
+            if (fGx == "G001:鎶曞叆")
+            {
+                Frm_Work01Fg frm = new Frm_Work01Fg(fGx, fBc);
+                frm.ShowDialog();
+                return;
+            }
+            Gs.DevApp.ToolBox.MsgHelper.ShowError("閫夋嫨閿欒锛岃閲嶈瘯锛�");
+            return;
+        }
+
+        /// <summary>
+        /// 姝e父杩涘叆 
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void BtnLogin_Click(object sender, EventArgs e)
+        {
+            if (txt_bc.SelectedIndex <= 0)
+            {
+                txt_bc.Focus();
+                Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鐝锛�");
+                return;
+            }
+            if (txt_gx.SelectedIndex <= 0)
+            {
+                txt_gx.Focus();
+                Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨宸ュ簭锛�");
                 return;
             }
             string fGx = txt_gx.Text.Trim();
@@ -47,19 +108,17 @@
                     return;
                 }
             }
-
-            Frm_Work01 frm = new Frm_Work01(fGx, fBc,dianJianPath);
+            Frm_Work01 frm = new Frm_Work01(fGx, fBc, dianJianPath, (chkWater.Checked ? 1 : 0));
             frm.ShowDialog();
         }
 
         /// <summary>
-        /// 鍏堣鍙栫數妫�閰嶇疆
+        /// 鍏堣鍙栫數妫�鐨勫瓨鍌ㄨ矾寰�
         /// </summary>
         /// <returns></returns>
         private bool getConfigDianJian()
         {
-            //杩欐槸鐢垫鏁版嵁鐨勮矾寰�
-            string _where = " and 1=1 and  defect_code='7001'";
+            string _where = " and 1=1 and  defect_code='1008'";
             var pgq = new PageQueryModel(1, 999999, "a.defect_code", "asc", "", _where);
             var json = JsonConvert.SerializeObject(pgq);
             try
@@ -83,13 +142,13 @@
             }
             catch (Exception ex)
             {
-                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
                 return false;
             }
         }
 
         /// <summary>
-        /// 璇诲彇宸ュ簭涓嬫媺
+        /// 璇诲彇宸ュ簭涓嬫媺,鍚屾椂閰嶅isPc
         /// </summary>
         private void _getListJyxm()
         {
@@ -111,7 +170,7 @@
             }
             catch (Exception ex)
             {
-                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
     }

--
Gitblit v1.9.3