当前位置: 首页>>代码示例>>C#>>正文


C# IUserService.GetList方法代码示例

本文整理汇总了C#中IUserService.GetList方法的典型用法代码示例。如果您正苦于以下问题:C# IUserService.GetList方法的具体用法?C# IUserService.GetList怎么用?C# IUserService.GetList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IUserService的用法示例。


在下文中一共展示了IUserService.GetList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: getAllRoom

 private void getAllRoom()
 {
     if (PageViewModel.StateManager.AllUser== null)
     {
         userService = new UserServiceClient();
         _allUser = userService.GetList();
         PageViewModel.StateManager.AllUser = _allUser;
     }
     else
         _allUser = PageViewModel.StateManager.AllUser;
 }
开发者ID:BrettLeeARV,项目名称:Arvato.TestProject.UserManagement,代码行数:11,代码来源:UserInfoConverter.cs

示例2: Initialize

        private void Initialize()
        {
            MessengerInstance.Send(new LoadingMessage("Please wait..."));

            // set up commands
            AddBookingCommand = new RelayCommand(this.AddBooking);
            EditBookingCommand = new RelayCommand(this.EditBooking, CanEditSelectedBooking);
            CancelBookingCommand = new RelayCommand(this.CancelBooking, CanEditSelectedBooking);
            SelectedDatesCommand = new RelayCommand<SelectionChangedEventArgs>(this.SelectedDates);
            UpdateCalendarCommand = new RelayCommand( () => UpdateCalendarControl(true) );

            BackgroundWorker worker = new BackgroundWorker();
            worker.DoWork += (object sender, DoWorkEventArgs e) =>
            {   
                // set up options for filtering
                _roomService = new RoomServiceClient();
                _userService = new UserServiceClient();
                var rooms = _roomService.GetList(true);
                _allRoomOptions = new ObservableCollection<RoomComboBoxItem>()
                {
                    new RoomComboBoxItem()
                };
                foreach (var room in rooms)
                {
                    _allRoomOptions.Add(new RoomComboBoxItem() { Room = room });
                }
                RaisePropertyChanged("RoomOptions");
                var users = _userService.GetList();
                _allUserOptions = new ObservableCollection<UserComboBoxItem>()
                {
                    new UserComboBoxItem()
                };
                foreach (var user in users)
                {
                    _allUserOptions.Add(new UserComboBoxItem() { User = user });
                }
                RaisePropertyChanged("UserOptions");

                // set up sensible defaults for filters
                FilterStartDate = DateTime.Today;
                FilterEndDate = FilterStartDate.AddMonths(1);
                FilterUser = StateManager.CurrentUser;
                FilterCanceled = false;

                this.PropertyChanged += new PropertyChangedEventHandler(BookingsListViewModel_PropertyChanged);
            }; 
            worker.RunWorkerCompleted += (object sender, RunWorkerCompletedEventArgs e) =>
            {
                _isInitialized = true;
                MessengerInstance.Send(new LoadingMessage(false));

                // Finally, get the bookings needed (will start it's own BackgroundWorker)
                _bookingService = new BookingServiceClient();
                RefreshBookings(true);
            };
            worker.RunWorkerAsync();
            
        }
开发者ID:BrettLeeARV,项目名称:Arvato.TestProject.UserManagement,代码行数:58,代码来源:BookingsListViewModel.cs


注:本文中的IUserService.GetList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。