From 0cda77328c5e7e818a2c0f7f03a2d738c338634c Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 09 十二月 2024 15:01:36 +0800
Subject: [PATCH] 修改模版

---
 DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs |   89 ++++++++++++++++++++++++++++++++------------
 1 files changed, 64 insertions(+), 25 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs b/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs
index 2e53977..560814e 100644
--- a/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs
@@ -2,7 +2,6 @@
 using System.Collections.Generic;
 using System.Data;
 using System.Windows.Forms;
-using DevExpress.RichEdit.Export;
 using DevExpress.XtraEditors;
 using DevExpress.XtraEditors.Controls;
 using Gs.DevApp.Entity;
@@ -25,11 +24,8 @@
             toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
             toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
             gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
-            gridView1.FocusedRowChanged += (s, e) =>
-            {
-                UtilityHelper.SetCheckIco(s, picCheckBox, this, "checkStatus", "");
-            };
-            getPageList(1, UtilityHelper.GetPageSize());
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1, picCheckBox, this, "checkStatus", "");
+            getPageList(1);
             pageBar1.PagerEvent += PageBar1_PagerEvent;
             getTree();
             txt_docCode.EditValueChanged += Txt_docCode_EditValueChanged;
@@ -42,8 +38,6 @@
                 Txt_flagIncludeDocCode_CheckedChanged;
             txt_isSpilit.CheckedChanged +=
                 Txt_flagIncludeDocCode_CheckedChanged;
-
-           
         }
 
         /// <summary>
@@ -70,7 +64,7 @@
         /// <param name="pageSize"></param>
         private void PageBar1_PagerEvent(int curPage, int pageSize)
         {
-            getPageList(curPage, pageSize);
+            getPageList(1);
         }
 
         /// <summary>
@@ -81,11 +75,7 @@
         /// <exception cref="NotImplementedException"></exception>
         private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e)
         {
-            toolBarMenu1.guidKey = "";
-            string rowGuid, rowName;
-            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
-                lbGuid, txt_docCode, gridView1);
-            toolBarMenu1.guidKey = rowGuid;
+            _toolCk(0);
         }
 
         /// <summary>
@@ -95,11 +85,7 @@
         /// <param name="e"></param>
         private void ToolBarMenu1_btnChkClick(object sender, EventArgs e)
         {
-            toolBarMenu1.guidKey = "";
-            string rowGuid, rowName;
-            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
-                lbGuid, txt_docCode, gridView1);
-            toolBarMenu1.guidKey = rowGuid;
+            _toolCk(1);
         }
 
         /// <summary>
@@ -121,7 +107,7 @@
         {
             string rowGuid, rowName;
             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
-                lbGuid, txt_docCode, gridView1);
+                lbGuid, txt_docCode, gridView1, "docCode");
             if (string.IsNullOrEmpty(rowGuid))
             {
                 MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -142,9 +128,8 @@
                 if (_rtn.rtnCode > 0)
                 {
                     UtilityHelper.JumpToTab(xtraTabControl1, 0);
-                    getPageList(1, UtilityHelper.GetPageSize());
+                    getPageList(1);
                 }
-
                 MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
             }
             catch (Exception ex)
@@ -161,7 +146,7 @@
         private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
         {
             UtilityHelper.JumpToTab(xtraTabControl1, 0);
-            getPageList(1, UtilityHelper.GetPageSize());
+            getPageList(1);
         }
 
         /// <summary>
@@ -265,9 +250,9 @@
         /// </summary>
         /// <param name="curPage">绗嚑椤�</param>
         /// <param name="pageSize">姣忛〉鍑犳潯</param>
-        private void getPageList(int curPage, int pageSize)
+        private void getPageList(int curPage)
         {
-            var pgq = new PageQueryModel(curPage, pageSize, "doc_Code");
+            var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "doc_Code");
             var json = JsonConvert.SerializeObject(pgq);
             try
             {
@@ -418,5 +403,59 @@
         {
             DoPreviewCode();
         }
+
+        /// <summary>
+        /// 宸ュ叿鏉′簨浠�
+        /// </summary>
+        /// <param name="inFieldValue"></param>
+        private void _toolCk(int _inFieldValue)
+        {
+            string strMsg = "";
+            switch (_inFieldValue)
+            {
+                case 1:
+                    strMsg = "瀹℃牳";
+                    break;
+                case 0:
+                    strMsg = "鍙嶅鏍�";
+                    break;
+            };
+            toolBarMenu1.guidKey = "";
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_docCode, gridView1, "docCode");
+            if (string.IsNullOrEmpty(rowGuid))
+            {
+                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                return;
+            }
+            if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵"))
+                return;
+
+            var _obj = new
+            {
+                guid = rowGuid,
+                ckValue = _inFieldValue,
+                parameter = "SYS_DOC_RULE,check_date,check_status,check_by"
+            };
+            try
+            {
+                var strJson = UtilityHelper.HttpPost("","General/GeneralCheck",
+                    JsonConvert.SerializeObject(_obj));
+                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+                MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
+                if (_rtn.rtnCode > 0)
+                {
+                    if (xtraTabControl1.SelectedTabPageIndex == 1)
+                        getModel(lbGuid.Text.Trim(), false, 999);
+                    else
+                        getPageList(1);
+                }
+            }
+            catch (Exception ex)
+            {
+                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
+
+        }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3