From c4ebd2f08d72990416f3dd8d4a6a4ea62dc58da0 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期六, 28 十二月 2024 10:59:39 +0800
Subject: [PATCH] 线体
---
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs | 67 ++++++++++++++++-----------------
1 files changed, 32 insertions(+), 35 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
index 00d9a13..c235171 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
@@ -1,17 +1,12 @@
-using DevExpress.Utils.About;
-using DevExpress.XtraGrid.Views.Grid.ViewInfo;
-using DevExpress.XtraRichEdit.Model;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
-using MES.Service.Modes;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
-using System.Drawing;
using System.Net;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -35,12 +30,22 @@
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
toolBarMenu1.btnJianYanClick += ToolBarMenu1_btnJianYanClick;
- gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
gcMx1.MouseClick += GcMx1_MouseClick;
- Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1);
- Gs.DevApp.ToolBox.UtilityHelper.SetGridSearMx(gvMx1);
- Gs.DevApp.ToolBox.UtilityHelper.SetGridSearMx(gvMx2);
- Gs.DevApp.ToolBox.UtilityHelper.SetGridSearMx(gvMx3);
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1);
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx3);
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "modify1FlagTxt", "", (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;
txt_itemId.EditChanged += (s, e) =>
@@ -94,7 +99,7 @@
ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode > 0)
{
- getModel(lbGuid.Text.Trim(), false, 999);
+ getModel(lbGuid.Text.Trim());
}
}
catch (Exception ex)
@@ -178,7 +183,7 @@
if (_rtn.rtnCode > 0)
{
txtJianYan.Text = "";
- getModel(lbGuid.Text.Trim(), false, 999);
+ getModel(lbGuid.Text.Trim());
}
}
catch (Exception ex)
@@ -188,17 +193,6 @@
}
}
- /// <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>
/// 鍒嗛〉浜嬩欢
/// </summary>
@@ -280,9 +274,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)
@@ -299,7 +293,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>
@@ -327,8 +321,10 @@
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);
}
@@ -346,7 +342,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();
@@ -373,7 +369,8 @@
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
- getModel(rowGuid, true, 1);
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
+ UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
}
/// <summary>
/// 鏂板浜嬩欢
@@ -382,8 +379,8 @@
/// <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);
gridViews.Add(gvMx2);
@@ -441,7 +438,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);
@@ -477,15 +473,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,//涓诲缓
--
Gitblit v1.9.3