/// <summary> /// Function to fill Datagridview /// </summary> public void SearchRegister() { try { string strVoucherNo = txtVoucherNo.Text; string strToDate = string.Empty; string strFromDate = string.Empty; if (txtToDate.Text == string.Empty) { strToDate = txtFromDate.Text; } else { strToDate = txtToDate.Text; } if (txtFromDate.Text == string.Empty) { strFromDate = DateTime.Now.ToString(); } else { strFromDate = txtFromDate.Text; } DataTable dtbl = new DataTable(); CreditNoteMasterSP spCreditNoteMasterSp = new CreditNoteMasterSP(); dtbl = spCreditNoteMasterSp.CreditNoteRegisterSearch(strVoucherNo, strFromDate, strToDate); dgvCreditNoteRegister.DataSource = dtbl; } catch (Exception ex) { formMDI.infoError.ErrorString = "CRNTREG1:" + ex.Message; } }
/// <summary> /// Function to fill Datagridview /// </summary> public void SearchRegister() { try { string strVoucherNo = txtVoucherNo.Text; string strToDate = string.Empty; string strFromDate = string.Empty; if (txtToDate.Text == string.Empty) { strToDate = txtFromDate.Text; } else { strToDate = txtToDate.Text; } if (txtFromDate.Text == string.Empty) { strFromDate = DateTime.Now.ToString(); } else { strFromDate = txtFromDate.Text; } DataTable dtbl = new DataTable(); CreditNoteMasterSP spCreditNoteMasterSp = new CreditNoteMasterSP(); dtbl = spCreditNoteMasterSp.CreditNoteRegisterSearch(strVoucherNo, strFromDate, strToDate); dgvCreditNoteRegister.DataSource = dtbl; } catch (Exception ex) { MessageBox.Show("CRNTREG1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }