本文整理汇总了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;
}
示例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();
}