Ejemplo n.º 1
0
        public MainPage()
        {
            SQLiteGeneral sqlDb       = new SQLiteGeneral(DependencyService.Get <ISQLiteDb>(), "");
            PageService   pageService = new PageService();

            mainModel = new DashboardViewModel(sqlDb, pageService);
            InitializeComponent();
            init.InitializeCategories();
            dpkFrom.SetValue(DatePicker.MinimumDateProperty, DateTime.Today.AddMonths(-12));
            dpkFrom.SetValue(DatePicker.MaximumDateProperty, DateTime.Today);
            dpkTo.SetValue(DatePicker.MinimumDateProperty, DateTime.Today.AddMonths(-12));
            dpkTo.SetValue(DatePicker.MaximumDateProperty, DateTime.Today);
            mainModel.FromDate = DateTime.Today.AddDays(-30);
            mainModel.ToDate   = DateTime.Today;
        }