private void serviceClient_GetGlobalRegionCompleted(object sender, GetGlobalRegionCompletedEventArgs e) { if (this.Window.FaultHandle.Handle(e)) { return; } if (e.Result.ResultList != null) { LogGlobalRegionBody firstItem = new LogGlobalRegionBody() { GlobalID = null, GlobalName = CommonResource.ComboBox_ExtraAllText }; List <LogGlobalRegionBody> list = e.Result.ResultList.ToList(); list.Insert(0, firstItem); this.ddlGlobal.ItemsSource = list; LogQueryModel queryModel = e.UserState as LogQueryModel; if (queryModel != null) { this.ddlGlobal.SelectedValue = queryModel.GlobalID; } else { this.ddlGlobal.SelectedIndex = 0; } } this.DataGridLogList.QueryCriteria = GridSearchArea.DataContext; this.DataGridLogList.Bind(); }
void QueryLogConfigClientGetGlobalRegionCompleted(object sender, GetGlobalRegionCompletedEventArgs e) { if (m_logCategoryConfig.Window.FaultHandle.Handle(e)) { return; } //var result = m_isEdit ? e.Result.ResultList : FilterInActiveGlobalRegion(e.Result.ResultList); var result = e.Result.ResultList; result.Insert(0, new QueryLogConfigService.LogGlobalRegionBody { GlobalName = CommonResource.ComboBox_ExtraSelectText, Status = QueryLogConfigService.Status.Active }); ComboBoxGlobal.ItemsSource = result; if (m_selectedGlobalId != null) { ComboBoxGlobal.SelectedValue = m_selectedGlobalId; } else { ComboBoxGlobal.SelectedIndex = 0; } }
void QueryLogConfigClientGetGlobalRegionCompleted(object sender, GetGlobalRegionCompletedEventArgs e) { if (m_logCategoryConfig.Window.FaultHandle.Handle(e)) { return; } ComboBoxGlobal.ItemsSource = e.Result.ResultList; if (e.Result.ResultList != null && e.Result.ResultList.Count() > 0) { GlobalId = e.Result.ResultList[0].GlobalID; ComboBoxGlobal.SelectedValue = GlobalId; } }
void QueryLogConfigClientGetGlobalRegionCompleted(object sender, GetGlobalRegionCompletedEventArgs e) { if (m_logCategoryConfig.Window.FaultHandle.Handle(e)) { return; } if (e.Result != null) { var collection = new ObservableCollection <QueryLogConfigService.LogGlobalRegionBody>(); foreach (var item in e.Result.ResultList) { collection.Add(item); } DataGridGlobalInfos.ItemsSource = collection; } this.ButtonNew.IsEnabled = true; this.ButtonCancel.IsEnabled = true; }
void QueryLogConfigClientGetGlobalRegionCompleted(object sender, GetGlobalRegionCompletedEventArgs e) { if (Window.FaultHandle.Handle(e)) { return; } ObservableCollection <QueryLogConfigService.LogGlobalRegionBody> list = e.Result.ResultList; if (list != null && list.Count > 0) { list.Insert(0, new QueryLogConfigService.LogGlobalRegionBody { GlobalName = CommonResource.ComboBox_ExtraAllText }); } ComboBoxGlobal.ItemsSource = list; if (list != null && list.Count > 0) { var dataContext = GridSearchArea.DataContext as CategoryQueryModel; if (dataContext != null) { if (Request != null && Request.QueryString != null && Request.QueryString.Count > 0) { dataContext.GlobalID = Request.QueryString["GlobalID"]; } else { dataContext.GlobalID = list[0].GlobalID; } } } if (m_criteria != null) { ComboBoxGlobal.SelectedValue = m_criteria.GlobalID; } }