public AddReportViewModel(AddReportView addReportView, vwEmployee employee)
 {
     this.addReportView = addReportView;
     this.employee      = employee;
     report             = new vwReport();
     report.EmployeeID  = employee.EmployeeID;
 }
Esempio n. 2
0
 public void AddReportExecute()
 {
     try
     {
         AddReportView addReport = new AddReportView(Employee);
         addReport.ShowDialog();
         ReportList = reports.GetAllEmployeeReports(employee.EmployeeID);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Esempio n. 3
0
 public void AddExecute()
 {
     try
     {
         AddReportView form = new AddReportView(Maintenance);
         form.ShowDialog();
         GetReports();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Esempio n. 4
0
        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());
            }
        }
Esempio n. 5
0
 public AddReportViewModel(AddReportView reportView, vwClinicMaintenance maintenance)
 {
     this.reportView = reportView;
     Maintenance     = maintenance;
     Date            = DateTime.Now.ToShortDateString();
 }