public MainViewModel() { if (App.Current != null) { _myObjectContext = App.Current.MyContext; Chat = new AutoRefreshWrapper <Chat>(_myObjectContext.Chats, _myObjectContext, RefreshMode.StoreWins); } }
public PaymentsViewModel(IWindowManager windowManager) { if (App.Current != null) { _esClinicContext = App.Current.EsClinicContext; Payors = new AutoRefreshWrapper<Payor>(_esClinicContext.Payors, "Session", _esClinicContext, RefreshMode.StoreWins); _windowManager = windowManager; } Services = new BindableCollection<Service>(); Drugs = new BindableCollection<Drug>(); Surcharges = new BindableCollection<Surcharge>(); var surchanges = _esClinicContext.Surcharges.ToList(); foreach (var surchange in surchanges) { Surcharges.Add(surchange); } }
public PaymentsViewModel(IWindowManager windowManager) { if (App.Current != null) { _esClinicContext = App.Current.EsClinicContext; Payors = new AutoRefreshWrapper <Payor>(_esClinicContext.Payors, "Session", _esClinicContext, RefreshMode.StoreWins); _windowManager = windowManager; } Services = new BindableCollection <Service>(); Drugs = new BindableCollection <Drug>(); Surcharges = new BindableCollection <Surcharge>(); var surchanges = _esClinicContext.Surcharges.ToList(); foreach (var surchange in surchanges) { Surcharges.Add(surchange); } }