Пример #1
0
        private void refresh()
        {
            if (_dc != null)
            {
                _dc.Dispose();
            }

            _dc   = new Models.CRMContext();
            Users = _dc.Users.ToList();
        }
Пример #2
0
        private void refresh()
        {
            if (_dc != null)
            {
                _dc.Dispose();
            }

            _dc       = new Models.CRMContext();
            Discounts = _dc.CumulativeDiscounts.ToList();
        }
Пример #3
0
        private void refresh()
        {
            if (_dc != null)
            {
                _dc.Dispose();
            }

            _dc      = new Models.CRMContext();
            Services = _dc.Services.ToList();
        }
Пример #4
0
        private void refreshData(int customerID)
        {
            _dc.Dispose();
            _dc       = new Models.CRMContext();
            _customer = _dc.Customers
                        .Where(x => x.ID == customerID)
                        .Include(x => x.DiscountCard)
                        .Include(x => x.Appointments)
                        .Include(x => x.FinancialTransactions)
                        .First();

            _discountCard       = _customer.DiscountCard;
            DiscountCardEnabled = _discountCard != null;

            VisitHistory          = _customer.Appointments;
            FinancialTransactions = _customer.FinancialTransactions;

            refreshProperties();
        }