From 44ed615a6fba735e297ea18c2ce711dd9ea44412 Mon Sep 17 00:00:00 2001 From: cnf <3200815559@qq.com> Date: 星期五, 15 八月 2025 15:40:35 +0800 Subject: [PATCH] 增加报工标识 --- DevApp/Gs.DevApp/UserControl/SelectCk.cs | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 55 insertions(+), 0 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/SelectCk.cs b/DevApp/Gs.DevApp/UserControl/SelectCk.cs index ca8220d..d4f505e 100644 --- a/DevApp/Gs.DevApp/UserControl/SelectCk.cs +++ b/DevApp/Gs.DevApp/UserControl/SelectCk.cs @@ -11,6 +11,8 @@ public partial class SelectCk : DevExpress.XtraEditors.XtraForm { string _strGuid = ""; + string _strItemId = ""; + private List<FilterEntity> _filterList = new List<FilterEntity>(); public SelectCk(string strGuid) { @@ -19,6 +21,19 @@ getPageList(1); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", null, null, false); } + + /// <summary> + /// 鏂规硶閲嶈浇 + /// </summary> + public SelectCk(string strGuid,string strItemId) + { + _strGuid = strGuid; + _strItemId = strItemId; + InitializeComponent(); + getPageList(1, _strItemId); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", null, null, false); + } + /// <summary> /// 鏌ヨ浜嬩欢 /// </summary> @@ -78,6 +93,46 @@ } } + /// <summary> + /// 鏂规硶閲嶈浇 + /// </summary> + /// <param name="curPage">绗嚑椤�</param> + /// <param name="pageSize">姣忛〉鍑犳潯</param> + private void getPageList(int curPage,string itemId) + { + gcMain.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); + _sbSqlWhere += (" and org.fid='" + _strGuid + "' and h.Id='" + itemId + "'"); + var pgq = new PageQueryModel(curPage, 999999, "org.FNumber asc ,a.depot_code", "asc", "", _sbSqlWhere.ToString()); + var json = JsonConvert.SerializeObject(pgq); + try + { + var strReturn = + UtilityHelper.HttpPost("", "MesDepotsManager/GetListPage3", json); + var dd = UtilityHelper.ReturnToTablePage(strReturn); + if (dd.rtnCode > 0) + { + DataTable dt = dd.rtnData.list; + gcMain.BindingContext = new BindingContext(); + if (dt.Rows.Count > 0) + { + gcMain.DataSource = dt; + gcMain.ForceInitialize(); + gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); + } + else + UtilityHelper.SetDefaultTable(gcMain, gridView1); + } + else + { + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + dd.rtnMsg); + } + } + catch (Exception ex) + { + MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + } + } + private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { var rowhandle = gridView1.FocusedRowHandle; -- Gitblit v1.9.3