void XmlClient_ListFuncTableColumnCompleted(object sender, ListFuncTableColumnCompletedEventArgs e) { if (e.Error == null) { AppFunc app = new AppFunc(); ListFunc.Clear(); app.Address = ""; app.Binding = ""; app.FuncName = ""; app.Language = "请选择......."; app.Parameter = new System.Collections.ObjectModel.ObservableCollection <Parameter>(); app.SplitChar = ""; ListFunc.Add(app); if (e.Result != null) { foreach (var item in e.Result.Keys.FirstOrDefault()) { ListFunc.Add(item); } } if (e.Result != null) { ListTableColumn = e.Result.Values.FirstOrDefault(); this.cmbFunc.ItemsSource = ListFunc; if (Entity == null) { this.cmbFunc.SelectedIndex = 0; } else { for (int i = 0; i < ListFunc.Count; i++) { if (ListFunc[i].FuncName == Entity.FUNCTIONNAME) { this.cmbFunc.SelectedIndex = i; } } } } MsgOpen = e.MsgLinkUrl; } }
void XmlClient_ListFuncTableColumnCompleted(object sender, ListFuncTableColumnCompletedEventArgs e) { if (e.Error == null) { if (otherModel) { #region 其他模块选择 if (e.Result != null) { ListTableColumn = e.Result.Values.FirstOrDefault(); this.cmbValue.ItemsSource = ListTableColumn; //this.cmbColumn.ItemsSource = ListTableColumn; } #endregion } else { #region 模块名称选择 AppFunc app = new AppFunc(); ListFunc.Clear(); app.Address = ""; app.Binding = ""; app.FuncName = ""; app.Language = "请选择......."; app.Parameter = new System.Collections.ObjectModel.ObservableCollection<WcfParameter>(); app.SplitChar = ""; ListFunc.Add(app); if (e.Result != null) { foreach (var item in e.Result.Keys.FirstOrDefault()) { ListFunc.Add(item); } } if (e.Result != null) { ListTableColumn = e.Result.Values.FirstOrDefault(); this.cmbValue.ItemsSource = ListTableColumn; this.cmbColumn.ItemsSource = ListTableColumn; this.cmbFunc.ItemsSource = ListFunc; if (Entity == null) { this.cmbFunc.SelectedIndex = 0; } else { for (int i = 0; i < ListFunc.Count; i++) { if (ListFunc[i].FuncName == Entity.FUNCTIONNAME) { this.cmbFunc.SelectedIndex = i; } } } } if (Entity != null) { if (first == 0) { this.cbSystemCode.SelectedByObject<FLOW_MODELDEFINE_T>("SYSTEMCODE", Entity.SYSTEMCODE); this.cbModelCode.SelectedByObject<FLOW_MODELDEFINE_T>("MODELCODE", Entity.MODELCODE); this.cmbFunc.SelectedByObject<AppFunc>("FuncName", Entity.FUNCTIONNAME); first++; } } #endregion MsgOpen = e.MsgLinkUrl; } if (this.chkIsMsg.IsChecked == true) { SetIsEnabled(false); } } }
private bool otherModel = false; //是否是其他模块选择,如果是,则功能名称不变 void XmlClient_ListFuncTableColumnCompleted(object sender, ListFuncTableColumnCompletedEventArgs e) { if (e.Error == null) { if (otherModel) { #region 其他模块选择 if (e.Result != null) { ListTableColumn = e.Result.Values.FirstOrDefault(); this.cmbValue.ItemsSource = ListTableColumn; //this.cmbColumn.ItemsSource = ListTableColumn; } #endregion } else { #region 模块名称选择 AppFunc app = new AppFunc(); ListFunc.Clear(); app.Address = ""; app.Binding = ""; app.FuncName = ""; app.Language = "请选择......."; app.Parameter = new System.Collections.ObjectModel.ObservableCollection <Parameter>(); app.SplitChar = ""; ListFunc.Add(app); if (e.Result != null) { foreach (var item in e.Result.Keys.FirstOrDefault()) { ListFunc.Add(item); } } if (e.Result != null) { ListTableColumn = e.Result.Values.FirstOrDefault(); this.cmbValue.ItemsSource = ListTableColumn; this.cmbColumn.ItemsSource = ListTableColumn; this.cmbFunc.ItemsSource = ListFunc; if (Entity == null) { this.cmbFunc.SelectedIndex = 0; } else { for (int i = 0; i < ListFunc.Count; i++) { if (ListFunc[i].FuncName == Entity.FUNCTIONNAME) { this.cmbFunc.SelectedIndex = i; } } } } if (Entity != null) { if (first == 0) { this.cbSystemCode.SelectedByObject <FLOW_MODELDEFINE_T>("SYSTEMCODE", Entity.SYSTEMCODE); this.cbModelCode.SelectedByObject <FLOW_MODELDEFINE_T>("MODELCODE", Entity.MODELCODE); this.cmbFunc.SelectedByObject <AppFunc>("FuncName", Entity.FUNCTIONNAME); first++; } } #endregion MsgOpen = e.MsgLinkUrl; } if (this.chkIsMsg.IsChecked == true) { SetIsEnabled(false); } } }