/// <summary> /// Function to fill Datagridview /// </summary> public void Gridfill() { try { string strType = string.Empty; if (rbtnDeposit.Checked) { strType = "Deposit"; } else { strType = "Withdraw"; } ContraMasterSP spContraMaster = new ContraMasterSP(); DataTable dtbl = new DataTable(); dtbl = spContraMaster.ContraVoucherRegisterSearch(Convert.ToDateTime(dtpFromDate.Value), Convert.ToDateTime(dtpToDate.Value), txtVoucherNo.Text.Trim(), cmbBankOrCash.Text, strType); dgvContraRegister.DataSource = dtbl; } catch (Exception ex) { MessageBox.Show("CR:2" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
/// <summary> /// Function to fill Datagridview /// </summary> public void Gridfill() { try { string strType = string.Empty; if (rbtnDeposit.Checked) { strType = "Deposit"; } else { strType = "Withdraw"; } ContraMasterSP spContraMaster = new ContraMasterSP(); DataTable dtbl = new DataTable(); dtbl = spContraMaster.ContraVoucherRegisterSearch(Convert.ToDateTime(dtpFromDate.Value), Convert.ToDateTime(dtpToDate.Value), txtVoucherNo.Text.Trim(), cmbBankOrCash.Text, strType); dgvContraRegister.DataSource = dtbl; } catch (Exception ex) { formMDI.infoError.ErrorString = "CR2:" + ex.Message; } }