public ShowReportsVIewModel(ShowReports reportsOpen, tblEmployee logedEmployee) { view = reportsOpen; reportService = new ReportService(); ReportList = reportService.GetAllReports(); //selectedEmployee = new Employee(); EmployeeLogedIn = logedEmployee; }
private void ShowReportsCommandExecute() { try { if (MenagerLogedIn.SectorID == 1) { ShowReports reportsView = new ShowReports(MenagerLogedIn); main.Close(); reportsView.ShowDialog(); } else if (MenagerLogedIn.SectorID == 2) { ShowReportsReadOnly reportsView = new ShowReportsReadOnly(MenagerLogedIn); main.Close(); reportsView.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }