Exemplo n.º 1
0
        public HistoryPage(HistoryPageViewModel viewModel)
        {
            NavigationPage.SetHasNavigationBar(this, false);
            BindingContext = viewModel;

            HistoryPageViewModel = viewModel;

            InitializeComponent();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 7
0
        // 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;
        }
Exemplo n.º 8
0
        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);
        }
Exemplo n.º 9
0
 public HistoryPage()
 {
     InitializeComponent();
     BindingContext = new HistoryPageViewModel();
 }
Exemplo n.º 10
0
 public HistoryPageDetail(string selectedTicketNumber)
 {
     _vm = new HistoryPageViewModel(selectedTicketNumber);
     Initialize();
 }
Exemplo n.º 11
0
 private void HistoryPage_Loaded(object sender, RoutedEventArgs e)
 {
     DataContext = new HistoryPageViewModel();
 }
Exemplo n.º 12
0
        public HistoryPopUp(HistoryPageViewModel historyPageViewModel)
        {
            BindingContext = historyPageViewModel;

            InitializeComponent();
        }