public override ViewModelBase Initialize() { mViewModel = new CostUnitMonthControlViewModel() { CostOfBusinessUnits = new ObservableCollection <MonthlyBusinessUnitCost>(MainWindowController.serviceClient.GetMonthlyBusinessUnitCosts()) }; return(mViewModel); }
public void ExecuteCostUnitCommand(object obj) { costUnitMonthControlController = new CostUnitMonthControlController(); mViewModel.ActiveViewModel = costUnitMonthControlController.Initialize(); costUnitMonthControlViewModel = (CostUnitMonthControlViewModel)mViewModel.ActiveViewModel; mViewModel.ButtonsEnabled = false; mViewModel.StartCurrentBackColor = new SolidColorBrush(Colors.White); mViewModel.StartCurrentForeColor = new SolidColorBrush(Colors.Black); mViewModel.CostMonthCurrentBackColor = new SolidColorBrush(Colors.White); mViewModel.CostMonthCurrentForeColor = new SolidColorBrush(Colors.Black); mViewModel.CostBusinessUnitCurrentBackColor = new SolidColorBrush(Colors.DodgerBlue); mViewModel.CostBusinessUnitCurrentForeColor = new SolidColorBrush(Colors.White); mViewModel.VehiclesCurrentBackColor = new SolidColorBrush(Colors.White); mViewModel.VehiclesCurrentForeColor = new SolidColorBrush(Colors.Black); mViewModel.EmployeeCurrentBackColor = new SolidColorBrush(Colors.White); mViewModel.EmployeeCurrentForeColor = 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); }