From 1b799e1d64e6a2e151f52092542c6892ea858f0c Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期五, 09 五月 2025 13:13:56 +0800 Subject: [PATCH] 工序采集 --- DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.cs | 40 +++++++++++++++++++++++++++------------- 1 files changed, 27 insertions(+), 13 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.cs index 6d8e921..c782afc 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesDefectCode.cs @@ -41,12 +41,23 @@ { strUpGuid = tlMenu.FocusedNode.GetValue("guid").ToString(); } - Frm_MesDefectCodeShow frm = new Frm_MesDefectCodeShow(strGuid, "澧炲姞鏂伴」", strUpGuid); + Frm_MesDefectCodeShow frm = new Frm_MesDefectCodeShow(strGuid, strUpGuid); frm.UpdateParent += (s2, ee2) => { getPageList(1); }; - frm.ShowDialog(); + frm.ShowDialog(); + }; + this.toolStripMenuItemRoot.Click += (s, ee) => + { + string strGuid = ""; + string strUpGuid = ""; + Frm_MesDefectCodeShow frm = new Frm_MesDefectCodeShow(strGuid, strUpGuid); + frm.UpdateParent += (s2, ee2) => + { + getPageList(1); + }; + frm.ShowDialog(); }; this.toolStripMenuItemDel.Click += (s, ee) => { @@ -86,15 +97,13 @@ this.toolStripMenuItemEdt.Click += (s, ee) => { string strGuid = ""; - string strTitle = ""; string strUpGuid = ""; if (tlMenu.FocusedNode != null) { strGuid = tlMenu.FocusedNode.GetValue("guid").ToString(); - strTitle = tlMenu.FocusedNode.GetValue("defectName").ToString(); strUpGuid = tlMenu.FocusedNode.GetValue("pid").ToString(); } - Frm_MesDefectCodeShow frm = new Frm_MesDefectCodeShow(strGuid, strTitle, strUpGuid); + Frm_MesDefectCodeShow frm = new Frm_MesDefectCodeShow(strGuid, strUpGuid); frm.UpdateParent += (s2, ee2) => { getPageList(1); @@ -102,7 +111,6 @@ frm.ShowDialog(); }; } - private void TlMenu_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) @@ -113,16 +121,22 @@ tlMenu.FocusedNode = node; if (node != null) { + toolStripMenuItemAdd.Visible = true; + toolStripMenuItemEdt.Visible = true; + toolStripMenuItemDel.Visible = true; + toolStripMenuItemRoot.Visible = false; tlMenu.ContextMenuStrip = contextMenuStrip1; } - else { + else + { + toolStripMenuItemAdd.Visible = false; + toolStripMenuItemEdt.Visible = false; + toolStripMenuItemDel.Visible = false; + toolStripMenuItemRoot.Visible = true; tlMenu.ContextMenuStrip = contextMenuStrip1; - tlMenu.FocusedNode = null; - tlMenu.ClearSelection(); } } } - /// <summary> @@ -152,12 +166,12 @@ /// <param name="pageSize">姣忛〉鍑犳潯</param> private void getPageList(int curPage) { - var pgq = new PageQueryModel(1, 999999, "a.defect_name"); + var pgq = new PageQueryModel(1, 999999, "a.defect_code ", "asc"); var json = JsonConvert.SerializeObject(pgq); try { var strReturn = - UtilityHelper.HttpPost("", _webServiceName+"GetListPage", json); + UtilityHelper.HttpPost("", _webServiceName + "GetListPage", json); var dd = UtilityHelper.ReturnToTablePage(strReturn); var dt = dd.rtnData.list; tlMenu.DataSource = dt; @@ -170,7 +184,7 @@ { MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } - } + } } \ No newline at end of file -- Gitblit v1.9.3