| | |
| | | { |
| | | 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(); |
| | | }; |
| | | 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) => |
| | | { |
| | |
| | | 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); |
| | |
| | | tlMenu.FocusedNode = node; |
| | | if (node != null) |
| | | { |
| | | toolStripMenuItemAdd.Visible = true; |
| | | toolStripMenuItemEdt.Visible = true; |
| | | toolStripMenuItemDel.Visible = true; |
| | | toolStripMenuItemRoot.Visible = false; |
| | | tlMenu.ContextMenuStrip = contextMenuStrip1; |
| | | } |
| | | else { |
| | | toolStripMenuItemAdd.Visible = false; |
| | | toolStripMenuItemEdt.Visible = false; |
| | | toolStripMenuItemDel.Visible = false; |
| | | toolStripMenuItemRoot.Visible = true; |
| | | tlMenu.ContextMenuStrip = contextMenuStrip1; |
| | | tlMenu.FocusedNode = null; |
| | | tlMenu.ClearSelection(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | /// <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 |
| | | { |