private void refresh() { if (_dc != null) { _dc.Dispose(); } _dc = new Models.CRMContext(); Users = _dc.Users.ToList(); }
private void refresh() { if (_dc != null) { _dc.Dispose(); } _dc = new Models.CRMContext(); Discounts = _dc.CumulativeDiscounts.ToList(); }
private void refresh() { if (_dc != null) { _dc.Dispose(); } _dc = new Models.CRMContext(); Services = _dc.Services.ToList(); }
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(); }