lu
2025-01-16 f14d1fc28a8012035ee251fba71a0d048e9efd0d
DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
@@ -67,6 +67,23 @@
            if (Parent != null) getNamespace();
        }
        private bool _isCk() {
            Form parentForm = this.FindForm();
            if (parentForm != null)
            {
                PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault();
                if (specificControl != null)
                {
                    if (specificControl.Tag.ToString() == "已审核")
                    {
                        Gs.DevApp.ToolBox.MsgHelper.ShowInformation("该单据已被审核,无法进行操作!");
                        return true;
                    }
                }
            }
            return false;
        }
        private void BtnBoHui_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (btnBoHuiClick != null)
@@ -182,6 +199,8 @@
        private void BtnChk_ItemClick(object sender, ItemClickEventArgs e)
        {
            bool bl = _isCk();
            if (bl) return;
            if (btnChkClick != null)
            {
                btnChkClick(this, e);
@@ -249,6 +268,8 @@
        private void BtnJianYan_ItemClick(object sender, ItemClickEventArgs e)
        {
            bool bl = _isCk();
            if (bl) return;
            if (btnJianYanClick != null)
                btnJianYanClick(this, e);
            else
@@ -276,7 +297,7 @@
            //_ckService(1.ToString());
        }
        private async  void BtnIn_ItemClick(object sender, ItemClickEventArgs e)
        private async void BtnIn_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (string.IsNullOrEmpty(xlsInService))
            {
@@ -416,7 +437,7 @@
        {
            if (btnQueryClick != null) btnQueryClick(this, e);
        }
        private void BtnEsc_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (MsgHelper.AskQuestion("确定要要取消吗?"))
@@ -438,6 +459,7 @@
                lst.Add(btnLog.Name);
                lst.Add(btnPiZhun.Name);
                lst.Add(btnHelp.Name);
                lst.Add(btnBoHui.Name);
                _enabledBtn(lst);
                this.currentAction = "esc";
                if (btnEscClick != null) btnEscClick(this, e);
@@ -460,6 +482,21 @@
                    lst.Add(btnChk.Name);
                    lst.Add(btnFchk.Name);
                    lst.Add(btnDel.Name);
                    lst.Add(btnJianYan.Name);
                    lst.Add(btnFjianYan.Name);
                    lst.Add(btnQuery.Name);
                    lst.Add(btnLog.Name);
                    lst.Add(btnZhiLiangChk.Name);
                    lst.Add(btnZhiLiangFchk.Name);
                    lst.Add(btnPiZhun.Name);
                    lst.Add(btnBoHui.Name);
                    lst.Add(btnDesign.Name);
                    lst.Add(btnReport.Name);
                    lst.Add(btnKg.Name);
                    lst.Add(btnWg.Name);
                    lst.Add(btnZhongTai.Name);
                    lst.Add(btnHelp.Name);
                    lst.Add(btnLoad.Name);
                    _enabledBtn(lst);
                }
            }
@@ -476,6 +513,8 @@
        private void BtnEdit_ItemClick(object sender, ItemClickEventArgs e)
        {
            bool bl = _isCk();
            if (bl) return;
            var lst = new List<string>();
            lst.Add(btnSave.Name);
            lst.Add(btnEsc.Name);
@@ -483,11 +522,17 @@
            _enabledBtn(lst);
            this.currentAction = "edit";
            if (btnEdtClick != null) btnEdtClick(this, e);
        }
        private void BtnDel_ItemClick(object sender, ItemClickEventArgs e)
        {
            bool bl = _isCk();
            if (bl) return;
            if (btnDelClick != null) btnDelClick(this, e);
           // btnEsc.Enabled = false;
            this.currentAction = "";
        }
        /// <summary>
@@ -503,6 +548,16 @@
            _enabledBtn(lst);
            this.currentAction = "add";
            if (btnAddClick != null) btnAddClick(this, e);
            Form parentForm = this.FindForm();
            if (parentForm != null)
            {
                PictureBox specificControl =(PictureBox) parentForm.Controls.Find("picCheckBox", true).FirstOrDefault();
                if (specificControl != null)
                {
                    specificControl.Image = global::Gs.DevApp.Properties.Resources.ico_noCheck;
                    specificControl.Tag = "未审核";
                }
            }
        }
        private void BtnRole_ItemClick(object sender, ItemClickEventArgs e)
@@ -519,7 +574,7 @@
            if (btnWgClick != null) btnWgClick(this, e);
        }
        private void BtnbZhongTai_ItemClick(object sender, ItemClickEventArgs e)
        {
@@ -738,7 +793,7 @@
            }
            return false;
        }
        #region 公共事件
@@ -873,18 +928,18 @@
        /// 通知备料
        /// </summary>
        public event EventHandler btnTzblClick;
        /// <summary>
        /// 状态
        /// </summary>
        public event EventHandler btnZhongTaiClick;
        /// <summary>
        /// 手动完工
        /// </summary>
        public event EventHandler btnWgClick;
        #endregion
        #region 公共属性