protected void btnSearch_Click(object sender, EventArgs e)
    {
        if (
            this.txtFName.Text.Trim() == "" &&
            this.txtMName.Text.Trim() == "" &&
            this.txtSName.Text.Trim() == "" &&
            this.txtLisenceNo.Text.Trim() == "" &&
            this.ddlLawyerType.SelectedIndex == 0 &&
            this.ddlUnit.SelectedIndex == 0 &&
            this.ddlSex.SelectedIndex == 0
            )
        {
            this.lblStatus.Text = "Please enter atleast one criteria for record selecttion.";
            return;
        }

        ATTLawyerSearch search = this.GetFilter();

        try
        {
            List <ATTLawyerSearch> lst = BLLLawyerSearch.GetLawyerList(search);
            Session["LstSrchedData"]     = lst;
            this.grdLawyer.SelectedIndex = -1;
            this.grdLawyer.DataSource    = lst;
            this.grdLawyer.DataBind();
            this.lblStatus.Text = "";
        }
        catch (Exception ex)
        {
            this.lblStatus.Text = ex.Message;
        }
    }
Ejemplo n.º 2
0
    protected void btnSearchLawyer_Click(object sender, EventArgs e)
    {
        ATTLawyerCount lawyer = new ATTLawyerCount();

        lawyer.LawyerTypeID = int.Parse(this.ddlLawyerType.SelectedValue);
        lawyer.Type         = LawyerType.NepalBarAssociation;

        try
        {
            this.grdCount.DataSource = BLLLawyerSearch.GetLawyerCount(lawyer);
            this.grdCount.DataBind();
            this.grdCount.Columns[0].Visible = false;
        }
        catch (Exception ex)
        {
            this.ShowMessage(ex, null);
        }
    }