public HoiNghiDaDangKyWindow() { InitializeComponent(); viewModel = new HoiNghiDaDangKyViewModel(); viewModel.ListHoiNghi = HoiNghiDAO.GetAllHoiNghiDaDangKy(); int total = viewModel.ListHoiNghi.Count; viewModel.PagingInfo = new PagingInfoOfHNDDK(4, total); loadPageHoiNghiDaDangKy(1); }
private void timKiemBtn_MouseDown(object sender, MouseButtonEventArgs e) { if (timKiem_grid.Visibility == Visibility.Collapsed) { timKiem_grid.Visibility = Visibility.Visible; sapXep_grid.Visibility = Visibility.Collapsed; } else { timKiem_grid.Visibility = Visibility.Collapsed; sapXep_grid.Visibility = Visibility.Visible; tenHoiNghiTextBox.Text = ""; diadiemTextBox.Text = ""; viewModel.ListHoiNghi = HoiNghiDAO.GetAllHoiNghiDaDangKy(); viewModel.PagingInfo = new PagingInfoOfHNDDK(4, viewModel.ListHoiNghi.Count); loadPageHoiNghiDaDangKy(1); } }
private void ngayBatDauDatePicker_SelectedDateChanged(object sender, SelectionChangedEventArgs e) { string name = tenHoiNghiTextBox.Text.Trim(); string place = diadiemTextBox.Text.Trim(); DateTime date = ngayBatDauDatePicker.SelectedDate.GetValueOrDefault(); DateTime defaultDate = new DateTime(); if (name != "" || place != "" || date != defaultDate) { viewModel.ListHoiNghi = HoiNghiDAO.GetResultSearchHoiNghiDaDangKy(name, place, date); viewModel.PagingInfo = new PagingInfoOfHNDDK(4, viewModel.ListHoiNghi.Count); loadPageHoiNghiDaDangKy(1); } else { viewModel.ListHoiNghi = HoiNghiDAO.GetAllHoiNghiDaDangKy(); viewModel.PagingInfo = new PagingInfoOfHNDDK(4, viewModel.ListHoiNghi.Count); loadPageHoiNghiDaDangKy(1); } }