public StatisticViewModel()
        {
            dataAccess = DataAccess.DataAccess.Instance;
            dataAccess.Attach(this);

            sales = new ObservableCollection <Sale>(dataAccess.Sales);
        }
Exemple #2
0
        public StockViewModel()
        {
            dataAccess = DataAccess.DataAccess.Instance;
            dataAccess.Attach(this);

            Udpate();
        }
Exemple #3
0
        public StatisticViewModel()
        {
            dataAccess = DataAccess.DataAccess.Instance;
            dataAccess.Attach(this);

            saleFilename = String.Format("{0:00}_{1}.xml", DateTime.Now.Month, DateTime.Now.Year);
            LoadSaleData(saleFilename);
        }
        public SettingsViewModel()
        {
            clearBasketBarcode = Properties.Settings.Default.ClearBasketBarcode;

            dataAccess = DataAccess.DataAccess.Instance;
            dataAccess.Attach(this);

            Udpate();
        }
Exemple #5
0
        public SaleViewModel()
        {
            dataAccess = DataAccess.DataAccess.Instance;
            dataAccess.Attach(this);

            basketItems = new ObservableCollection <BasketItem>();
            sales       = new ObservableCollection <Sale>(dataAccess.Sales);
            InitializeSaleToday();
            UpdateSaleToday();
        }
Exemple #6
0
        public SaleViewModel()
        {
            dataAccess = DataAccess.DataAccess.Instance;
            dataAccess.Attach(this);

            shoppingBasket = new ObservableCollection <SaleProduct>();
            invokers       = new ObservableCollection <Invoker>();
            sales          = new ObservableCollection <Sale>(dataAccess.Sales);
            InitializeSaleToday();
            UpdateSaleToday();
        }
Exemple #7
0
        public StartViewModel()
        {
            dataAccess = DataAccess.DataAccess.Instance;
            dataAccess.Attach(this);

            kioskFilename = Properties.Settings.Default.Filename;

            expiringProducts     = new ObservableCollection <Product>();
            productsShortInStock = new ObservableCollection <Product>();

            Udpate();
        }
        public MainViewModel()
        {
            dataAccess = DataAccess.DataAccess.Instance;

            kioskFilename    = Properties.Settings.Default.Filename;
            saleFilename     = String.Format("{0:00}_{1}.xml", DateTime.Now.Month, DateTime.Now.Year);
            settingsFilename = Properties.Settings.Default.SettingFilename;

            LoadKioskData(kioskFilename);
            LoadSaleData();
            LoadSettingsData();

            //dataAccess.AddBarcodeSetting(new BarcodeSetting(0, "fix", 7.4, "42181828", true));

            dataAccess.Attach(this);
        }