/
MainForm.cs
32 lines (30 loc) · 1.07 KB
/
MainForm.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System.Windows.Forms;
using SalaryReports.UserControls;
namespace SalaryReports
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
private void windowsUIView1_QueryControl(object sender, DevExpress.XtraBars.Docking2010.Views.QueryControlEventArgs e)
{
switch ((int)e.Document.Tag)
{
case 0:
e.Control = new DocumentViewerUserControl() { Report = new ManagementReport() };
break;
case 1:
e.Control = new DocumentViewerUserControl() { Report = new EmployeeReport() };
break;
case 2:
EmployeeReport report = new EmployeeReport();
report.Parameters["paramEmpName"].Value = string.Empty;
report.Parameters["paramEmpName"].Visible = false;
e.Control = new DocumentViewerUserControl() { Report = report };
break;
}
}
}
}