From 4d8b3deb28a4bd7125a1d26f078fe207d4410c5e Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期二, 05 十一月 2024 14:13:06 +0800 Subject: [PATCH] 11 --- DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs | 43 +++++++++++++++++++++++++++++++++++++++---- 1 files changed, 39 insertions(+), 4 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs index 7678abf..030fbae 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs @@ -6,6 +6,7 @@ using System.Windows.Forms; using DevExpress.XtraEditors; using DevExpress.XtraEditors.Controls; +using DevExpress.XtraGrid.Views.Base.ViewInfo; using DevExpress.XtraGrid.Views.Grid; using Gs.DevApp.DevFrm.QC.Models; using Gs.DevApp.Entity; @@ -27,6 +28,8 @@ toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick; toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; + toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; + toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; getPageList(1, UtilityHelper.GetPageSize()); pageBar1.PagerEvent += PageBar1_PagerEvent; @@ -69,7 +72,34 @@ { getPageList(curPage, pageSize); } + /// <summary> + /// 鍙嶅鏍� + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + /// <exception cref="NotImplementedException"></exception> + private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e) + { + toolBarMenu1.guidKey = ""; + string rowGuid, rowName; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, + lbGuid, txt_lookupTypeCode, gridView1); + toolBarMenu1.guidKey = rowGuid; + } + /// <summary> + /// 瀹℃牳浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void ToolBarMenu1_btnChkClick(object sender, EventArgs e) + { + toolBarMenu1.guidKey = ""; + string rowGuid, rowName; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, + lbGuid, txt_lookupTypeCode, gridView1); + toolBarMenu1.guidKey = rowGuid; + } /// <summary> /// 鍙栨秷浜嬩欢 /// </summary> @@ -106,7 +136,6 @@ MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - getModel(rowGuid, true, 1); } @@ -124,7 +153,6 @@ txt_lookupTypeCode.Focus(); return; } - gvMx1.CloseEditor(); gvMx1.UpdateCurrentRow(); var lst = new List<MesSysLookups>(); @@ -159,8 +187,10 @@ { lbGuid.Text = _rtn.rtnData; toolBarMenu1.isSetBtn = true; - UtilityHelper.ChangeEnableByControl(panel1.Controls, - false); + var gridViews = new List<GridView>(); + gridViews.Add(gvMx1); + UtilityHelper.ChangeEnableByControl(panel1.Controls, false, + gridViews); } } catch (Exception ex) @@ -279,6 +309,11 @@ var mxGuid = dr["guid"].ToString(); if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍒犻櫎鍚楋紵")) return; + if (string.IsNullOrEmpty(mxGuid)) + { + gvMx1.DeleteRow(rowhandle); + return; + } var strJson = ""; var lst = new List<string>(); lst.Add(mxGuid); -- Gitblit v1.9.3