From d4a3063c981b2ae96f272a4ad9db3f565fb3ec94 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 03 三月 2025 14:28:35 +0800
Subject: [PATCH] 面板
---
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl_RK.cs | 109 +++++++++++++++++++++---------------------------------
1 files changed, 43 insertions(+), 66 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl_RK.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl_RK.cs
index 8d26e98..1c6ecef 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl_RK.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemTbl_RK.cs
@@ -1,16 +1,11 @@
-锘縰sing DevExpress.XtraEditors;
-using Gs.DevApp.Entity;
+锘縰sing Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -25,14 +20,18 @@
InitializeComponent();
this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
- toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
+ toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
+ List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+ gvList.Add(gridView1);
+ Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(this.GetType().FullName, gvList);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
- {
- Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
- });
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "", (value) =>
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
+ });
Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
{
getModel(value);
@@ -45,9 +44,22 @@
}
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
- _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
+ Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
Task.Delay(100);
getPageList(1);
+ }
+ /// <summary>
+ /// 鏃ュ織
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void ToolBarMenu1_btnLogClick(object sender, EventArgs e)
+ {
+ toolBarMenu1.guidKey = "";
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_billNo, gridView1);
+ toolBarMenu1.guidKey = rowGuid;
}
/// <summary>
/// 鍒嗛〉浜嬩欢
@@ -82,47 +94,6 @@
_filterList = e.FilterList;
getPageList(1);
}
- /// <summary>
- /// 鍒犻櫎浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e)
- {
- string rowGuid, rowName;
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_billNo, gridView1, "roleName");
- if (string.IsNullOrEmpty(rowGuid))
- {
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
- return;
- }
-
- if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵\n璇ユ搷浣滃皢浼氭竻绌虹浉搴旂殑鐢ㄦ埛鏉冮檺"))
- return;
- var lst = new List<string>();
- lst.Add(rowGuid);
- var _obj = lst;
- try
- {
- var strJson = UtilityHelper.HttpPost("", "Role/DeleteModel",
- JsonConvert.SerializeObject(_obj));
- var _rtn = UtilityHelper.ReturnToDynamic(strJson);
- if (_rtn.rtnCode > 0)
- {
- if (xtraTabControl1.SelectedTabPageIndex == 0)
- getPageList(this.pageBar1.CurrentPage);
- else
- Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
- }
-
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
- }
- catch (Exception ex)
- {
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
- }
- }
/// <summary>
/// 瀹℃牳浜嬩欢
@@ -155,14 +126,15 @@
getModel(lbGuid.Text.Trim());
else
{
- _filterList.Clear();
- if (gridView1.ActiveFilter.Count > 0)
- {
- gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
- gridView1.ActiveFilter.Clear();
- gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
- }
- getPageList(1);
+ //_filterList.Clear();
+ //if (gridView1.ActiveFilter.Count > 0)
+ //{
+ // gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
+ // gridView1.ActiveFilter.Clear();
+ // gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
+ //}
+ //getPageList(1);
+ getPageList(this.pageBar1.CurrentPage);
}
}
/// <summary>
@@ -189,6 +161,7 @@
{
gcMain.DataSource = dt;
gcMain.ForceInitialize();
+ gridView1.BestFitColumns();
}
else
UtilityHelper.SetDefaultTable(gcMain, gridView1);
@@ -231,8 +204,8 @@
dynamic dy = _rtn.rtnData;
lbGuid.Text = strGuid;
List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
- gvList.Add(gvMx1);
gvList.Add(gvMx2);
+ gvList.Add(gvMx1);
UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList);
JObject _job = JObject.Parse(strJson);
JArray array = new JArray();
@@ -246,6 +219,7 @@
gcMx1.BindingContext = new BindingContext();
gcMx1.DataSource = dt;
gcMx1.ForceInitialize();
+ gvMx1.BestFitColumns();
}
else
{
@@ -262,6 +236,7 @@
gcMx2.BindingContext = new BindingContext();
gcMx2.DataSource = dt2;
gcMx2.ForceInitialize();
+ gvMx2.BestFitColumns();
}
else
{
@@ -275,7 +250,6 @@
{
ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
-
}
/// <summary>
@@ -317,12 +291,15 @@
JsonConvert.SerializeObject(_obj));
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
- if (_rtn.rtnCode > 0)
+ if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
{
if (xtraTabControl1.SelectedTabPageIndex == 1)
+ {
getModel(lbGuid.Text.Trim());
- else
- getPageList(this.pageBar1.CurrentPage);
+ }
+ int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
+ gridView1.FocusedRowHandle = rowHandle;
+ UtilityHelper.SetCheckIco(gridView1, "checkStatus", "checkUser", "checkUser", picCheckBox, this, _inFieldValue.ToString());
}
}
catch (Exception ex)
--
Gitblit v1.9.3