private void OnWindowLoaded(object sender, RoutedEventArgs e) { var context = new SystemRoleDomainContext(); LoadRoleBusyIndicatory.IsBusy = true; context.GetAllRoles((obj) => { LoadRoleBusyIndicatory.IsBusy = false; if (Utility.Utility.CheckInvokeOperation(obj)) { SystemRolesList.ItemsSource = obj.Value; } }, null); }
private void OnRoleAutoCompleteBoxPopulating(object sender, PopulatingEventArgs e) { var acb = sender as AutoCompleteBox; if (acb != null) { var context = new SystemRoleDomainContext(); context.SearchRole(e.Parameter, (obj) => { if (Utility.Utility.CheckInvokeOperation(obj)) { acb.ItemsSource = obj.Value; } }, null); } }