lu
2024-12-23 2066a7e10e20433f7445431d6d34a9026c29f663
DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesUnit.cs
@@ -3,13 +3,12 @@
using System.Data;
using System.Threading.Tasks;
using System.Windows.Forms;
using CefSharp.DevTools.CSS;
using DevExpress.XtraEditors;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
using Newtonsoft.Json;
using static Gs.DevApp.ToolBox.UtilityHelper;
namespace Gs.DevApp.DevFrm
{
@@ -24,7 +23,14 @@
            toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
            {
                getModel(value, false, 999);
                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
            });
            Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
            {
                getModel(value);
            }, (value) =>
            {
                getPageList(this.pageBar1.CurrentPage);
            });
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
@@ -81,7 +87,7 @@
        private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
        {
            if (xtraTabControl1.SelectedTabPageIndex == 1)
                getModel(lbGuid.Text.Trim(), false, 999);
                getModel(lbGuid.Text.Trim());
            else
            {
                _filterList.Clear();
@@ -143,14 +149,16 @@
        /// <param name="strGuid">主键</param>
        /// <param name="isEdit">是否可编辑</param>
        /// <param name="tabIdx">选项卡序号</param>
        private void getModel(string strGuid, bool isEdit, int tabIdx)
        private void getModel(string strGuid)
        {
            bool isEdit = false;
            if (toolBarMenu1.currentAction == "add") return;
            if (toolBarMenu1.currentAction == "edit") isEdit = true;
            if (string.IsNullOrEmpty(strGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            var _obj = new
            {
                guid = strGuid //主建
@@ -177,7 +185,5 @@
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
    }
}