示例#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();
        }