using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Payroll.BO; namespace Payroll.Report { public partial class fRewardStatementReport : Form { private int _totalEmps = 0; public fRewardStatementReport() { InitializeComponent(); } private void btnShow_Click(object sender, EventArgs e) { try { if (this.ctlEmployee.SelectedEmployee != null) { string employeeNo = this.ctlEmployee.EmployeeNo; DateTime rewardYear = this.dtpYear.Value; rptRewardStatement rpt = new rptRewardStatement(); rpt.ShowReport(employeeNo, rewardYear); } else { MessageBox.Show("Please select an employee", "Select Employee", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); this.Close(); } } private void button1_Click(object sender, EventArgs e) { this.Close(); } } }