public MainDepartmentViewModel(long id, AdministratorMainPageViewModel adminVM) { DbContext = new DataBaseContext(); AdmininstratorVM = adminVM; HeadDepartment = DbContext.Departments.Find(id); GoToDepartmentCommand = new DelegateCommand <long?>(GoToDepartment); }
public EditMainDepartmentViewModel(long?id, AdministratorMainPageViewModel adminVM) { DbContext = new DataBaseContext(); HeadDepartment = DbContext.Departments.Find(id); Persons = DbContext.Persons.ToList(); //DeanSearchStringChangedCommand = new DelegateCommand(DeanSearchStringChanged); AddDeanCommand = new DelegateCommand(AddDean); }
public ChildDepartmentViewModel(long?id, AdministratorMainPageViewModel adminVM) { AdmininstratorVM = adminVM; DbContext = new DataBaseContext(); if (id != null) { ChildDepartment = DbContext.Departments.Find(id); } }