Пример #1
0
        public DetailHoaDonPage(HoaDonViewModel hd)
        {
            var pageService = new PageService();
            var dataAccess  = new SQLiteHoaDonStore(DependencyService.Get <ISQLite>());

            ViewModel = new DetailHoaDonPageViewModel(dataAccess, hd, pageService);
            InitializeComponent();
        }
Пример #2
0
        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);
        }
Пример #3
0
        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(),
            };
        }