CEL_Payroll/Payroll.Report/UI/rptRoleAudit.cs

45 lines
1.4 KiB
C#
Raw Permalink Normal View History

2024-09-17 14:30:13 +06:00
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 Microsoft.Reporting.WinForms;
namespace Payroll.Report
{
public partial class rptRoleAudit : Form
{
DataTable data1 = null;
string sDate = "";
public rptRoleAudit()
{
InitializeComponent();
}
public void ShowDlg(DataTable dt1, string sDate1)
{
sDate = sDate1;
data1 = dt1.Copy();
this.ShowDialog();
}
private void rptRoleAudit_Load(object sender, EventArgs e)
{
Payroll.Report.PayrollDataSet.PayrollDataSet.dtRoleAuditDataTable dt1 = new Payroll.Report.PayrollDataSet.PayrollDataSet.dtRoleAuditDataTable();
List<ReportDataSource> dataSource = new List<ReportDataSource>();
string embeddedResource = "Payroll.Report.RDLC.rptRoleAudit.rdlc";
string caption = "Role Audit";
dataSource.Add(new ReportDataSource("PayrollDataSet_dtRoleAudit", data1));
Cursor.Current = Cursors.WaitCursor;
fReportViewer fViewer = new fReportViewer();
//sDate = "User bad login attempt report for month :" + sDate;
fViewer.PreviewReport2(dataSource, embeddedResource, caption, sDate);
this.Close();
}
}
}