From f4d5aa97370f698c63b0b9f185f06e7bae56975c Mon Sep 17 00:00:00 2001 From: cdk <2441919651@qq.com> Date: 星期二, 19 八月 2025 08:15:50 +0800 Subject: [PATCH] Merge branch 'master' of http://git.gs-mes.com:8080/r/~tjx/GsMesClient --- DevApp/Gs.DevApp/DevFrm/QC/MesQcExceptional.cs | 86 ++++++++++++++++++++++++++++-------------- 1 files changed, 57 insertions(+), 29 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/QC/MesQcExceptional.cs b/DevApp/Gs.DevApp/DevFrm/QC/MesQcExceptional.cs index 5ac946a..89348e8 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/MesQcExceptional.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/MesQcExceptional.cs @@ -15,6 +15,14 @@ { string _webServiceName = "MesQcExceptionalManager/"; List<FilterEntity> _filterList = new List<FilterEntity>(); + + public void Initialize(string param) + { + // 浣跨敤param杩涜鍒濆鍖栧伐浣� + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); + getModel(param); + } + public MesQcExceptional() { InitializeComponent(); @@ -38,6 +46,7 @@ getPageList(1); pageBar1.PagerEvent += PageBar1_PagerEvent; } + private void GridView1_ColumnFilterChanged(object sender, EventArgs e) { _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); @@ -131,7 +140,7 @@ /// <param name="pageSize">姣忛〉鍑犳潯</param> private void getPageList(int curPage) { - var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); + gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); string json = JsonConvert.SerializeObject(pgq); try @@ -164,10 +173,13 @@ } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } - } + /// <summary> + /// 璇诲彇瀹炰綋 + /// </summary> + /// <param name="strGuid"></param> private void getModel(string strGuid) { bool isEdit = false; @@ -175,7 +187,7 @@ if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } var _obj = new @@ -206,6 +218,8 @@ gcMx1.DataSource = dt; gcMx1.ForceInitialize(); gvMx1.BestFitColumns(); + + Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1); } else { @@ -213,11 +227,11 @@ } } else - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } @@ -231,41 +245,55 @@ /// <param name="inFieldValue"></param> private void _toolCk(int _inFieldValue) { + string strMsg = ""; + switch (_inFieldValue) + { + case 1: + strMsg = "瀹℃牳"; + break; + case 0: + strMsg = "鍙嶅鏍�"; + break; + }; toolBarMenu1.guidKey = ""; string rowGuid, rowName; - (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, - lbGuid, txt_fBillNo, gridView1, "fBillNo"); - toolBarMenu1.guidKey = rowGuid; + (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "fBillNo"); if (string.IsNullOrEmpty(rowGuid)) { MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鎿嶄綔鍚楋紵")) + if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵")) return; - var frm = new MesQcExceptionalShow(rowGuid); - frm.UpdateParent += (s, e) => + var _obj = new { - int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); - gridView1.FocusedRowHandle = rowHandle; - UtilityHelper.SetCheckIco(gridView1, "chkStatus", "checkBy", "checkDate", picCheckBox, this, _inFieldValue.ToString()); + guid = rowGuid, + inFieldValue = _inFieldValue, }; - frm.ShowDialog(); - } - - public event EventHandler<UpdateParentEventArgs> UpdateParent; - private void simpleButton1_Click(object sender, EventArgs e) - { - if (UpdateParent != null) + try { - List<string> lst = new List<string>(); - lst.Add("1"); - lst.Add("2"); - UpdateParent?.Invoke(this, - new UpdateParentEventArgs { StringList = lst }); + var strJson = UtilityHelper.HttpPost("", + _webServiceName + "EditModelSubmit", + JsonConvert.SerializeObject(_obj)); + var _rtn = UtilityHelper.ReturnToDynamic(strJson); + if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) + { + MsgHelper.ShowInformation(_rtn.rtnData.outMsg.ToString()); + if (xtraTabControl1.SelectedTabPageIndex == 1) + { + getModel(lbGuid.Text.Trim()); + } + int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); + gridView1.FocusedRowHandle = rowHandle; + UtilityHelper.SetCheckIco(gridView1, "chkStatus", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString()); + } + else + MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString()); } - - + catch (Exception ex) + { + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); + } } } } \ No newline at end of file -- Gitblit v1.9.3