From 9478ddf3051e83eb9a5889ff90688b34dd0f96a5 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 16 十二月 2024 14:42:55 +0800
Subject: [PATCH] 1
---
DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemQt.cs | 79 +++++++++++++++------------------------
1 files changed, 30 insertions(+), 49 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesItemQt.cs b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemQt.cs
similarity index 89%
rename from DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesItemQt.cs
rename to DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemQt.cs
index 3e2902e..8a71386 100644
--- a/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesItemQt.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesItemQt.cs
@@ -1,7 +1,4 @@
-using DevExpress.RichEdit.Export;
using DevExpress.XtraEditors;
-using DevExpress.XtraGrid.Views.Grid;
-using DevExpress.XtraGrid.Views.Grid.ViewInfo;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
@@ -10,7 +7,6 @@
using System;
using System.Collections.Generic;
using System.Data;
-using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -32,32 +28,24 @@
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
- gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "qt015", "", (value) =>
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
+ });
+ Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
+ {
+ getModel(value);
+ }, (value) =>
+ {
+ getPageList(this.pageBar1.CurrentPage);
+ });
getPageList(1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
- Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1);
- gridView1.CustomDrawRowIndicator += (s, e) =>
- {
- if (e.Info.IsRowIndicator && e.RowHandle >= 0)
- {
- e.Info.DisplayText = (e.RowHandle + 1).ToString();
- }
- };
- gridView1.FocusedRowChanged += (s, e) =>
- {
- UtilityHelper.SetCheckIco(s, picCheckBox, this, "qt015", "");
- };
- gridView1.CustomDrawEmptyForeground += (s, e) =>
- {
- string str = "鏆傛湭鏌ユ壘鍒板尮閰嶇殑鏁版嵁!";
- Font f = new Font("寰蒋闆呴粦", 16);
- Rectangle r = new Rectangle(gridView1.GridControl.Width / 2 - 100, e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5);
- e.Graphics.DrawString(str, f, Brushes.Gray, r);
- };
//璁剧疆浠撳簱閫夋嫨
+ txt_qt008.getSuppler("");
this.txt_qt008.EditChanged += (s, e) =>
{
-
};
var _obj = new
{
@@ -85,17 +73,6 @@
_filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
Task.Delay(100);
getPageList(1);
- }
- /// <summary>
- /// 鍙屽嚮浜嬩欢
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e)
- {
- string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid");
- if (!string.IsNullOrEmpty(rowGuid))
- getModel(rowGuid, false, 999);
}
/// <summary>
/// 鍒嗛〉浜嬩欢
@@ -138,7 +115,7 @@
/// <param name="e"></param>
private void ToolBarMenu1_btnEscClick(object sender, EventArgs e)
{
- UtilityHelper.JumpToTab(xtraTabControl1, 0);
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1);
}
/// <summary>
@@ -166,10 +143,11 @@
ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode > 0)
{
- UtilityHelper.JumpToTab(xtraTabControl1, 0);
- getPageList(1);
+ if (xtraTabControl1.SelectedTabPageIndex == 0)
+ getPageList(this.pageBar1.CurrentPage);
+ else
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
}
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
@@ -185,7 +163,7 @@
private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
{
if (xtraTabControl1.SelectedTabPageIndex == 1)
- getModel(lbGuid.Text.Trim(), false, 999);
+ getModel(lbGuid.Text.Trim());
else
{
_filterList.Clear();
@@ -212,7 +190,8 @@
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
- getModel(rowGuid, true, 1);
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
+ UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
}
/// <summary>
/// 鏂板浜嬩欢
@@ -221,12 +200,13 @@
/// <param name="e"></param>
private void ToolBarMenu1_btnAddClick(object sender, EventArgs e)
{
- UtilityHelper.JumpToTab(xtraTabControl1, 1);
lbGuid.Text = "";
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4);
List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
gridViews.Add(gvMx1);
UtilityHelper.CleanValueByControl(this.panel1.Controls, true, gridViews);
Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+
}
/// <summary>
/// 淇濆瓨浜嬩欢
@@ -328,7 +308,6 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
-
var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
@@ -364,14 +343,16 @@
}
}
- private void getModel(string strGuid, bool isEdit, int tabIdx)
+ private void getModel(string strGuid)
{
+ bool isEdit = false;
+ if (toolBarMenu1.currentAction == "add") return;
+ if (toolBarMenu1.currentAction == "edit") isEdit = true;
if (string.IsNullOrEmpty(strGuid))
{
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
- UtilityHelper.JumpToTab(xtraTabControl1, tabIdx);
var _obj = new
{
guid = strGuid,//涓诲缓
@@ -478,9 +459,9 @@
if (_rtn.rtnCode > 0)
{
if (xtraTabControl1.SelectedTabPageIndex == 1)
- getModel(lbGuid.Text.Trim(), false, 999);
+ getModel(lbGuid.Text.Trim());
else
- getPageList(1);
+ getPageList(this.pageBar1.CurrentPage);
}
}
catch (Exception ex)
@@ -537,7 +518,7 @@
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode > 0)
{
- if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1);
+ if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
}
MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
}
--
Gitblit v1.9.3