From 8a7bc73b5ac40d26ec72a5df94ca15c5a2976af0 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期一, 15 九月 2025 10:20:07 +0800
Subject: [PATCH] bug

---
 DevApp/Gs.DevApp/DevFrm/User/User.cs |   51 ++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 40 insertions(+), 11 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/User/User.cs b/DevApp/Gs.DevApp/DevFrm/User/User.cs
index c382656..6a04df1 100644
--- a/DevApp/Gs.DevApp/DevFrm/User/User.cs
+++ b/DevApp/Gs.DevApp/DevFrm/User/User.cs
@@ -1,5 +1,6 @@
 锘縰sing DevExpress.XtraEditors;
 using DevExpress.XtraEditors.Controls;
+using DevExpress.XtraGrid.Views.Base.ViewInfo;
 using Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
 using Gs.DevApp.UserControl;
@@ -25,6 +26,7 @@
             toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
             toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
             toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
+            toolBarMenu1.btnPrintClick += ToolBarMenu1_btnPrintClick;
             this.toolBarMenu1.getXmlConfig();
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
             {
@@ -40,6 +42,29 @@
             getPageList(1);
             pageBar1.PagerEvent += PageBar1_PagerEvent;
         }
+
+        private void ToolBarMenu1_btnPrintClick(object sender, EventArgs e)
+        {
+            //guidKey, rptParameter
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+                lbGuid, txt_userName, gridView1, "userName");
+            if (string.IsNullOrEmpty(rowGuid))
+            {
+                MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                return;
+            }
+            this.toolBarMenu1.rptParameter = "rpt_User{}";
+            this.toolBarMenu1.guidKey = rowGuid;
+            //this.ucBtnPrint101.rptParameter = "rpt_cktm{"
+            //       + ""
+            //       + "," + ""
+            //       + "," + ""
+            //       + "," + ""
+            //       + "," + ""
+            //       + "}";
+        }
+
         private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
         {
             _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
@@ -105,7 +130,7 @@
                 lbGuid, txt_userName, gridView1, "userName");
             if (string.IsNullOrEmpty(rowGuid))
             {
-                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
 
@@ -121,14 +146,16 @@
                 var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                 if (_rtn.rtnCode > 0)
                 {
+                    MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
                     if (xtraTabControl1.SelectedTabPageIndex == 0)
                     { }
                     else
                         Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
                     getPageList(this.pageBar1.CurrentPage);
                 }
+                else
 
-                MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
             }
             catch (Exception ex)
             {
@@ -169,7 +196,7 @@
             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_userName, gridView1);
             if (string.IsNullOrEmpty(rowGuid))
             {
-                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
@@ -207,21 +234,21 @@
             toolBarMenu1.isSetBtn = false;
             if (string.IsNullOrEmpty(txt_account.Text.Trim()))
             {
-                MsgHelper.Warning("鐧诲綍璐﹀彿涓嶈兘涓虹┖锛�");
+                MsgHelper.ShowError("鐧诲綍璐﹀彿涓嶈兘涓虹┖锛�");
                 txt_account.Focus();
                 return;
             }
 
             if (string.IsNullOrEmpty(txt_password.Text.Trim()))
             {
-                MsgHelper.Warning("瀵嗙爜涓嶈兘涓虹┖锛�");
+                MsgHelper.ShowError("瀵嗙爜涓嶈兘涓虹┖锛�");
                 txt_password.Focus();
                 return;
             }
 
             if (string.IsNullOrEmpty(txt_userName.Text.Trim()))
             {
-                MsgHelper.Warning("濮撳悕涓嶈兘涓虹┖锛�");
+                MsgHelper.ShowError("濮撳悕涓嶈兘涓虹┖锛�");
                 txt_userName.Focus();
                 return;
             }
@@ -245,15 +272,17 @@
                 var strJson = UtilityHelper.HttpPost("", "User/EditModel",
                     JsonConvert.SerializeObject(_obj));
                 var _rtn = UtilityHelper.ReturnToDynamic(strJson);
-                MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
                 if (_rtn.rtnCode > 0)
                 {
+                    MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
                     lbGuid.Text = _rtn.rtnData;
                     toolBarMenu1.isSetBtn = true;
                     UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false);
                     toolBarMenu1.currentAction = "";
                     Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
                 }
+                else
+                    MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
             }
             catch (Exception ex)
             {
@@ -301,7 +330,7 @@
             }
             catch (Exception ex)
             {
-                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
         /// <summary>
@@ -315,7 +344,7 @@
             if (toolBarMenu1.currentAction == "edit") isEdit = true;
             if (string.IsNullOrEmpty(strGuid))
             {
-                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             var _obj = new
@@ -336,12 +365,12 @@
                 }
                 else
                 {
-                    MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                    MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
                 }
             }
             catch (Exception ex)
             {
-                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
         /// <summary>

--
Gitblit v1.9.3