Example #1
0
 /// <summary>
 /// Search function to fill the grid based on condition
 /// </summary>
 public void ReportSearch()
 {
     try
     {
         DataTable            dtblPDCClearnceReport = new DataTable();
         PDCClearanceMasterSP sppdcClearance        = new PDCClearanceMasterSP();
         dtblPDCClearnceReport         = sppdcClearance.PDCClearanceReportSearch(Convert.ToDateTime(dtpFrmDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), cmbAccountLedger.Text.ToString(), cmbVoucherType.Text.ToString(), txtVoucherNo.Text.ToString());
         DGVClraranceReport.DataSource = dtblPDCClearnceReport;
     }
     catch (Exception ex)
     {
         MessageBox.Show("PCREP5" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #2
0
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void Search()
 {
     try
     {
         DataTable            dtblPDCClearnceRegister = new DataTable();
         PDCClearanceMasterSP SppdcClearance          = new PDCClearanceMasterSP();
         dtblPDCClearnceRegister       = SppdcClearance.PDCClearanceRegisterSearch(Convert.ToDateTime(dtpFromDate.Value.ToString()), Convert.ToDateTime(dtpTodate.Value.ToString()), cmbAccountLedger.Text, cmbVouchertype.Text, txtCheckno.Text.Trim(), Convert.ToDecimal(cmbBank.SelectedValue), cmbStatus.Text);
         dgvClearanceSearch.DataSource = dtblPDCClearnceRegister;
     }
     catch (Exception ex)
     {
         MessageBox.Show("PCREG6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #3
0
 /// <summary>
 /// print button click, call the print function
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         if (DGVClraranceReport.RowCount > 0)
         {
             PDCClearanceMasterSP SPPdcClearance = new PDCClearanceMasterSP();
             DataSet dsPDCClearance = new DataSet();
             dsPDCClearance = SPPdcClearance.PDCClearanceReportPrinting(Convert.ToDateTime(dtpFrmDate.Value.ToString()), Convert.ToDateTime(dtpToDate.Value.ToString()), cmbAccountLedger.Text.ToString(), cmbVoucherType.Text.ToString(), txtVoucherNo.Text.ToString(), 1);
             ////frmReport //frmReport = new frmReport();
             //frmReport.MdiParent = formMDI.MDIObj;
             //    frmreport.PDCClearanceReportPrinting(dsPDCClearance);
         }
         else
         {
             Messages.InformationMessage("No data found");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PCREP12:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #4
0
 /// <summary>
 /// Function to fill VoucherType combobox
 /// </summary>
 public void VoucherTypeComboFill()
 {
     try
     {
         isDontExecuteVoucherType = true;
         DataTable            dtbl           = new DataTable();
         PDCClearanceMasterSP sppdcClearance = new PDCClearanceMasterSP();
         cmbVoucherType.DataSource = null;
         dtbl = sppdcClearance.VouchertypeComboFill();
         DataRow dr = dtbl.NewRow();
         dr["voucherTypeId"]   = 0;
         dr["voucherTypeName"] = "All";
         dtbl.Rows.InsertAt(dr, 0);
         cmbVoucherType.DataSource    = dtbl;
         cmbVoucherType.ValueMember   = "voucherTypeId";
         cmbVoucherType.DisplayMember = "voucherTypeName";
         cmbVoucherType.SelectedIndex = 0;
         isDontExecuteVoucherType     = false;
     }
     catch (Exception ex)
     {
         MessageBox.Show("PCREP2" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }