public HistoryPage(HistoryPageViewModel viewModel) { NavigationPage.SetHasNavigationBar(this, false); BindingContext = viewModel; HistoryPageViewModel = viewModel; InitializeComponent(); }
public HistoryPageDetail(string selectedTicketNumber) { // dch rkl 11/22/2016 add filter by parts/labor/all _selectedTicketNumber = selectedTicketNumber; //_vm = new HistoryPageViewModel(selectedTicketNumber); _vm = new HistoryPageViewModel(selectedTicketNumber, ""); InitializeComponent(); Initialize(); }
public ActionResult GetSitemapTable(string historyRowId, int startIndex) { var model = GetPartOfSitemap(historyRowId, startIndex); var content = RenderHelper.PartialView(this, "_SitemapTable", model.Content); var result = new HistoryPageViewModel <string> { Content = content, HistoryPager = model.HistoryPager }; return(new JsonNetResult(result)); }
private void DeleteThreadFile(object sender, RoutedEventArgs e) { var flip = MainFlip.SelectedItem as HistoryPagePostsFlipModel; var thread = flip.thread; var store = new StoreToFiles(); store.DeleteThread(thread); viewModel = new HistoryPageViewModel(MainFlip); MainGrid.DataContext = viewModel; }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (e.NavigationMode == NavigationMode.Back) { var item = MainFlip.SelectedItem as IHistoryPageFlipModel; item.Refresh(); } else { viewModel = new HistoryPageViewModel(MainFlip); MainGrid.DataContext = viewModel; } }
private async void RefreshAllThreads(object sender, RoutedEventArgs e) { var button = sender as AppBarButton; button.IsEnabled = false; if (MainFlip.Items.Count > 0) { var flip = viewModel.FlipCollection[0] as HistoryThreadsFlipModel; await flip.Refresh(); viewModel = new HistoryPageViewModel(MainFlip); MainGrid.DataContext = viewModel; } button.IsEnabled = true; }
// dch rkl 11/22/2016 filter the list for parts/labor/both BEGIN private void FilterList() { string sPLA = ""; if ((bool)_radParts.IsChecked) { sPLA = "P"; } else if ((bool)_radLabor.IsChecked) { sPLA = "L"; } _vm = new HistoryPageViewModel(_selectedTicketNumber, sPLA); _historyList.ItemsSource = _vm.History; }
public static HistoryPageViewModel <IEnumerable <T> > GetHistoryPage <T>(this IList <T> source, int startIndex, int pageCapacity, string callBackUrl, string historyRowId = null) { var rowsCount = source.Count; var enablePagination = pageCapacity < rowsCount; var res = new HistoryPageViewModel <IEnumerable <T> > { Content = source.Take(pageCapacity), HistoryPager = new HistoryPagerViewModel { EnablePagination = enablePagination, IsLastPage = !enablePagination, IsFirstPage = startIndex == 0, NextStartIndex = startIndex + pageCapacity, PreviousStartIndex = startIndex - pageCapacity, ActionUrl = callBackUrl, HistoryRowId = historyRowId } }; return(res); }
public HistoryPage() { InitializeComponent(); BindingContext = new HistoryPageViewModel(); }
public HistoryPageDetail(string selectedTicketNumber) { _vm = new HistoryPageViewModel(selectedTicketNumber); Initialize(); }
private void HistoryPage_Loaded(object sender, RoutedEventArgs e) { DataContext = new HistoryPageViewModel(); }
public HistoryPopUp(HistoryPageViewModel historyPageViewModel) { BindingContext = historyPageViewModel; InitializeComponent(); }