Exemplo n.º 1
0
 /// <summary>
 /// On 'Print' button click to take print
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgvAdvancePayment.Rows.Count > 0)
         {
             DataSet   ds          = new DataSet();
             CompanySP spCompany   = new CompanySP();
             DataTable dtblCompany = spCompany.CompanyViewDataTable(1);
             ds.Tables.Add(dtblCompany);
             AdvancePaymentSP spAdvancePayment   = new AdvancePaymentSP();
             DataTable        dtblAdvancePayment = new DataTable();
             dtblAdvancePayment = spAdvancePayment.AdvancePaymentViewAllForAdvancePaymentReport(dtpFrmDate.Value, dtpToDate.Value, cmbEmployeeCode.Text, DateTime.Parse(dtpSalaryMonth.Text.ToString()));
             ds.Tables.Add(dtblAdvancePayment);
             frmReport frmReportObj = new frmReport();
             frmReportObj.MdiParent = formMDI.MDIObj;
             frmReportObj.AdvancePaymentReportPrinting(ds);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "APR:8 " + ex.Message;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         AdvancePaymentSP spAdvancePayment = new AdvancePaymentSP();
         DataTable        dtbl             = spAdvancePayment.AdvancePaymentViewAllForAdvancePaymentReport(dtpFrmDate.Value, dtpToDate.Value, cmbEmployeeCode.Text, dtpSalaryMonth.Value);
         dgvAdvancePayment.DataSource = dtbl;
         TotalAmount();
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "APR:1 " + ex.Message;
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         DataTable        dtblAdvancePayment = new DataTable();
         AdvancePaymentSP spAdvanceRegister  = new AdvancePaymentSP();
         dtblAdvancePayment            = spAdvanceRegister.AdvanceRegisterSearch(txtAdvanceVoucher.Text, txtEmployeeCode.Text, txtEmployeeName.Text, dtpSalaryMonth.Text, cmbVoucherType.Text);
         dgvAdvanceRegister.DataSource = dtblAdvancePayment;
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "AR1:" + ex.Message;
     }
 }
Exemplo n.º 4
0
 /// <summary>
 /// Function to fill cmbVoucherType combobox
 /// </summary>
 public void VoucherTypeNameComboFill()
 {
     try
     {
         AdvancePaymentSP spAdvancePaymentSP  = new AdvancePaymentSP();
         DataTable        dtblVoucherTypeName = new DataTable();
         dtblVoucherTypeName = spAdvancePaymentSP.VoucherTypeNameComboFillAdvanceRegister();
         DataRow dr = dtblVoucherTypeName.NewRow();
         dr[1] = "All";
         dtblVoucherTypeName.Rows.InsertAt(dr, 0);
         cmbVoucherType.DataSource    = dtblVoucherTypeName;
         cmbVoucherType.ValueMember   = "voucherTypeId";
         cmbVoucherType.DisplayMember = "voucherTypeName";
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "AR2:" + ex.Message;
     }
 }