From 17f1e58af10fda65f0494efa23a3fb96641ae2af Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期一, 23 十二月 2024 14:10:54 +0800 Subject: [PATCH] 委外排产 --- DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs | 42 ++++++++++++++++++------------------------ 1 files changed, 18 insertions(+), 24 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs index 69b73a2..5e292d9 100644 --- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs +++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs @@ -1,12 +1,9 @@ using System; using System.Collections.Generic; using System.Data; -using System.Drawing; -using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using DevExpress.XtraEditors; -using DevExpress.XtraGrid.Views.BandedGrid; using DevExpress.XtraGrid.Views.Grid; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; @@ -25,10 +22,20 @@ InitializeComponent(); toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; - gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) => + { + 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; - Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); txt_supplier.getSuppler(""); } private void GridView1_ColumnFilterChanged(object sender, EventArgs e) @@ -37,19 +44,7 @@ Task.Delay(100); getPageList(1); } - /// <summary> - /// 鍙屽嚮浜嬩欢 - /// </summary> - /// <param name="sender"></param> - /// <param name="e"></param> - private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e) - { - var rowGuid = - UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid"); - if (!string.IsNullOrEmpty(rowGuid)) - getModel(rowGuid, false, 999); - } - + /// <summary> /// 鍒嗛〉浜嬩欢 /// </summary> @@ -94,7 +89,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(); @@ -114,7 +109,6 @@ /// <param name="pageSize">姣忛〉鍑犳潯</param> private void getPageList(int curPage) { - var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); @@ -152,16 +146,16 @@ } } - 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; } - - UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); - var _obj = new { guid = strGuid //涓诲缓 -- Gitblit v1.9.3