예제 #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)
     {
         MessageBox.Show("MSR:9" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
예제 #2
0
        public List <DataTable> MonthlySalryViewAllForMonthlySalaryReports(DateTime dtpFromDate, DateTime dtpToDate, string strDesignation, string strEmployeeCode, DateTime dtpSalaryMonth)//Coded By Swafiyy
        {
            List <DataTable> listMonthlySalry = new List <DataTable>();

            try
            {
                listMonthlySalry = SpMonthlySalary.MonthlySalryViewAllForMonthlySalaryReports(dtpFromDate, dtpToDate, strDesignation, strEmployeeCode, dtpSalaryMonth);
            }
            catch (Exception ex)
            {
                MessageBox.Show("MSV:4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(listMonthlySalry);
        }
예제 #3
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)
     {
         MessageBox.Show("MSR:1" + ex.Message, "Open Miracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }