lu
2025-01-16 97903580743bf5bce52a99e0f1c031be5f8fb1e5
工具条的审核和反审核状态控制
已修改3个文件
124 ■■■■ 文件已修改
DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs
@@ -27,7 +27,7 @@
            InitializeComponent();
            strType = _strType;
            txt_bl017.Text = _strType;
           // txt_bl017.Tag = "moren." + _strType;
            // txt_bl017.Tag = "moren." + _strType;
        }
        protected override void OnCreateControl()
@@ -175,8 +175,11 @@
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    UtilityHelper.JumpToTab(xtraTabControl1, 0);
                    getPageList(1);
                    if (xtraTabControl1.SelectedTabPageIndex == 0)
                    { }
                    else
                        Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
                    getPageList(this.pageBar1.CurrentPage);
                }
                MsgHelper.Warning("提示:" + _rtn.rtnMsg);
@@ -199,14 +202,15 @@
                getModel(lbGuid.Text.Trim());
            else
            {
                _filterList.Clear();
                if (gridView1.ActiveFilter.Count > 0)
                {
                    gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
                    gridView1.ActiveFilter.Clear();
                    gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
                }
                getPageList(1);
                //_filterList.Clear();
                //if (gridView1.ActiveFilter.Count > 0)
                //{
                //    gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
                //    gridView1.ActiveFilter.Clear();
                //    gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
                //}
                //getPageList(1);
                getPageList(this.pageBar1.CurrentPage);
            }
        }
        /// <summary>
@@ -494,19 +498,23 @@
                    JsonConvert.SerializeObject(_obj));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
                if (_rtn.rtnCode > 0)
                if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
                {
                    if (xtraTabControl1.SelectedTabPageIndex == 1)
                        getModel(lbGuid.Text.Trim());
                    else
                        getPageList(this.pageBar1.CurrentPage);
                    {
                        int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
                        gridView1.FocusedRowHandle = rowHandle;
                        Form parentForm = this.FindForm();
                        UtilityHelper.SetCheckIco(gridView1, "bl018", "bl016", "bl006", picCheckBox, parentForm, _inFieldValue.ToString());
                    }
                }
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void repositoryItemSearchLookUpEdit1_EditValueChanged(object sender, EventArgs e)
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -24,6 +24,7 @@
using Gs.DevApp.UserControl;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using OracleInternal.Sharding;
using UserControls.Data;
using static System.Windows.Forms.Control;
@@ -1585,7 +1586,38 @@
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="gridView1"></param>
        /// <param name="zdChk">chk字段</param>
        /// <param name="zdChkUser">chk user</param>
        /// <param name="zdCkDate">chk date</param>
        /// <param name="btnChkIco"></param>
        /// <param name="fm">当前窗体</param>
        /// <param name="fileName">1为审核,0为反审核</param>
        /// <param name="icoName"></param>
        public static void SetCheckIco(GridView gridView1,string zdChk,string zdChkUser,string zdCkDate,  PictureBox btnChkIco, Form fm, string fileName, string icoName = "")
        {
            if (fileName == "1" || fileName.ToUpper() == true.ToString().ToUpper())
            {
                btnChkIco.Image = global::Gs.DevApp.Properties.Resources.ico_check;
                btnChkIco.Tag = "已审核";
                gridView1.SetFocusedRowCellValue(zdChkUser, "已审核");
                gridView1.SetFocusedRowCellValue(zdCkDate, DateTime.Now.ToString());
                gridView1.SetFocusedRowCellValue(zdChk, true);
            }
            else
            {
                btnChkIco.Image = global::Gs.DevApp.Properties.Resources.ico_noCheck;
                btnChkIco.Tag = "未审核";
                gridView1.SetFocusedRowCellValue(zdChkUser, "");
                gridView1.SetFocusedRowCellValue(zdCkDate, "");
                gridView1.SetFocusedRowCellValue(zdChk, false);
            }
            btnChkIco.Anchor = AnchorStyles.Top | AnchorStyles.Right; // 靠右
            btnChkIco.Location = new Point(fm.ClientSize.Width - btnChkIco.Width - 20, 80); // 距离顶部10像素
        }
        #region 设置搜索
        public static string getQueryWord(string str)
        {
@@ -1747,8 +1779,21 @@
                            e.Appearance.BackColor = Color.LightPink;
                        }
                    }
                    // 设置焦点行的背景色
                    if (gridView1.GetRow(e.RowHandle) == gridView1.GetFocusedRow())
                    {
                        e.Appearance.BackColor = Color.LightSkyBlue;
                        e.Appearance.BackColor2 = Color.Yellow;
                    }
                    //else if (gridView1.IsRowHotTracked(e.RowHandle))
                    //{
                    //    // 设置鼠标悬停行的背景色
                    //    e.Appearance.BackColor = Color.LightBlue;
                    //    e.Appearance.BackColor2 = Color.LightBlue;
                    //}
                }
            };
        }
        private static void ActiveEditor_MouseUp(object sender, MouseEventArgs e)
        {
@@ -1766,7 +1811,7 @@
                    int _handle = gridView1.FocusedRowHandle;
                    bool _bl = xtraTabControl1.TabPages[0].PageEnabled;
                    if (_bl == false) { return; };
                    if (_handle < 0 )
                    if (_handle < 0)
                    {
                        xtraTabControl1.SelectedTabPageIndex = -1;
                        Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请选择你要显示的行!" + _handle.ToString() + "tag" + xtraTabControl1.SelectedTabPageIndex.ToString());
@@ -1790,7 +1835,7 @@
                }
                if (xtraTabControl1.SelectedTabPageIndex == 0)
                {
                  //  page(pageBar1.CurrentPage);
                    //  page(pageBar1.CurrentPage);
                }
            };
        }
DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
@@ -67,17 +67,32 @@
            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 (_type == 1)
                {
                    if (specificControl.Tag.ToString() == "已审核")
                    PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault();
                    if (specificControl != null)
                    {
                        Gs.DevApp.ToolBox.MsgHelper.ShowInformation("该单据已被审核,无法进行操作!");
                        return true;
                        if (specificControl.Tag.ToString() == "已审核")
                        {
                            Gs.DevApp.ToolBox.MsgHelper.ShowInformation("该单据已被审核,无法进行操作!");
                            return true;
                        }
                    }
                }
                if (_type == 0)
                {
                    PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault();
                    if (specificControl != null)
                    {
                        if (specificControl.Tag.ToString() == "未审核")
                        {
                            Gs.DevApp.ToolBox.MsgHelper.ShowInformation("该单据未被审核,无法进行操作!");
                            return true;
                        }
                    }
                }
            }
@@ -190,6 +205,8 @@
        private void BtnFchk_ItemClick(object sender, ItemClickEventArgs e)
        {
            bool bl = _isCk(0);
            if (bl) return;
            if (btnFChkClick != null)
            {
                btnFChkClick(this, e);
@@ -199,7 +216,7 @@
        private void BtnChk_ItemClick(object sender, ItemClickEventArgs e)
        {
            bool bl = _isCk();
            bool bl = _isCk(1);
            if (bl) return;
            if (btnChkClick != null)
            {
@@ -268,7 +285,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 +530,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);
@@ -527,7 +544,7 @@
        private void BtnDel_ItemClick(object sender, ItemClickEventArgs e)
        {
            bool bl = _isCk();
            bool bl = _isCk(1);
            if (bl) return;
            if (btnDelClick != null) btnDelClick(this, e);