protected void btnSearch_Click(object sender, EventArgs e) { try { this.lblMessage.Text = ""; string strDupCriteria = ""; if (this.chkLicenseNo.Checked == true) { strDupCriteria = strDupCriteria + "L"; } if (this.chkLType.Checked == true) { strDupCriteria = strDupCriteria + "T"; } if (this.chkUnit.Checked == true) { strDupCriteria = strDupCriteria + "U"; } if (this.chkLawyerName.Checked == true) { strDupCriteria = strDupCriteria + "N"; } if (strDupCriteria == "") { this.lblMessage.Text = "Either One of The CheckBox Has To Be Selected."; return; } Session["RowsDelete"] = strDupCriteria; int intUnitID = (this.ddlUnit.SelectedIndex > 0 ? int.Parse(this.ddlUnit.SelectedValue.ToString()) : 0); int intTypeID = (this.ddlType.SelectedIndex > 0 ? int.Parse(this.ddlType.SelectedValue.ToString()) : 0); this.lblMessage.Text = ""; List <ATTLawyerInfoSearch> lst; lst = BLLLawyerInfoSearch.getDuplicateEntry(FindDuplicateSQL(intUnitID, intTypeID, strDupCriteria)); this.grdDisplay.DataSource = lst; this.grdDisplay.DataBind(); if (lst.Count > 0) { this.lblMessage.Text = lst.Count.ToString() + " Records Found."; } else { this.lblMessage.Text = "No Records Found."; } } catch (Exception ex) { lblMessage.Text = "<B>" + ex.Message + "</B>"; } }
protected void btnDisplay_Click(object sender, EventArgs e) { try { List <ATTLawyerInfoSearch> lstLISrch = new List <ATTLawyerInfoSearch>(); lstLISrch = BLLLawyerInfoSearch.GetLawyerInfoSearchList(GetFilter()); if (lstLISrch.Count > 0) { grdDisplay.DataSource = lstLISrch; grdDisplay.DataBind(); Session["lstLISrch"] = lstLISrch; } else { this.grdDisplay.DataSource = ""; this.grdDisplay.DataBind(); lblSearchStatus.Text = " No Records Found !!!! "; btnExport.Visible = false; } string rdType = ""; if (this.optNBA.Checked == true) { rdType = "optNBA"; } else { rdType = "optNBC"; } ScriptManager.RegisterStartupScript(this, this.GetType(), "diplayFields", "javascript:DisplayFields('" + rdType + "');", true); } catch (Exception ex) { this.lblStatusMessage.Text = ex.Message; this.programmaticModalPopup.Show(); } }