public override ViewModelBase Initialize() { mViewModel = new EmployeesControlViewModel() { Employees = new ObservableCollection <Employee>(MainWindowController.serviceClient.GetEmployees()), BusinessUnits = new ObservableCollection <BusinessUnit>(MainWindowController.serviceClient.GetBusinessUnits()) }; return(mViewModel); }
public void ExecuteEmployeesCommand(object obj) { employeesControlController = new EmployeesControlController(); mViewModel.ActiveViewModel = employeesControlController.Initialize(); employeesControlViewModel = (EmployeesControlViewModel)mViewModel.ActiveViewModel; mViewModel.ButtonsEnabled = true; mViewModel.EmployeeCurrentBackColor = new SolidColorBrush(Colors.DodgerBlue); mViewModel.EmployeeCurrentForeColor = new SolidColorBrush(Colors.White); mViewModel.CostMonthCurrentBackColor = new SolidColorBrush(Colors.White); mViewModel.CostMonthCurrentForeColor = new SolidColorBrush(Colors.Black); mViewModel.CostBusinessUnitCurrentBackColor = new SolidColorBrush(Colors.White); mViewModel.CostBusinessUnitCurrentForeColor = new SolidColorBrush(Colors.Black); mViewModel.StartCurrentBackColor = new SolidColorBrush(Colors.White); mViewModel.StartCurrentForeColor = new SolidColorBrush(Colors.Black); mViewModel.VehiclesCurrentBackColor = new SolidColorBrush(Colors.White); mViewModel.VehiclesCurrentForeColor = new SolidColorBrush(Colors.Black); mViewModel.BusinessUnitCurrentBackColor = new SolidColorBrush(Colors.White); mViewModel.BusinessUnitCurrentForeColor = new SolidColorBrush(Colors.Black); mViewModel.UserCurrentBackColor = new SolidColorBrush(Colors.White); mViewModel.UserCurrentForeColor = new SolidColorBrush(Colors.Black); }