예제 #1
0
    protected void ddlColumn_SelectedIndexChanged(object sender, EventArgs e)
    {
        tr1.Visible = false;
        if (ddlColumn.SelectedItem.Text != "Select" && DropDownList1.SelectedItem.Text == "LP")
        {
            tr1.Visible     = true;
            lblColumn1.Text = "LP Name";
            DataTable  ds = new DataTable();
            GeneralBAL lp = new GeneralBAL();
            ds = lp.FetchLPGridDetails1(ddlColumn.SelectedItem.Text);

            ddlColumn1.DataSource     = ds;
            ddlColumn1.DataTextField  = "lpname";
            ddlColumn1.DataValueField = "lpid";
            ddlColumn1.DataBind();
            ddlColumn1.Items.Insert(0, "Select");
            RequiredFieldValidator2.ErrorMessage = "Choose LP Name";
        }
        else if (DropDownList1.SelectedItem.Text == "Festivals" && ddlColumn.SelectedItem.Text != "Select")
        {
            DataSet    details = new DataSet();
            GeneralBAL fest    = new GeneralBAL();
            details = fest.FetchFestivalBySearch(ddlColumn.SelectedValue.ToString());
            GridView1.DataSource = details.Tables[1];
            GridView1.DataBind();
        }
        else if (DropDownList1.SelectedItem.Text == "Historical Spots" && ddlColumn.SelectedItem.Text != "Select")
        {
            DataSet    details = new DataSet();
            GeneralBAL fest    = new GeneralBAL();
            details = fest.FetchDetailBySearch(ddlColumn.SelectedValue.ToString());
            GridView1.DataSource = details.Tables[1];
            GridView1.DataBind();
        }
    }
예제 #2
0
    protected void ddlColumn_SelectedIndexChanged(object sender, EventArgs e)
    {
        tr1.Visible = false;
        if (ddlColumn.SelectedItem.Text != "Select" && DropDownList1.SelectedItem.Text == "LP")
        {
            tr1.Visible = true;
            lblColumn1.Text = "LP Name";
            DataTable ds = new DataTable();
            GeneralBAL lp = new GeneralBAL();
            ds = lp.FetchLPGridDetails1(ddlColumn.SelectedItem.Text);

            ddlColumn1.DataSource = ds;
            ddlColumn1.DataTextField = "lpname";
            ddlColumn1.DataValueField = "lpid";
            ddlColumn1.DataBind();
            ddlColumn1.Items.Insert(0, "Select");
            RequiredFieldValidator2.ErrorMessage = "Choose LP Name";
        }
        else if (DropDownList1.SelectedItem.Text == "Festivals" && ddlColumn.SelectedItem.Text != "Select")
        {
            DataSet details = new DataSet();
            GeneralBAL fest = new GeneralBAL();
            details = fest.FetchFestivalBySearch(ddlColumn.SelectedValue.ToString());
            GridView1.DataSource = details.Tables[1];
            GridView1.DataBind();
        }
        else if (DropDownList1.SelectedItem.Text == "Historical Spots" && ddlColumn.SelectedItem.Text != "Select")
        {
            DataSet details = new DataSet();
            GeneralBAL fest = new GeneralBAL();
            details = fest.FetchDetailBySearch(ddlColumn.SelectedValue.ToString());
            GridView1.DataSource = details.Tables[1];
            GridView1.DataBind();
        }
    }