public SpecializationEditWindowViewModel(SpecializationsTabViewModel specializationsTabViewModel,
     SpecializationEditWindow specializationEditWindow, Specialization specialization)
     : base(specializationsTabViewModel, specializationEditWindow, specialization)
 {
     if (Update)
     {
         Specialization = new Specialization
         {
             SpecializationID = specialization.SpecializationID,
             Name = specialization.Name
         };
     }
     else
     {
         Specialization = new Specialization();
     }
 }
Beispiel #2
0
        private void Load()
        {
            TabsViewModels = new List<TabViewModel>();
            BuildingsTabViewModel = new BuildingsTabViewModel();
            CompaniesTabViewModel = new CompaniesTabViewModel();
            CyclicOrdersTabViewModel = new CyclicOrdersTabViewModel();
            EmployeesTabViewModel = new EmployeesTabViewModel();
            ExpensesTabViewModel = new ExpensesTabViewModel();
            LocalsTabViewModel = new LocalsTabViewModel();
            NotificationsTabViewModel = new NotificationsTabViewModel();
            OrdersTabViewModel = new OrdersTabViewModel();
            OrderTypesTabViewModel = new OrderTypesTabViewModel();
            OwnershipsTabViewModel = new OwnershipsTabViewModel();
            PeopleTabViewModel = new PeopleTabViewModel();
            OwningCompaniesTabViewModel = new OwningCompaniesTabViewModel();
            RentsTabViewModel = new RentsTabViewModel();
            ReportsTabViewModel = new ReportsTabViewModel();
            SalariesTabViewModel = new SalariesTabViewModel();
            SpecializationsTabViewModel = new SpecializationsTabViewModel();

            TabsViewModels.Add(BuildingsTabViewModel);
            TabsViewModels.Add(CompaniesTabViewModel);
            TabsViewModels.Add(CyclicOrdersTabViewModel);
            TabsViewModels.Add(EmployeesTabViewModel);
            TabsViewModels.Add(ExpensesTabViewModel);
            TabsViewModels.Add(NotificationsTabViewModel);
            TabsViewModels.Add(LocalsTabViewModel);
            TabsViewModels.Add(OrdersTabViewModel);
            TabsViewModels.Add(OrderTypesTabViewModel);
            TabsViewModels.Add(OwnershipsTabViewModel);
            TabsViewModels.Add(PeopleTabViewModel);
            TabsViewModels.Add(OwningCompaniesTabViewModel);
            TabsViewModels.Add(RentsTabViewModel);
            TabsViewModels.Add(SalariesTabViewModel);
            TabsViewModels.Add(SpecializationsTabViewModel);

            TabsViewModels.ForEach(vm => vm.PropertyChanged += OnMemberViewModelPropertyChanged);
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="specializationsTabViewModel">Specialization tab view model</param>
 /// <param name="specialization">Specialization</param>
 public SpecializationEditWindow(SpecializationsTabViewModel specializationsTabViewModel,
     Specialization specialization)
 {
     InitializeComponent();
     DataContext = new SpecializationEditWindowViewModel(specializationsTabViewModel, this, specialization);
 }