update keep search text on data center page
This commit is contained in:
parent
db1b58e499
commit
d7bbfca952
|
@ -1,12 +1,10 @@
|
||||||
using Http.Core.Contexts;
|
using Http.Core.Contexts;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PCUT.ViewModels;
|
using PCUT.ViewModels;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Windows.Storage;
|
using Windows.Storage;
|
||||||
using Windows.UI.Popups;
|
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
using Windows.UI.Xaml.Controls;
|
using Windows.UI.Xaml.Controls;
|
||||||
using Windows.UI.Xaml.Input;
|
using Windows.UI.Xaml.Input;
|
||||||
|
@ -40,6 +38,11 @@ namespace PCUT.Pages
|
||||||
{
|
{
|
||||||
var mainMenuPageViewModel = e.Parameter as MainMenuPageViewModel;
|
var mainMenuPageViewModel = e.Parameter as MainMenuPageViewModel;
|
||||||
ViewModels.Categories = mainMenuPageViewModel.Categories;
|
ViewModels.Categories = mainMenuPageViewModel.Categories;
|
||||||
|
ViewModels.Pagination.InitSearchText(mainMenuPageViewModel.DataCenterSearchValue);
|
||||||
|
ViewModels.Pagination.TextSearched += (sender, args) =>
|
||||||
|
{
|
||||||
|
mainMenuPageViewModel.DataCenterSearchValue = args.Text;
|
||||||
|
};
|
||||||
base.OnNavigatedTo(e);
|
base.OnNavigatedTo(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,23 +1,18 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Windows.Storage;
|
|
||||||
using Windows.UI.Xaml.Media;
|
using Windows.UI.Xaml.Media;
|
||||||
using Windows.UI.Xaml.Media.Imaging;
|
using Windows.UI.Xaml.Media.Imaging;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using PCUT.Entities;
|
using PCUT.Entities;
|
||||||
using PCUT.Entities.ApiResponse;
|
using PCUT.Entities.ApiResponse;
|
||||||
using PCUT.Extensions;
|
using PCUT.Extensions;
|
||||||
using PCUT.Models;
|
using PCUT.Models;
|
||||||
using Http.Core;
|
using Http.Core;
|
||||||
using Http.Core.Contexts;
|
|
||||||
using Http.Core.Extensions;
|
using Http.Core.Extensions;
|
||||||
using static Http.Core.Constants.HttpConstants;
|
using static Http.Core.Constants.HttpConstants;
|
||||||
using System.ComponentModel;
|
|
||||||
using Windows.ApplicationModel.Core;
|
using Windows.ApplicationModel.Core;
|
||||||
using Http.Core.Exceptions;
|
using Http.Core.Exceptions;
|
||||||
|
|
||||||
|
|
|
@ -2,20 +2,10 @@
|
||||||
using PCUT.Entities;
|
using PCUT.Entities;
|
||||||
using PCUT.Models;
|
using PCUT.Models;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Http.Core;
|
|
||||||
using Http.Core.Extensions;
|
using Http.Core.Extensions;
|
||||||
using static Http.Core.Constants.HttpConstants;
|
using static Http.Core.Constants.HttpConstants;
|
||||||
using Newtonsoft.Json;
|
|
||||||
using Windows.UI.Popups;
|
|
||||||
using Http.Core.Contexts;
|
using Http.Core.Contexts;
|
||||||
using System.Collections.ObjectModel;
|
|
||||||
using Windows.UI.Xaml.Controls;
|
|
||||||
using Windows.UI.Xaml;
|
using Windows.UI.Xaml;
|
||||||
|
|
||||||
namespace PCUT.ViewModels
|
namespace PCUT.ViewModels
|
||||||
|
@ -99,5 +89,7 @@ namespace PCUT.ViewModels
|
||||||
Categories.Load(categories);
|
Categories.Load(categories);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string DataCenterSearchValue { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,6 +56,15 @@ namespace PCUT.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void InitSearchText(string text)
|
||||||
|
{
|
||||||
|
if (_searchText != text)
|
||||||
|
{
|
||||||
|
_searchText = text;
|
||||||
|
RaisePropertyChanged(nameof(SearchText));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private int _page = 0;
|
private int _page = 0;
|
||||||
public int Page
|
public int Page
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue