Beispiel #1
0
    protected void gridPageChanging(object sender, GridViewPageEventArgs e)
    {
        LPDetailsBAL lp = new LPDetailsBAL();

        ds = lp.FetchLP1();
        gridviewLP.DataSource = ds.Tables[0];
        gridviewLP.PageIndex  = e.NewPageIndex;
        gridviewLP.DataBind();
    }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.Cache.SetNoStore();

        if (!IsPostBack)
        {
            ddlReligion.Enabled = false;
            ddlDynasty.Enabled  = false;

            #region Fetch Grid Page Size Details...
            DataTable  pg = new DataTable();
            GeneralBAL pz = new GeneralBAL();
            pg = pz.FetchGridPageSize();
            if (pg.Rows.Count != 0 && pg.Rows[0][1].ToString() != string.Empty)
            {
                gridviewLP.PageSize = Convert.ToInt32(pg.Rows[0][1].ToString());
            }
            #endregion

            LPDetailsBAL lp = new LPDetailsBAL();
            ds = lp.FetchLP1();

            ddlReligion.DataSource     = ds.Tables[1];
            ddlReligion.DataTextField  = "ReligionName";
            ddlReligion.DataValueField = "ReligionID";
            ddlReligion.DataBind();
            ddlReligion.Items.Insert(0, "==Select==");

            ddlLPCategory.DataSource     = ds.Tables[2];
            ddlLPCategory.DataTextField  = "Lpcategoryname";
            ddlLPCategory.DataValueField = "Lpcategoryid";
            ddlLPCategory.DataBind();
            ddlLPCategory.Items.Insert(0, "==Select==");

            ddlDynasty.DataSource     = ds.Tables[3];
            ddlDynasty.DataTextField  = "DynastyName";
            ddlDynasty.DataValueField = "DynastyID";
            ddlDynasty.DataBind();
            ddlDynasty.Items.Insert(0, "==Select==");

            gridviewLP.DataSource = ds.Tables[0];
            gridviewLP.DataBind();
        }
    }
Beispiel #3
0
    protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (DropDownList2.SelectedItem.Text == "Banner")
        {
            trBanner.Visible  = true;
            trGallery.Visible = false;
            trGrid.Visible    = false;
            tr2.Visible       = false;
            trgrid4.Visible   = false;

            DataSet    ds1 = new DataSet();
            GeneralDAL lp  = new GeneralDAL();
            ds1 = lp.FetchBanner();

            if (DropDownList1.SelectedItem.Text == "Historical Spots")
            {
                GridView2.DataSource = ds1.Tables[1];
            }
            else if (DropDownList1.SelectedItem.Text == "LP")
            {
                GridView2.DataSource = ds1.Tables[2];
            }
            else if (DropDownList1.SelectedItem.Text == "Festivals")
            {
                GridView2.DataSource = ds1.Tables[3];
            }
            else if (DropDownList1.SelectedItem.Text == "Home")
            {
                GridView2.DataSource = ds1.Tables[0];
            }
            GridView2.DataBind();
        }
        else if (DropDownList2.SelectedItem.Text == "Gallery")
        {
            tr2.Visible          = false;
            trgrid4.Visible      = false;
            trBanner.Visible     = false;
            trGallery.Visible    = true;
            trGrid.Visible       = true;
            tr1.Visible          = false;
            GridView1.DataSource = null;
            GridView1.DataBind();
            if (DropDownList1.SelectedItem.Text == "Historical Spots")
            {
                lblColumn.Text = "Spot Name";
                DataSet        ds = new DataSet();
                SpotDetailsBAL sp = new SpotDetailsBAL();
                ds = sp.FetchSpotDetails1();

                ddlColumn.DataSource     = ds.Tables[4];
                ddlColumn.DataTextField  = "spotname";
                ddlColumn.DataValueField = "spotid";
                ddlColumn.DataBind();
                ddlColumn.Items.Insert(0, "Select");
                RequiredFieldValidator1.ErrorMessage = "Choose Spot Name";
            }
            else if (DropDownList1.SelectedItem.Text == "LP")
            {
                lblColumn.Text = "LP Category Name";
                DataSet      ds = new DataSet();
                LPDetailsBAL lp = new LPDetailsBAL();
                ds = lp.FetchLP1();

                ddlColumn.DataSource     = ds.Tables[2];
                ddlColumn.DataTextField  = "lpcategoryname";
                ddlColumn.DataValueField = "lpcategoryid";
                ddlColumn.DataBind();
                ddlColumn.Items.Insert(0, "Select");
                RequiredFieldValidator1.ErrorMessage = "Choose LP Category Name";
            }
            else if (DropDownList1.SelectedItem.Text == "Festivals")
            {
                lblColumn.Text = "Festival Name";
                DataSet     ds = new DataSet();
                FestivalBAL fs = new FestivalBAL();
                ds = fs.FetchFestival1();

                ddlColumn.DataSource     = ds.Tables[0];
                ddlColumn.DataTextField  = "Name";
                ddlColumn.DataValueField = "FestivalID";
                ddlColumn.DataBind();
                ddlColumn.Items.Insert(0, "Select");
                RequiredFieldValidator1.ErrorMessage = "Choose Festival Name";
            }
            else
            {
                lblColumn.Text = string.Empty;
                ddlColumn.Items.Clear();
                ddlColumn.Items.Add("Select");
            }
        }
        else if (DropDownList2.SelectedItem.Text == "Map")
        {
            tr2.Visible       = true;
            trgrid4.Visible   = true;
            trBanner.Visible  = false;
            trGallery.Visible = false;
            trGrid.Visible    = false;
            tr1.Visible       = false;
            // GridView3.DataSource = null;
            GridView3.DataBind();
            if (DropDownList1.SelectedItem.Text == "Historical Spots")
            {
                Label8.Text = "Spot Name";
                DataSet        ds = new DataSet();
                SpotDetailsBAL sp = new SpotDetailsBAL();
                ds = sp.FetchSpotDetails1();

                DropDownList3.DataSource     = ds.Tables[4];
                DropDownList3.DataTextField  = "spotname";
                DropDownList3.DataValueField = "spotid";
                DropDownList3.DataBind();
                DropDownList3.Items.Insert(0, "Select");
                RequiredFieldValidator1.ErrorMessage = "Choose Spot Name";
            }
            else if (DropDownList1.SelectedItem.Text == "LP")
            {
                lblColumn.Text = "LP Category Name";
                DataSet      ds = new DataSet();
                LPDetailsBAL lp = new LPDetailsBAL();
                ds = lp.FetchLP1();

                ddlColumn.DataSource     = ds.Tables[2];
                ddlColumn.DataTextField  = "lpcategoryname";
                ddlColumn.DataValueField = "lpcategoryid";
                ddlColumn.DataBind();
                ddlColumn.Items.Insert(0, "Select");
                RequiredFieldValidator1.ErrorMessage = "Choose LP Category Name";
            }
            else if (DropDownList1.SelectedItem.Text == "Festivals")
            {
                lblColumn.Text = "Festival Name";
                DataSet     ds = new DataSet();
                FestivalBAL fs = new FestivalBAL();
                ds = fs.FetchFestival1();

                ddlColumn.DataSource     = ds.Tables[0];
                ddlColumn.DataTextField  = "Name";
                ddlColumn.DataValueField = "FestivalID";
                ddlColumn.DataBind();
                ddlColumn.Items.Insert(0, "Select");
                RequiredFieldValidator1.ErrorMessage = "Choose Festival Name";
            }
            else
            {
                lblColumn.Text = string.Empty;
                ddlColumn.Items.Clear();
                ddlColumn.Items.Add("Select");
            }
        }

        else
        {
            trBanner.Visible  = false;
            trGallery.Visible = false;
            trGrid.Visible    = false;
            tr2.Visible       = false;
            trgrid4.Visible   = false;
        }
    }
Beispiel #4
0
 protected void gridPageChanging(object sender, GridViewPageEventArgs e)
 {
     LPDetailsBAL lp = new LPDetailsBAL();
     ds = lp.FetchLP1();
     gridviewLP.DataSource = ds.Tables[0];
     gridviewLP.PageIndex = e.NewPageIndex;
     gridviewLP.DataBind();
 }
Beispiel #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.Cache.SetNoStore();

        if (!IsPostBack)
        {
            ddlReligion.Enabled = false;
            ddlDynasty.Enabled = false;

            #region Fetch Grid Page Size Details...
            DataTable pg = new DataTable();
            GeneralBAL pz = new GeneralBAL();
            pg = pz.FetchGridPageSize();
            if (pg.Rows.Count != 0 && pg.Rows[0][1].ToString() != string.Empty)
                gridviewLP.PageSize = Convert.ToInt32(pg.Rows[0][1].ToString());
            #endregion

            LPDetailsBAL lp = new LPDetailsBAL();
            ds = lp.FetchLP1();

            ddlReligion.DataSource = ds.Tables[1];
            ddlReligion.DataTextField = "ReligionName";
            ddlReligion.DataValueField = "ReligionID";
            ddlReligion.DataBind();
            ddlReligion.Items.Insert(0, "==Select==");

            ddlLPCategory.DataSource = ds.Tables[2];
            ddlLPCategory.DataTextField = "Lpcategoryname";
            ddlLPCategory.DataValueField = "Lpcategoryid";
            ddlLPCategory.DataBind();
            ddlLPCategory.Items.Insert(0, "==Select==");

            ddlDynasty.DataSource = ds.Tables[3];
            ddlDynasty.DataTextField = "DynastyName";
            ddlDynasty.DataValueField = "DynastyID";
            ddlDynasty.DataBind();
            ddlDynasty.Items.Insert(0, "==Select==");

            gridviewLP.DataSource = ds.Tables[0];
            gridviewLP.DataBind();
        }
    }
    protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (DropDownList2.SelectedItem.Text == "Banner")
        {
            trBanner.Visible = true;
            trGallery.Visible = false;
            trGrid.Visible = false;
            tr2.Visible = false;
            trgrid4.Visible = false;

            DataSet ds1 = new DataSet();
            GeneralDAL lp = new GeneralDAL();
            ds1 = lp.FetchBanner();

            if (DropDownList1.SelectedItem.Text == "Historical Spots")
                GridView2.DataSource = ds1.Tables[1];
            else if (DropDownList1.SelectedItem.Text == "LP")
                GridView2.DataSource = ds1.Tables[2];
            else if (DropDownList1.SelectedItem.Text == "Festivals")
                GridView2.DataSource = ds1.Tables[3];
            else if (DropDownList1.SelectedItem.Text == "Home")
                GridView2.DataSource = ds1.Tables[0];
            GridView2.DataBind();

        }
        else if (DropDownList2.SelectedItem.Text == "Gallery")
        {
            tr2.Visible = false;
            trgrid4.Visible = false;
            trBanner.Visible = false;
            trGallery.Visible = true;
            trGrid.Visible = true;
            tr1.Visible = false;
            GridView1.DataSource = null;
            GridView1.DataBind();
            if (DropDownList1.SelectedItem.Text == "Historical Spots")
            {
                lblColumn.Text = "Spot Name";
                DataSet ds = new DataSet();
                SpotDetailsBAL sp = new SpotDetailsBAL();
                ds = sp.FetchSpotDetails1();

                ddlColumn.DataSource = ds.Tables[4];
                ddlColumn.DataTextField = "spotname";
                ddlColumn.DataValueField = "spotid";
                ddlColumn.DataBind();
                ddlColumn.Items.Insert(0, "Select");
                RequiredFieldValidator1.ErrorMessage = "Choose Spot Name";
            }
            else if (DropDownList1.SelectedItem.Text == "LP")
            {
                lblColumn.Text = "LP Category Name";
                DataSet ds = new DataSet();
                LPDetailsBAL lp = new LPDetailsBAL();
                ds = lp.FetchLP1();

                ddlColumn.DataSource = ds.Tables[2];
                ddlColumn.DataTextField = "lpcategoryname";
                ddlColumn.DataValueField = "lpcategoryid";
                ddlColumn.DataBind();
                ddlColumn.Items.Insert(0, "Select");
                RequiredFieldValidator1.ErrorMessage = "Choose LP Category Name";

            }
            else if (DropDownList1.SelectedItem.Text == "Festivals")
            {
                lblColumn.Text = "Festival Name";
                DataSet ds = new DataSet();
                FestivalBAL fs = new FestivalBAL();
                ds = fs.FetchFestival1();

                ddlColumn.DataSource = ds.Tables[0];
                ddlColumn.DataTextField = "Name";
                ddlColumn.DataValueField = "FestivalID";
                ddlColumn.DataBind();
                ddlColumn.Items.Insert(0, "Select");
                RequiredFieldValidator1.ErrorMessage = "Choose Festival Name";
            }
            else
            {
                lblColumn.Text = string.Empty;
                ddlColumn.Items.Clear();
                ddlColumn.Items.Add("Select");
            }
        }
        else if (DropDownList2.SelectedItem.Text == "Map")
        {
            tr2.Visible = true;
            trgrid4.Visible = true;
            trBanner.Visible = false;
            trGallery.Visible = false ;
            trGrid.Visible = false;
            tr1.Visible = false;
            // GridView3.DataSource = null;
            GridView3.DataBind();
            if (DropDownList1.SelectedItem.Text == "Historical Spots")
            {
                 Label8.Text = "Spot Name";
                DataSet ds = new DataSet();
                SpotDetailsBAL sp = new SpotDetailsBAL();
                ds = sp.FetchSpotDetails1();

                DropDownList3.DataSource = ds.Tables[4];
                DropDownList3.DataTextField = "spotname";
                DropDownList3.DataValueField = "spotid";
                DropDownList3.DataBind();
                DropDownList3.Items.Insert(0, "Select");
                RequiredFieldValidator1.ErrorMessage = "Choose Spot Name";

            }
            else if (DropDownList1.SelectedItem.Text == "LP")
            {
                lblColumn.Text = "LP Category Name";
                DataSet ds = new DataSet();
                LPDetailsBAL lp = new LPDetailsBAL();
                ds = lp.FetchLP1();

                ddlColumn.DataSource = ds.Tables[2];
                ddlColumn.DataTextField = "lpcategoryname";
                ddlColumn.DataValueField = "lpcategoryid";
                ddlColumn.DataBind();
                ddlColumn.Items.Insert(0, "Select");
                RequiredFieldValidator1.ErrorMessage = "Choose LP Category Name";

            }
            else if (DropDownList1.SelectedItem.Text == "Festivals")
            {
                lblColumn.Text = "Festival Name";
                DataSet ds = new DataSet();
                FestivalBAL fs = new FestivalBAL();
                ds = fs.FetchFestival1();

                ddlColumn.DataSource = ds.Tables[0];
                ddlColumn.DataTextField = "Name";
                ddlColumn.DataValueField = "FestivalID";
                ddlColumn.DataBind();
                ddlColumn.Items.Insert(0, "Select");
                RequiredFieldValidator1.ErrorMessage = "Choose Festival Name";
            }
            else
            {
                lblColumn.Text = string.Empty;
                ddlColumn.Items.Clear();
                ddlColumn.Items.Add("Select");
            }
        }

        else
        {
            trBanner.Visible = false;
            trGallery.Visible = false;
            trGrid.Visible = false;
            tr2.Visible = false;
            trgrid4.Visible = false;
        }
    }