From e959523030890924756789c23c9adacd926fdba3 Mon Sep 17 00:00:00 2001 From: cyf Date: Fri, 30 May 2025 09:41:42 +0000 Subject: [PATCH] SVN r656 SVN-Revision: r656 --- 插件库/Lskj.PubMrpAnalyze/MrpAnalyzeMain.cs | 67 ++++++++++----------- 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/插件库/Lskj.PubMrpAnalyze/MrpAnalyzeMain.cs b/插件库/Lskj.PubMrpAnalyze/MrpAnalyzeMain.cs index 8eb7bcd..8d4bc72 100644 --- a/插件库/Lskj.PubMrpAnalyze/MrpAnalyzeMain.cs +++ b/插件库/Lskj.PubMrpAnalyze/MrpAnalyzeMain.cs @@ -486,16 +486,44 @@ namespace Lskj.PubMrpAnalyze ModuleGridEx moduleGridEx = null; + if (moduleObject is ModuleGridDetailEx) + { + ModuleGridDetailEx moduleGridDetailEx = moduleObject as ModuleGridDetailEx; + if (moduleGridDetailEx.ModuleGridObj.SysModel.IncomingSetCondition&& rowItem!=null) + { + foreach (ControlModel item in moduleGridDetailEx.SearchObj.ControlModels) + { + if (rowItem.Table.Columns.Contains(item.FieldName)) + { + moduleGridEx.SearchObj.SetControlValue(item, rowItem[item.FieldName] + ""); + } + } + } + + } if (moduleObject is ModuleGridEx) { moduleGridEx = moduleObject as ModuleGridEx; + + if (moduleGridEx.SysModel.IncomingSetCondition && rowItem != null) + { + foreach (ControlModel item in moduleGridEx.SearchObj.ControlModels) + { + if (rowItem.Table.Columns.Contains(item.FieldName)) + { + moduleGridEx.SearchObj.SetControlValue(item, rowItem[item.FieldName] + ""); + } + } + } //if (this.MoudleMainObj.RefreshTheInterface) //{ // moduleGridEx.OnSaveGridCallBack -= ModuleGridEx_OnSaveGridCallBack; // moduleGridEx.OnSaveGridCallBack += ModuleGridEx_OnSaveGridCallBack; //} } + + if (model != null) { if (!string.IsNullOrEmpty(model.UnionModule) && (string.IsNullOrEmpty(model.UnionValue) && string.IsNullOrEmpty(model.UnionCond))) return; @@ -1181,9 +1209,11 @@ namespace Lskj.PubMrpAnalyze this.gd_LeftBottom.LastSearchSql = searchSql; this.gd_LeftBottom.SetGridViewDataSource(sourceTab); } - catch (Exception) + catch (Exception ex) { - + LogHelper.Instance.WriteError(ex); + string Message = ErrorMessage.PromptErrorMessage(ex); + MessageUtil.Show(Message); } } /// @@ -1267,35 +1297,4 @@ namespace Lskj.PubMrpAnalyze } else if (e.Page == this.xtraTabpageDeatil) { - ERPInfo.Instance.MrpTag = "1"; - this.SearchDetailObj.SearchGrid(); - this.SetDetailGridDataSource(); - } - } - private void OnRefreshMainData(object sender, EventArgs e) - { - if (this.SearchMainObj != null) - { - this.SearchMainObj.SearchGrid(); - this.SetDetailGridDataSource(); - } - } - private void OnRefreshDetailData(object sender, EventArgs e) - { - if (this.SearchDetailObj != null) - { - this.SearchDetailObj.SearchGrid(); - this.SetDetailGridDataSource(); - } - } - private void OnRefreshDetailBottomData(object sender, EventArgs e) - { - if (this.SearchDetailBottomObj != null) - { - this.SearchDetailBottomObj.SearchGrid(); - this.SetDetailGridDataSource(); - } - } - #endregion - } -} + \ No newline at end of file