Ejemplo n.º 1
0
 /// <summary>
 /// On 'Print' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvDailyAttendanceReport.RowCount > 0)
         {
             DataSet   ds          = new DataSet();
             CompanySP spCompany   = new CompanySP();
             DataTable dtblCompany = spCompany.CompanyViewDataTable(1);
             ds.Tables.Add(dtblCompany);
             DailyAttendanceMasterSP spDailyAttendanceMaster = new DailyAttendanceMasterSP();
             DataTable dtblAttendance = spDailyAttendanceMaster.DailyAttendanceViewForDailyAttendanceReport(dtpDate.Text.Trim(), cmbStatus.Text.Trim(), cmbEmployee.Text.Trim(), cmbDesignation.Text.Trim());
             ds.Tables.Add(dtblAttendance);
             frmReport frmReportObj = new frmReport();
             frmReportObj.MdiParent = formMDI.MDIObj;
             frmReportObj.DailyAttendanceReportPrinting(ds);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "DAR:8" + ex.Message;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         DailyAttendanceMasterSP spDailyAttendanceMaster = new DailyAttendanceMasterSP();
         dgvDailyAttendanceReport.DataSource = spDailyAttendanceMaster.DailyAttendanceViewForDailyAttendanceReport(dtpDate.Text.Trim(), cmbStatus.Text.Trim(), cmbEmployee.Text.Trim(), cmbDesignation.Text.Trim());
         dgvDailyAttendanceReport.Columns["employeeId"].Visible = false;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "DAR:4" + ex.Message;
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         DailyAttendanceMasterSP spDailyAttendanceMaster = new DailyAttendanceMasterSP();
         dgvDailyAttendanceReport.DataSource = spDailyAttendanceMaster.DailyAttendanceViewForDailyAttendanceReport(dtpDate.Text.Trim(), cmbStatus.Text.Trim(), cmbEmployee.Text.Trim(), cmbDesignation.Text.Trim());
         dgvDailyAttendanceReport.Columns["employeeId"].Visible = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show("DAR:4" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// On 'Print' button click
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvDailyAttendanceReport.RowCount > 0)
         {
             DataSet ds = new DataSet();
             CompanySP spCompany = new CompanySP();
             DataTable dtblCompany = spCompany.CompanyViewDataTable(1);
             ds.Tables.Add(dtblCompany);
             DailyAttendanceMasterSP spDailyAttendanceMaster = new DailyAttendanceMasterSP();
             DataTable dtblAttendance = spDailyAttendanceMaster.DailyAttendanceViewForDailyAttendanceReport(dtpDate.Text.Trim(), cmbStatus.Text.Trim(), cmbEmployee.Text.Trim(), cmbDesignation.Text.Trim());
             ds.Tables.Add(dtblAttendance);
             frmReport frmReportObj = new frmReport();
             frmReportObj.MdiParent = formMDI.MDIObj;
             frmReportObj.DailyAttendanceReportPrinting(ds);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("DAR:8" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         DailyAttendanceMasterSP spDailyAttendanceMaster = new DailyAttendanceMasterSP();
         dgvDailyAttendanceReport.DataSource = spDailyAttendanceMaster.DailyAttendanceViewForDailyAttendanceReport(dtpDate.Text.Trim(), cmbStatus.Text.Trim(), cmbEmployee.Text.Trim(), cmbDesignation.Text.Trim());
         dgvDailyAttendanceReport.Columns["employeeId"].Visible = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show("DAR:4" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }