From 5a7f68bf4dbbdca1abbb939bd43e1fb695bc7c0b Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期六, 23 八月 2025 15:39:04 +0800
Subject: [PATCH] 数据过滤
---
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs | 54 +++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 45 insertions(+), 9 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs
index ab45b47..dcb8848 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesRohIn.cs
@@ -1,5 +1,6 @@
using DevExpress.XtraEditors;
using DevExpress.XtraGrid.Views.Grid;
+using Gs.DevApp.DevFrm.Rk;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
@@ -24,7 +25,8 @@
toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
this.toolBarMenu1.getXmlConfig();
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "docStusTxt", "", (value) =>
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, this, "docStusTxt", "", (value) =>
{
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
}, tips);
@@ -37,7 +39,6 @@
}, lbGuid);
getPageList(1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
- txt_supplier.getSuppler("");
}
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
@@ -111,7 +112,7 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+ gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date",
"asc", "", _sbSqlWhere.ToString());
var json = JsonConvert.SerializeObject(pgq);
@@ -145,9 +146,13 @@
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
+ /// <summary>
+ /// 璇诲彇瀹炰綋
+ /// </summary>
+ /// <param name="strGuid"></param>
private void getModel(string strGuid)
{
bool isEdit = false;
@@ -155,7 +160,7 @@
if (toolBarMenu1.currentAction == "edit") isEdit = true;
if (string.IsNullOrEmpty(strGuid))
{
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
var _obj = new
@@ -179,8 +184,7 @@
var _job = JObject.Parse(strJson);
var array = new JArray();
foreach (var a in _job["rtnData"]["list"]) array.Add(a);
- var dt =
- JsonConvert.DeserializeObject<DataTable>(
+ var dt = JsonConvert.DeserializeObject<DataTable>(
array.ToString());
if (dt.Rows.Count > 0)
{
@@ -193,16 +197,48 @@
{
UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
}
+
+ var array2 = new JArray();
+ foreach (var a in _job["rtnData"]["list2"]) array2.Add(a);
+ var dt2 = JsonConvert.DeserializeObject<DataTable>(
+ array2.ToString());
+ if (dt2.Rows.Count > 0)
+ {
+ gcMx2.BindingContext = new BindingContext();
+ gcMx2.DataSource = dt2;
+ gcMx2.ForceInitialize();
+ gvMx2.BestFitColumns();
+ }
+ else
+ {
+ UtilityHelper.SetDefaultTable(gcMx2, gvMx2);
+ }
}
else
{
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
+
+ /// <summary>
+ /// 鏌ョ湅鍒拌揣璁板綍锛屾牴鎹噰璐槑缁唃uid
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void rptHistory_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
+ {
+ var rowhandle = gvMx1.FocusedRowHandle;
+ if (rowhandle < 0)
+ return;
+ var dr = gvMx1.GetDataRow(rowhandle);
+ var mxGuid = dr["guid"].ToString();
+ HistoryDhmxcs frm = new HistoryDhmxcs(mxGuid);
+ frm.ShowDialog();
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.3