From c1ddac72637f73b87610974e69704f5497019ba3 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期六, 02 八月 2025 14:43:29 +0800
Subject: [PATCH] bug
---
DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesWorkshopLine.cs | 67 ++++++++++++++++++---------------
1 files changed, 37 insertions(+), 30 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesWorkshopLine.cs b/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesWorkshopLine.cs
index f4924cb..34fefd9 100644
--- a/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesWorkshopLine.cs
+++ b/DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesWorkshopLine.cs
@@ -24,17 +24,18 @@
this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(this.GetType().FullName, gridView1, null, null, "", "", (value) =>
+ this.toolBarMenu1.getXmlConfig();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
{
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
- });
+ }, tips);
Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
{
getModel(value);
}, (value) =>
{
getPageList(this.pageBar1.CurrentPage);
- });
+ }, lbGuid);
getPageList(1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
this.txt_dptId.getSuppler("");
@@ -42,7 +43,7 @@
private async void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
_filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
- Task.Delay(100);
+ await Task.Delay(100);
getPageList(1);
}
@@ -65,7 +66,7 @@
gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
gridView1.ActiveFilter.Clear();
gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
- var frm = new ShowFilter(gridView1.Columns, _filterList);
+ var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
frm.UpdateParent += Frm_UpdateParent;
frm.ShowDialog();
}
@@ -121,11 +122,11 @@
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
getPageList(this.pageBar1.CurrentPage);
}
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -169,11 +170,11 @@
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
if (xtraTabControl1.SelectedTabPageIndex == 1)
{
- getModel(lbGuid.Text.Trim());
+ getModel(rowGuid);
}
else
{
- UtilityHelper.ChangeEnableByControl(panel1.Controls, true);
+ UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true);
}
}
/// <summary>
@@ -185,7 +186,7 @@
{
lbGuid.Text = "";
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4);
- UtilityHelper.CleanValueByControl(panel1.Controls, true);
+ UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true);
}
/// <summary>
/// 淇濆瓨浜嬩欢
@@ -197,25 +198,25 @@
toolBarMenu1.isSetBtn = false;
if (string.IsNullOrEmpty(txt_dptId.GetId().Trim()))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鎵�鍦ㄩ儴闂紒");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵�鍦ㄩ儴闂紒");
txt_dptId.Focus();
return;
}
if (string.IsNullOrEmpty(txt_lineNo.Text.Trim()))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("浜х嚎缂栧彿涓嶈兘涓虹┖锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("浜х嚎缂栧彿涓嶈兘涓虹┖锛�");
txt_lineNo.Focus();
return;
}
if (string.IsNullOrEmpty(txt_name.Text.Trim()))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("浜х嚎鍚嶇О涓嶈兘涓虹┖锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("浜х嚎鍚嶇О涓嶈兘涓虹┖锛�");
txt_name.Focus();
return;
}
if (string.IsNullOrEmpty(txt_lineType.Text.Trim()))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("浜х嚎绫诲埆涓嶈兘涓虹┖锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("浜х嚎绫诲埆涓嶈兘涓虹┖锛�");
txt_lineType.Focus();
return;
}
@@ -226,24 +227,30 @@
Name = txt_name.Text.Trim(),
LineNo = txt_lineNo.Text.Trim(),
Remark = txt_remark.Text.Trim(),
- LineType = txt_lineType.Text.Trim(),
- isZxbg = txt_isZxbg.Checked
+ LineType = txt_lineType.Checked.ToString(),//杩囩珯鏃跺己鍒舵按妫�
+ isZxbg = txt_isZxbg.Checked //杩囩珯鏃跺己鍒剁數妫�
};
try
{
string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
if (_rtn.rtnCode > 0)
{
+ ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
lbGuid.Text = _rtn.rtnData;
toolBarMenu1.isSetBtn = true;
- UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false);
+ UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false);
+ toolBarMenu1.currentAction = "";
+ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
+ }
+ else
+ {
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -254,7 +261,7 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+ gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "org.FNumber asc ,c.departmentcode asc,a.line_no",
"asc", "", _sbSqlWhere.ToString());
var json = JsonConvert.SerializeObject(pgq);
@@ -266,16 +273,16 @@
if (dd.rtnCode > 0)
{
DataTable dt = dd.rtnData.list;
- gcMain.BindingContext = new BindingContext();
+ gcMain1.BindingContext = new BindingContext();
gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
if (dt.Rows.Count > 0)
{
- gcMain.DataSource = dt;
- gcMain.ForceInitialize();
- gridView1.BestFitColumns();
+ gcMain1.DataSource = dt;
+ gcMain1.ForceInitialize();
+ gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
}
else
- UtilityHelper.SetDefaultTable(gcMain, gridView1);
+ UtilityHelper.SetDefaultTable(gcMain1, gridView1);
gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
pageBar1.TotalPages = dd.rtnData.pages;//鎬婚〉
pageBar1.CurrentPage = curPage;//褰撳墠椤�
@@ -288,7 +295,7 @@
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
/// <summary>
@@ -304,7 +311,7 @@
if (toolBarMenu1.currentAction == "edit") isEdit = true;
if (string.IsNullOrEmpty(strGuid))
{
- ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
var _obj = new
@@ -319,14 +326,14 @@
{
dynamic dy = _rtn.rtnData;
lbGuid.Text = strGuid;
- UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit);
+ UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit);
}
else
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
}
--
Gitblit v1.9.3