public AddReportViewModel(AddReportView addReportView, vwEmployee employee) { this.addReportView = addReportView; this.employee = employee; report = new vwReport(); report.EmployeeID = employee.EmployeeID; }
public void AddReportExecute() { try { AddReportView addReport = new AddReportView(Employee); addReport.ShowDialog(); ReportList = reports.GetAllEmployeeReports(employee.EmployeeID); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public void AddExecute() { try { AddReportView form = new AddReportView(Maintenance); form.ShowDialog(); GetReports(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void LoginExecute() { try { switch (role.RoleName) { case "WPFadmin": WPFadminView adminMenu = new WPFadminView(); adminMenu.ShowDialog(); break; case "Employee": AddReportView addReport = new AddReportView(); addReport.ShowDialog(); break; case "Manager": tblManager manager = Service.Service.GetManagerById(logged.EmployeeID); if (manager.AccessLevel == "Modify") { ModifyView modify = new ModifyView(); modify.ShowDialog(); } else { ReadOnlyView readOnly = new ReadOnlyView(); readOnly.ShowDialog(); } break; } } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public AddReportViewModel(AddReportView reportView, vwClinicMaintenance maintenance) { this.reportView = reportView; Maintenance = maintenance; Date = DateTime.Now.ToShortDateString(); }