/// <summary> /// Function to fill datagridview /// </summary> public void GridFill() { try { CurrencySP spCurrency = new CurrencySP(); DataTable dtblCurrency = new DataTable(); dtblCurrency = spCurrency.CurrencySearch(txtNameSearch.Text.Trim(), txtSymbolSearch.Text.Trim()); dgvCurrency.DataSource = dtblCurrency; } catch (Exception ex) { MessageBox.Show("C7:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public List <DataTable> CurrencySearch(String strname, String strsymbol) { List <DataTable> listObj = new List <DataTable>(); try { listObj = SpCurrency.CurrencySearch(strname, strsymbol); } catch (Exception ex) { MessageBox.Show("C5:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } return(listObj); }
/// <summary> /// Function to fill datagridview /// </summary> public void GridFill() { try { CurrencySP spCurrency = new CurrencySP(); DataTable dtblCurrency = new DataTable(); if (txtCurrencyName.Text == string.Empty && txtCurrencySymbol.Text == string.Empty) { txtCurrencyName.Text = string.Empty; txtCurrencySymbol.Text = string.Empty; } dtblCurrency = spCurrency.CurrencySearch(txtCurrencyName.Text, txtCurrencySymbol.Text); dgvCurrency.DataSource = dtblCurrency; } catch (Exception ex) { MessageBox.Show("CDP1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }