CEL_Payroll/Payroll.Report/UI/frptUploadedComponent.cs

63 lines
1.6 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.Linq;
using System.Windows.Forms;
using Payroll.BO;
using Ease.CoreV35.Model;
using Ease.CoreV35.Utility;
using Ease.CoreV35;
namespace Payroll.Report
{
public partial class frptUploadedComponent : Form
{
public frptUploadedComponent()
{
InitializeComponent();
}
#region methods
private void RenderReport()
{
DateTime fromDate = dtpFromDate.Value;
DateTime toDate = dtpToDate.Value;
DataTable dtUploadedComponents = new PayrollDataSet.dsCompany.dtUploadedComponentDataTable();
dtUploadedComponents = ComponentUploadSetup.GetUploadedComponentReportData(fromDate, toDate).Copy();
fReportViewer rptViewer = new fReportViewer();
rptViewer.ShowUploadedComponentReport(dtUploadedComponents);
}
private void ResetControls()
{
dtpFromDate.Value = GlobalExtensions.FirstDateOfMonth(DateTime.Today);
dtpToDate.Value = GlobalExtensions.LastDateOfMonth(DateTime.Today);
}
#endregion
#region events
private void frptUploadedComponent_Load(object sender, EventArgs e)
{
ResetControls();
}
private void btnPreview_Click(object sender, EventArgs e)
{
RenderReport();
}
private void btnClose_Click(object sender, EventArgs e)
{
this.Close();
}
#endregion
}
}