예제 #1
0
 /// <summary>
 /// On 'Print' button click for print
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvMonthlySalary.Rows.Count > 0)
         {
             DataSet   ds          = new DataSet();
             CompanySP spCompany   = new CompanySP();
             DataTable dtblCompany = spCompany.CompanyViewDataTable(1);
             ds.Tables.Add(dtblCompany);
             MonthlySalarySP spMonthlySalary   = new MonthlySalarySP();
             DataTable       dtblMonthlySalary = spMonthlySalary.MonthlySalryViewAllForMonthlySalaryReports(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), cmbDesignation.Text, cmbEmployeeCode.Text, Convert.ToDateTime(dtpSalaryMonth.Value.ToString()));
             ds.Tables.Add(dtblMonthlySalary);
             frmReport frmReportObj = new frmReport();
             frmReportObj.MdiParent = formMDI.MDIObj;
             frmReportObj.MonthlySalaryReportPrinting(ds);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "MSR:9" + ex.Message;
     }
 }
예제 #2
0
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         MonthlySalarySP spMonthlySalary = new MonthlySalarySP();
         DataTable       dtbl            = spMonthlySalary.MonthlySalryViewAllForMonthlySalaryReports(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), cmbDesignation.Text, cmbEmployeeCode.Text, Convert.ToDateTime(dtpSalaryMonth.Value.ToString()));
         dgvMonthlySalary.DataSource = dtbl;
         txtTotalAmount.Text         = TotalAmount().ToString();
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "MSR:1" + ex.Message;
     }
 }