public DetailHoaDonPage(HoaDonViewModel hd) { var pageService = new PageService(); var dataAccess = new SQLiteHoaDonStore(DependencyService.Get <ISQLite>()); ViewModel = new DetailHoaDonPageViewModel(dataAccess, hd, pageService); InitializeComponent(); }
protected override void OnAppearing() { var dataAccess = new SQLiteHoaDonStore(DependencyService.Get <ISQLite>()); var pageService = new PageService(); ViewModel = new ListHoaDonViewModel(dataAccess, pageService); base.OnAppearing(); ViewModel.LoadDataCommand.Execute(null); }
public MyBagPage(ObservableCollection <FoodViewModel> x) { //var dataAccessFood = new SQLiteFoodStore(DependencyService.Get<ISQLite>()); var dataAccessHoaDon = new SQLiteHoaDonStore(DependencyService.Get <ISQLite>()); var pageService = new Services.PageService(); ViewModel = new MyBagViewModel(x, dataAccessHoaDon, pageService); this.BindingContext = ViewModel; InitializeComponent(); }
protected async override void OnAppearing() { base.OnAppearing(); var hoaDonStore = new SQLiteHoaDonStore(DependencyService.Get <ISQLite>()); var pageService = new PageService(); ViewModel = new ThongKeDoanhThuViewModel(hoaDonStore, pageService); ViewModel.LoadDataCommad.Execute(null); chartView.Chart = new LineChart { ValueLabelOrientation = Orientation.Horizontal, Entries = await ViewModel.LoadChartAsync(), LabelTextSize = 30 }; chartRadar.Chart = new RadarChart { Entries = await ViewModel.LoadChartAsync(), }; }