From 0e3f467c7c8b42db158b2ed6d589bae657d034a7 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期六, 08 二月 2025 17:28:42 +0800 Subject: [PATCH] 工单细节 --- DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs | 48 +++++++++++++++++++++++++++++++++++------------- 1 files changed, 35 insertions(+), 13 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs index dee8dcd..d3589d4 100644 --- a/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs +++ b/DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs @@ -67,17 +67,36 @@ if (Parent != null) getNamespace(); } - private bool _isCk() { + private bool _isCk(int _type) + { Form parentForm = this.FindForm(); if (parentForm != null) { PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault(); - if (specificControl != null) + if (specificControl== null) + return false; + if (specificControl.Tag == null) + return false; + if (_type == 1) { - if (specificControl.Tag.ToString() == "宸插鏍�") + if (specificControl != null) { - Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇ュ崟鎹凡琚鏍革紝鏃犳硶杩涜鎿嶄綔锛�"); - return true; + if (specificControl.Tag.ToString() == "宸插鏍�") + { + Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇ュ崟鎹凡琚鏍革紝鏃犳硶杩涜鎿嶄綔锛�"); + return true; + } + } + } + if (_type == 0) + { + if (specificControl != null) + { + if (specificControl.Tag.ToString() == "鏈鏍�") + { + Gs.DevApp.ToolBox.MsgHelper.ShowInformation("璇ュ崟鎹湭琚鏍革紝鏃犳硶杩涜鎿嶄綔锛�"); + return true; + } } } } @@ -190,6 +209,8 @@ private void BtnFchk_ItemClick(object sender, ItemClickEventArgs e) { + bool bl = _isCk(0); + if (bl) return; if (btnFChkClick != null) { btnFChkClick(this, e); @@ -199,7 +220,7 @@ private void BtnChk_ItemClick(object sender, ItemClickEventArgs e) { - bool bl = _isCk(); + bool bl = _isCk(1); if (bl) return; if (btnChkClick != null) { @@ -245,6 +266,8 @@ private void BtnFjianYan_ItemClick(object sender, ItemClickEventArgs e) { + bool bl = _isCk(0); + if (bl) return; if (btnFjianYanClick != null) btnFjianYanClick(this, e); else @@ -268,7 +291,7 @@ private void BtnJianYan_ItemClick(object sender, ItemClickEventArgs e) { - bool bl = _isCk(); + bool bl = _isCk(1); if (bl) return; if (btnJianYanClick != null) btnJianYanClick(this, e); @@ -513,7 +536,7 @@ private void BtnEdit_ItemClick(object sender, ItemClickEventArgs e) { - bool bl = _isCk(); + bool bl = _isCk(1); if (bl) return; var lst = new List<string>(); lst.Add(btnSave.Name); @@ -522,16 +545,16 @@ _enabledBtn(lst); this.currentAction = "edit"; if (btnEdtClick != null) btnEdtClick(this, e); - + } private void BtnDel_ItemClick(object sender, ItemClickEventArgs e) { - bool bl = _isCk(); + bool bl = _isCk(1); if (bl) return; if (btnDelClick != null) btnDelClick(this, e); - // btnEsc.Enabled = false; + // btnEsc.Enabled = false; this.currentAction = ""; } @@ -551,7 +574,7 @@ Form parentForm = this.FindForm(); if (parentForm != null) { - PictureBox specificControl =(PictureBox) parentForm.Controls.Find("picCheckBox", true).FirstOrDefault(); + PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault(); if (specificControl != null) { specificControl.Image = global::Gs.DevApp.Properties.Resources.ico_noCheck; @@ -654,7 +677,6 @@ var _obj = new { userGuid = LoginInfoModel.CurrentUser.LoginUserGuid, - orgGuid = LoginInfoModel.CurrentUser.LoginOrgGuid, formNamespace = _formNamespace }; var strReturn = ""; -- Gitblit v1.9.3