public MainDepartmentViewModel(long id, AdministratorMainPageViewModel adminVM)
 {
     DbContext             = new DataBaseContext();
     AdmininstratorVM      = adminVM;
     HeadDepartment        = DbContext.Departments.Find(id);
     GoToDepartmentCommand = new DelegateCommand <long?>(GoToDepartment);
 }
示例#2
0
 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);
 }
示例#3
0
 public ChildDepartmentViewModel(long?id, AdministratorMainPageViewModel adminVM)
 {
     AdmininstratorVM = adminVM;
     DbContext        = new DataBaseContext();
     if (id != null)
     {
         ChildDepartment = DbContext.Departments.Find(id);
     }
 }