/// <summary> /// Function to fill the grid /// </summary> public void Gridfill() { try { List<DataTable> ListObj = new List<DataTable>(); AccountLedgerBll bllAccountLedger = new AccountLedgerBll(); if (cmbAccountGroup.Text.Trim() == string.Empty) { cmbAccountGroup.Text = "All"; } if (txtMobile.Text.Trim() == string.Empty) { txtMobile.Text = "All"; } if (txtPhone.Text.Trim() == string.Empty) { txtPhone.Text = "All"; } if (txtEmail.Text.Trim() == string.Empty) { txtEmail.Text = "All"; } if (txtLedgerName.Text.Trim() == string.Empty) { txtLedgerName.Text = "All"; } if (txtMobile.Text == "All") { txtMobile.Text = string.Empty; } if (txtPhone.Text == "All") { txtPhone.Text = string.Empty; } if (txtEmail.Text == "All") { txtEmail.Text = string.Empty; } if (txtLedgerName.Text == "All") { txtLedgerName.Text = string.Empty; } ListObj = bllAccountLedger.PartyAddressBookSearch(cmbAccountGroup.Text, txtMobile.Text, txtPhone.Text, txtEmail.Text, txtLedgerName.Text); dvgPartyAddressBook.DataSource = ListObj[0]; } catch (Exception ex) { MessageBox.Show("PAB:1" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }