From 2066a7e10e20433f7445431d6d34a9026c29f663 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期一, 23 十二月 2024 08:43:43 +0800 Subject: [PATCH] 细节 --- DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs | 47 ++++++++++++++++++++++++----------------------- 1 files changed, 24 insertions(+), 23 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs index 29dd963..eaae209 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs @@ -28,8 +28,17 @@ this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; - - Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "status", ""); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "status", "", (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) => @@ -49,17 +58,7 @@ 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> /// 鍒嗛〉浜嬩欢 /// </summary> @@ -101,7 +100,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> @@ -148,7 +147,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(); @@ -175,7 +174,8 @@ ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - getModel(rowGuid, true, 1); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); + UtilityHelper.ChangeEnableByControl(panel1.Controls, true); } /// <summary> /// 鏂板浜嬩欢 @@ -184,9 +184,9 @@ /// <param name="e"></param> private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) { - UtilityHelper.JumpToTab(xtraTabControl1, 1); lbGuid.Text = ""; - UtilityHelper.CleanValueByControl(this.panel1.Controls, true); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); + UtilityHelper.CleanValueByControl(panel1.Controls, true); } /// <summary> /// 淇濆瓨浜嬩欢 @@ -284,14 +284,16 @@ /// <param name="strGuid">涓婚敭</param> /// <param name="isEdit">鏄惁鍙紪杈�</param> /// <param name="tabIdx">閫夐」鍗″簭鍙�</param> - 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,//涓诲缓 @@ -380,16 +382,15 @@ 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) { MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } - } } } \ No newline at end of file -- Gitblit v1.9.3