public ShowEmployeesViewModel(ShowEmployeesView employeesOpen, tblEmployee logedEmployee) { view = employeesOpen; employeeService = new EmployeeService(); EmployeeList = employeeService.GetAllNonManagerEmployees(); //selectedEmployee = new Employee(); EmployeeLogedIn = logedEmployee; }
private void ShowEmoloyeesExecute() { try { if (MenagerLogedIn.AccessLevelID == 1) { ShowEmployeesView employeesView = new ShowEmployeesView(MenagerLogedIn); main.Close(); employeesView.ShowDialog(); } else if (MenagerLogedIn.AccessLevelID == 2) { ShowManagersReadOnly employeesView = new ShowManagersReadOnly(MenagerLogedIn); main.Close(); employeesView.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }