protected void btnSearch_Click(object sender, EventArgs e) { if ((this.txtFName.Text.Trim() == "") && (this.txtMName.Text.Trim() == "") && (this.txtSurName.Text.Trim() == "") && (this.ddlGender.SelectedIndex == 0) && (this.ddlDistrict.SelectedIndex == 0) && (this.ddlOrgType.SelectedIndex == 0)) { this.lblStatusMessage.Text = "Please Enter (Or) Select Atleast One Field."; this.programmaticModalPopup.Show(); return; } List <ATTPersonSearch> lst; this.lblSearch.Text = ""; try { lst = BLLPersonSearch.SearchPerson(GetFilter()); this.lblSearch.Text = lst.Count.ToString() + " records found."; this.grdPerson.DataSource = lst; this.grdPerson.DataBind(); } catch (Exception ex) { this.lblStatusMessage.Text = ex.Message; this.programmaticModalPopup.Show(); } }
protected void btnPersonSearch_Click(object sender, EventArgs e) { try { List <ATTPersonSearch> lstPersonSearch; lstPersonSearch = BLLPersonSearch.SearchPerson(GetFilter()); Session["PopupPersonSearch"] = lstPersonSearch; this.grdPersonSearch.DataSource = lstPersonSearch; this.grdPersonSearch.DataBind(); this.programmaticPersonModalPopup.Show(); } catch (Exception ex) { lblStatusMessage.Text = ex.Message; programmaticModalPopup.Show(); } }