public CategoryDisplayViewModel() { _key = ""; _isFocused = true; _paging = new PagingWPF(); categoryAddDialog = new CategoryAddDialog(); categoryUpdateDialog = new CategoryUpdateDialog(); currentWindow = Application.Current.Windows.OfType <MetroWindow>().LastOrDefault(); }
public CategoryViewModel() { _currentWindow = Application.Current.Windows.OfType <MetroWindow>().LastOrDefault(); _categoryAddDialog = new CategoryAddDialog(); _categoryUpdateDialog = new CategoryUpdateDialog(); _categoryInformationDialog = new CategoryInformationDialog(); _categoriesSuggestions = _categoryServ.GetCategoriesSuggetions(); Load(); Companies = new ObservableCollection <Company>(_companyServ.GetCompanies()); }
public CategoryViewModel() { _stockServ = new StockServices(); _companyServ = new CompanyServices(); _categoryServ = new CategoryServices(); _categoryAddDialog = new CategoryAddDialog(); _categoryUpdateDialog = new CategoryUpdateDialog(); _categoryInformationDialog = new CategoryInformationDialog(); _key = ""; _isFocused = true; _currentWindow = Application.Current.Windows.OfType <MetroWindow>().LastOrDefault(); categories = _categoryServ.GetCategories(); _colorsSuggestions = categories.Select(s => s.Color).Distinct().ToList(); Stocks = new ObservableCollection <Stock>(_stockServ.GetStocks()); Companies = new ObservableCollection <Company>(_companyServ.GetCompanies()); Load(); }