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)
        {
            #region Fetch Grid Page Size Details...
            DataTable  pg = new DataTable();
            GeneralBAL gl = new GeneralBAL();
            pg = gl.FetchGridPageSize();
            if (pg.Rows.Count != 0 && pg.Rows[0][1].ToString() != string.Empty)
            {
                grdFestival.PageSize = Convert.ToInt32(pg.Rows[0][1].ToString());
            }
            #endregion

            FestivalBAL fs = new FestivalBAL();
            ds = fs.FetchFestival1();

            ddlSpotName.DataSource     = ds.Tables[1];
            ddlSpotName.DataTextField  = "SpotName";
            ddlSpotName.DataValueField = "SpotID";
            ddlSpotName.DataBind();
            ddlSpotName.Items.Insert(0, "Select");

            grdFestival.DataSource = ds.Tables[0];
            grdFestival.DataBind();
        }
    }
Exemple #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)
        {
            FileUpload1.Attributes.Add("onkeypress", "return false;");
            FileUpload2.Attributes.Add("onkeypress", "return false;");
            FileUpload3.Attributes.Add("onkeypress", "return false;");

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

            //#region Fetch Map Grid Page Size map Details....
            //DataTable ds1 = new DataTable();
            //GeneralBAL gl1 = new GeneralBAL();
            //ds = gl.FetchMapGridPageSize();
            //if (ds1.Rows.Count != 0 && ds1.Rows[0][1].ToString() != string.Empty)
            //    GridView3.PageSize = Convert.ToInt32(ds1.Rows[0][1].ToString());
            //#endregion
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            #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][0].ToString() != string.Empty)
            {
                grdLP.PageSize = Convert.ToInt32(pg.Rows[0][0].ToString());
            }
            #endregion

            // Bind the banner of the image.
            DataSet    ds = new DataSet();
            GeneralDAL lp = new GeneralDAL();
            ds = lp.FetchBanner();
            if (ds.Tables[2].Rows.Count != 0)
            {
                imgBanner.ImageUrl = ds.Tables[2].Rows[0][1].ToString();
            }
            //End Bind the banner of the image.

            // fetch value of the grid details....
            DataSet      ds1 = new DataSet();
            LPDetailsBAL lp1 = new LPDetailsBAL();
            ds1 = lp1.FetchLP();
            grdLP.DataSource = ds1.Tables[0];
            grdLP.DataBind();

            if (Request.QueryString["LPId"] != null)
            {
                int rowno = 0;
                for (int i = 0; ds1.Tables[0].Rows.Count > i; i++)
                {
                    if (ds1.Tables[0].Rows[i]["LPId"].ToString() == Request.QueryString["LPId"].ToString())
                    {
                        rowno = i;
                    }
                }
                FetchGridDetails(Request.QueryString["LPId"].ToString());
                grdLP.PageIndex = rowno / grdLP.PageSize;
                int SelectedRowIndex = rowno - (grdLP.PageSize * grdLP.PageIndex);
                grdLP.DataBind();
                grdLP.Rows[SelectedRowIndex].BackColor = System.Drawing.Color.LightGray;
            }//other load festival here.....
            else
            {
                if (ds1.Tables[0].Rows.Count != 0)
                {
                    FetchGridDetails(ds1.Tables[0].Rows[0][0].ToString());
                    grdLP.Rows[0].BackColor = System.Drawing.Color.LightGray;
                }
                //End fetch value of the grid details....
            }
        }
    }
    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)
        {
            #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)
            {
                gridviewSpot.PageSize = Convert.ToInt32(pg.Rows[0][1].ToString());
            }
            #endregion

            SpotDetailsBAL sp = new SpotDetailsBAL();
            ds = sp.FetchSpotDetails1();

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

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

            ddlBuiltBy.DataSource     = ds.Tables[0];
            ddlBuiltBy.DataTextField  = "LPName";
            ddlBuiltBy.DataValueField = "LPID";
            ddlBuiltBy.DataBind();
            ddlBuiltBy.Items.Insert(0, "==Select==");

            ddlSanctifiedBy.DataSource     = ds.Tables[5];
            ddlSanctifiedBy.DataTextField  = "LPName";
            ddlSanctifiedBy.DataValueField = "LPID";
            ddlSanctifiedBy.DataBind();
            ddlSanctifiedBy.Items.Insert(0, "==Select==");

            ddlSpotCategory.DataSource     = ds.Tables[3];
            ddlSpotCategory.DataTextField  = "SpotCategoryName";
            ddlSpotCategory.DataValueField = "SpotCategoryID";
            ddlSpotCategory.DataBind();
            ddlSpotCategory.Items.Insert(0, "==Select==");

            gridviewSpot.DataSource = ds.Tables[4];
            gridviewSpot.DataBind();
        }
    }
    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();
        }
    }
Exemple #6
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)
        {
            #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)
            {
                grdGlossary.PageSize = Convert.ToInt32(pg.Rows[0][1].ToString());
            }
            #endregion

            GlossaryBAL gl = new GlossaryBAL();
            ds = gl.FetchGlossary();
            grdGlossary.DataSource = ds.Tables[0];
            grdGlossary.DataBind();
        }
    }
Exemple #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            #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][0].ToString() != string.Empty)
            {
                grdSpotName.PageSize = Convert.ToInt32(pg.Rows[0][0].ToString());
                grdFestival.PageSize = Convert.ToInt32(pg.Rows[0][0].ToString());
            }
            #endregion

            // Bind the banner of the image.
            DataSet    ds   = new DataSet();
            DataTable  fest = new DataTable();
            GeneralBAL lp   = new GeneralBAL();
            ds = lp.FetchBanner();
            if (ds.Tables[0].Rows.Count != 0)
            {
                imgBanner.ImageUrl = ds.Tables[0].Rows[0][1].ToString();
            }
            //End Bind the banner of the image.
            fest = lp.FetchFestivalByMonth();
            grdFestival.DataSource = fest;
            grdFestival.DataBind();

            // Bind the search category value in first ddl
            DataTable  ds1 = new DataTable();
            GeneralBAL lp1 = new GeneralBAL();
            ds1 = lp1.FetchSearchCategory();

            ddlSearchCategory.DataSource     = ds1;
            ddlSearchCategory.DataTextField  = "SearchCategoryName";
            ddlSearchCategory.DataValueField = "SearchCategoryID";
            ddlSearchCategory.DataBind();
            ddlSearchCategory.Items.Insert(0, "Select");
            //End Bind the search category value in first ddl

            // fetch value of the grid details....
            DataSet        fetchspotdetails = new DataSet();
            SpotDetailsBAL det = new SpotDetailsBAL();
            fetchspotdetails = det.FetchSpotDetails();
            //grdSpotName.DataSource = fetchspotdetails.Tables[4];
            //grdSpotName.DataBind();
            //End  first value of the grid details....


            DataTable dt  = fetchspotdetails.Tables[4];
            DataTable dt1 = new DataTable();
            dt1.Columns.Add("id");
            dt1.Columns.Add("pid");
            dt1.Columns.Add("name");
            dt1.Columns.Add("desc");
            foreach (DataRow row in dt.Rows)
            {
                string[] s = row["spotname"].ToString().Split('-');
                if (dt1.Select("name = '" + s[0] + "'").Length == 0)
                {
                    dt1.Rows.Add(s[0], null, s[0]);
                }
                dt1.Rows.Add(row["spotid"].ToString(), s[0], s[1], row[2].ToString());
            }
            Addmenu(dt1);


            Lbl_Festival.Text = "Festival(s) in " + GetMonthName(DateTime.Now);

            // Bind Active list details
            DataSet    ds2 = new DataSet();
            GeneralBAL act = new GeneralBAL();
            ds2 = act.FetchNoOfActiveList();
            if (ds2.Tables[0].Rows.Count != 0)
            {
                lblSpot.Visible = true;
                lblSpot.Text    = ds2.Tables[0].Rows[0][0].ToString();
            }
            else
            {
                lblSpot.Visible = false;
            }

            if (ds2.Tables[1].Rows.Count != 0)
            {
                lblLp.Visible = true;
                lblLp.Text    = ds2.Tables[1].Rows[0][0].ToString();
            }
            else
            {
                lblLp.Visible = false;
            }

            if (ds2.Tables[2].Rows.Count != 0)
            {
                lblFest.Visible = true;
                lblFest.Text    = ds2.Tables[2].Rows[0][0].ToString();
            }
            else
            {
                lblFest.Visible = false;
            }
            //end  Bind Active list details
        }
    }
Exemple #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            #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][0].ToString() != string.Empty)
            {
                grdSpotName.PageSize = Convert.ToInt32(pg.Rows[0][0].ToString());
                grdFestival.PageSize = Convert.ToInt32(pg.Rows[0][0].ToString());
            }
            #endregion

            // Bind the search category value in first ddl
            DataTable  ds = new DataTable();
            GeneralBAL lp = new GeneralBAL();
            ds = lp.FetchSearchCategory();

            ddlSearchCategory.DataSource     = ds;
            ddlSearchCategory.DataTextField  = "SearchCategoryName";
            ddlSearchCategory.DataValueField = "SearchCategoryID";
            ddlSearchCategory.DataBind();
            ddlSearchCategory.Items.Insert(0, "Select");
            //End Bind the search category value in first ddl

            // Bind the banner of the image.
            DataSet    dsphoto = new DataSet();
            GeneralDAL lpphoto = new GeneralDAL();
            dsphoto = lpphoto.FetchBanner();
            if (dsphoto.Tables[1].Rows.Count != 0)
            //    imgBanner.ImageUrl = dsphoto.Tables[1].Rows[0][1].ToString();
            //End Bind the banner of the image.

            //// Bind the map of the image.
            //DataSet dsmapphoto = new DataSet();
            //GeneralDAL lpmapphoto = new GeneralDAL();
            //dsmapphoto = lpmapphoto.FetchMap();
            //if (dsmapphoto.Tables[1].Rows.Count != 0)
            //    Image1.ImageUrl = dsmapphoto.Tables[1].Rows[0][1].ToString();
            //// End Bind the map of the image.

            // fetch  value of the grid details....
            {
                DataSet        fetchspotdetails = new DataSet();
                SpotDetailsBAL det = new SpotDetailsBAL();
                fetchspotdetails       = det.FetchSpotDetails();
                grdSpotName.DataSource = fetchspotdetails.Tables[4];
                grdSpotName.DataBind();

                //End  value of the grid details....

                if (Session["SpotId"] != null)
                {
                    int rowno = 0;
                    for (int i = 0; fetchspotdetails.Tables[4].Rows.Count > i; i++)
                    {
                        if (fetchspotdetails.Tables[4].Rows[i]["spotid"].ToString() == Session["SpotId"].ToString())
                        {
                            rowno = i;
                        }
                    }
                    FetchGridDetails(Session["SpotId"].ToString());
                    grdSpotName.PageIndex = rowno / grdSpotName.PageSize;
                    int SelectedRowIndex = rowno - (grdSpotName.PageSize * grdSpotName.PageIndex);
                    grdSpotName.DataBind();
                    grdSpotName.Rows[SelectedRowIndex].BackColor = System.Drawing.Color.LightGray;
                    Session["SpotId"] = null;
                }
                else if (Request.QueryString["SpotId"] != null)
                {
                    int rowno = 0;
                    for (int i = 0; fetchspotdetails.Tables[4].Rows.Count > i; i++)
                    {
                        if (fetchspotdetails.Tables[4].Rows[i]["spotid"].ToString() == Request.QueryString["SpotId"].ToString())
                        {
                            rowno = i;
                        }
                    }
                    FetchGridDetails(Request.QueryString["SpotId"].ToString());
                    grdSpotName.PageIndex = rowno / grdSpotName.PageSize;
                    int SelectedRowIndex = rowno - (grdSpotName.PageSize * grdSpotName.PageIndex);
                    grdSpotName.DataBind();
                    grdSpotName.Rows[SelectedRowIndex].BackColor = System.Drawing.Color.LightGray;
                }
                else
                {
                    if (fetchspotdetails.Tables[4].Rows.Count != 0)
                    {
                        grdSpotName.Rows[0].BackColor = System.Drawing.Color.LightGray;
                        FetchGridDetails(fetchspotdetails.Tables[4].Rows[0][0].ToString());
                    }
                }
            }
        }
    }
Exemple #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            #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][0].ToString() != string.Empty)
            {
                grdSpotName.PageSize = Convert.ToInt32(pg.Rows[0][0].ToString());
                grdFestival.PageSize = Convert.ToInt32(pg.Rows[0][0].ToString());
            }
            #endregion

            // Bind the banner of the image.
            DataSet ds = new DataSet();
            DataTable fest = new DataTable();
            GeneralBAL lp = new GeneralBAL();
            ds = lp.FetchBanner();
            if (ds.Tables[0].Rows.Count != 0)
                imgBanner.ImageUrl = ds.Tables[0].Rows[0][1].ToString();
            //End Bind the banner of the image.
            fest = lp.FetchFestivalByMonth();
            grdFestival.DataSource = fest;
            grdFestival.DataBind();

            // Bind the search category value in first ddl
            DataTable ds1 = new DataTable();
            GeneralBAL lp1 = new GeneralBAL();
            ds1 = lp1.FetchSearchCategory();

            ddlSearchCategory.DataSource = ds1;
            ddlSearchCategory.DataTextField = "SearchCategoryName";
            ddlSearchCategory.DataValueField = "SearchCategoryID";
            ddlSearchCategory.DataBind();
            ddlSearchCategory.Items.Insert(0, "Select");
            //End Bind the search category value in first ddl

            // fetch value of the grid details....
            DataSet fetchspotdetails = new DataSet();
            SpotDetailsBAL det = new SpotDetailsBAL();
            fetchspotdetails = det.FetchSpotDetails();
            grdSpotName.DataSource = fetchspotdetails.Tables[4];
            grdSpotName.DataBind();
            //End  first value of the grid details....

            Lbl_Festival.Text = "Festival(s) in " + GetMonthName(DateTime.Now);

            // Bind Active list details
            DataSet ds2 = new DataSet();
            GeneralBAL act = new GeneralBAL();
            ds2 = act.FetchNoOfActiveList();
            if (ds2.Tables[0].Rows.Count != 0)
            {
                lblSpot.Visible = true;
                lblSpot.Text = ds2.Tables[0].Rows[0][0].ToString();
            }
            else
                lblSpot.Visible = false;

            if (ds2.Tables[1].Rows.Count != 0)
            {
                lblLp.Visible = true;
                lblLp.Text = ds2.Tables[1].Rows[0][0].ToString();
            }
            else
                lblLp.Visible = false;

            if (ds2.Tables[2].Rows.Count != 0)
            {
                lblFest.Visible = true;
                lblFest.Text = ds2.Tables[2].Rows[0][0].ToString();
            }
            else
                lblFest.Visible = false;
            //end  Bind Active list details
        }
    }
Exemple #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            #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][0].ToString() != string.Empty)
            {
                grdSpotName.PageSize = Convert.ToInt32(pg.Rows[0][0].ToString());
                grdFestival.PageSize = Convert.ToInt32(pg.Rows[0][0].ToString());
            }
            #endregion
        }

        // Bind the banner of the image.
            DataSet ds = new DataSet();
            DataTable fest = new DataTable();
            GeneralBAL lp = new GeneralBAL();
            ds = lp.FetchBanner();
            if (ds.Tables[0].Rows.Count != 0)
              //  imgBanner.ImageUrl = ds.Tables[0].Rows[0][1].ToString();
            //End Bind the banner of the image.
            fest = lp.FetchFestivalByMonth();
            grdFestival.DataSource = fest;
            grdFestival.DataBind();

            // Bind the search category value in first ddl
            DataTable ds1 = new DataTable();
            GeneralBAL lp1 = new GeneralBAL();
            ds1 = lp1.FetchSearchCategory();

            ddlSearchCategory.DataSource = ds1;
            ddlSearchCategory.DataTextField = "SearchCategoryName";
            ddlSearchCategory.DataValueField = "SearchCategoryID";
            ddlSearchCategory.DataBind();
            ddlSearchCategory.Items.Insert(0, "Select");
            //End Bind the search category value in first ddl

            // fetch value of the grid details....
            DataSet fetchspotdetails = new DataSet();
            SpotDetailsBAL det = new SpotDetailsBAL();
            fetchspotdetails = det.FetchSpotDetails();
            //grdSpotName.DataSource = fetchspotdetails.Tables[4];
            //grdSpotName.DataBind();
            //End  first value of the grid details....

            DataTable dt = fetchspotdetails.Tables[4];
            DataTable dt1 = new DataTable();
            dt1.Columns.Add("id");
            dt1.Columns.Add("pid");
            dt1.Columns.Add("name");
            dt1.Columns.Add("desc");
            foreach (DataRow row in dt.Rows)
            {
              string[] s = row["spotname"].ToString().Split('-');
              if (dt1.Select("name = '" + s[0] + "'").Length == 0)
              {
                  dt1.Rows.Add(s[0], null, s[0]);
              }
              dt1.Rows.Add(row["spotid"].ToString(), s[0], s[1], row[2].ToString());

            }
            Addmenu(dt1);

            Lbl_Festival.Text = "Festival(s) in " + GetMonthName(DateTime.Now);

            // Bind Active list details
            DataSet ds2 = new DataSet();
            GeneralBAL act = new GeneralBAL();
            ds2 = act.FetchNoOfActiveList();
            if (ds2.Tables[0].Rows.Count != 0)
            {
                lblSpot.Visible = true;
                lblSpot.Text = ds2.Tables[0].Rows[0][0].ToString();
            }
            else
                lblSpot.Visible = false;

            if (ds2.Tables[1].Rows.Count != 0)
            {
                lblLp.Visible = true;
                lblLp.Text = ds2.Tables[1].Rows[0][0].ToString();
            }
            else
                lblLp.Visible = false;

            if (ds2.Tables[2].Rows.Count != 0)
            {
                lblFest.Visible = true;
                lblFest.Text = ds2.Tables[2].Rows[0][0].ToString();
            }
            else
                lblFest.Visible = false;
            //end  Bind Active list details
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            #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][0].ToString() != string.Empty)
            {
                grdSpotName.PageSize = Convert.ToInt32(pg.Rows[0][0].ToString());
                grdFestival.PageSize = Convert.ToInt32(pg.Rows[0][0].ToString());
            }
            #endregion

            // Bind the search category value in first ddl
            DataTable ds = new DataTable();
            GeneralBAL lp = new GeneralBAL();
            ds = lp.FetchSearchCategory();

            ddlSearchCategory.DataSource = ds;
            ddlSearchCategory.DataTextField = "SearchCategoryName";
            ddlSearchCategory.DataValueField = "SearchCategoryID";
            ddlSearchCategory.DataBind();
            ddlSearchCategory.Items.Insert(0, "Select");
            //End Bind the search category value in first ddl

            // Bind the banner of the image.
            DataSet dsphoto = new DataSet();
            GeneralDAL lpphoto = new GeneralDAL();
            dsphoto = lpphoto.FetchBanner();
            if (dsphoto.Tables[1].Rows.Count != 0)
            //    imgBanner.ImageUrl = dsphoto.Tables[1].Rows[0][1].ToString();
            //End Bind the banner of the image.

            //// Bind the map of the image.
            //DataSet dsmapphoto = new DataSet();
            //GeneralDAL lpmapphoto = new GeneralDAL();
            //dsmapphoto = lpmapphoto.FetchMap();
            //if (dsmapphoto.Tables[1].Rows.Count != 0)
            //    Image1.ImageUrl = dsmapphoto.Tables[1].Rows[0][1].ToString();
            //// End Bind the map of the image.

            // fetch  value of the grid details....
            {
                DataSet fetchspotdetails = new DataSet();
                SpotDetailsBAL det = new SpotDetailsBAL();
                fetchspotdetails = det.FetchSpotDetails();
                grdSpotName.DataSource = fetchspotdetails.Tables[4];
                grdSpotName.DataBind();

                //End  value of the grid details....

                if (Session["SpotId"] != null)
                {
                    int rowno = 0;
                    for (int i = 0; fetchspotdetails.Tables[4].Rows.Count > i; i++)
                    {
                        if (fetchspotdetails.Tables[4].Rows[i]["spotid"].ToString() == Session["SpotId"].ToString())
                            rowno = i;
                    }
                    FetchGridDetails(Session["SpotId"].ToString());
                    grdSpotName.PageIndex = rowno / grdSpotName.PageSize;
                    int SelectedRowIndex = rowno - (grdSpotName.PageSize * grdSpotName.PageIndex);
                    grdSpotName.DataBind();
                    grdSpotName.Rows[SelectedRowIndex].BackColor = System.Drawing.Color.LightGray;
                    Session["SpotId"] = null;
                }
                else if (Request.QueryString["SpotId"] != null)
                {
                    int rowno = 0;
                    for (int i = 0; fetchspotdetails.Tables[4].Rows.Count > i; i++)
                    {
                        if (fetchspotdetails.Tables[4].Rows[i]["spotid"].ToString() == Request.QueryString["SpotId"].ToString())
                            rowno = i;
                    }
                    FetchGridDetails(Request.QueryString["SpotId"].ToString());
                    grdSpotName.PageIndex = rowno / grdSpotName.PageSize;
                    int SelectedRowIndex = rowno - (grdSpotName.PageSize * grdSpotName.PageIndex);
                    grdSpotName.DataBind();
                    grdSpotName.Rows[SelectedRowIndex].BackColor = System.Drawing.Color.LightGray;
                }
                else
                {
                    if (fetchspotdetails.Tables[4].Rows.Count != 0)
                    {
                        grdSpotName.Rows[0].BackColor = System.Drawing.Color.LightGray;
                        FetchGridDetails(fetchspotdetails.Tables[4].Rows[0][0].ToString());
                    }
                }
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            #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][0].ToString() != string.Empty)
                grdFestival.PageSize = Convert.ToInt32(pg.Rows[0][0].ToString());
            #endregion

            // Bind the banner of the image.
            DataSet ds = new DataSet();
            GeneralDAL lp = new GeneralDAL();
            ds = lp.FetchBanner();
            if (ds.Tables[3].Rows.Count != 0)
                imgBanner.ImageUrl = ds.Tables[3].Rows[0][1].ToString();
            //End Bind the banner of the image.

            // fetch value of the grid details....
            DataSet ds1 = new DataSet();
            FestivalBAL fs = new FestivalBAL();
            ds1 = fs.FetchFestival();
            grdFestival.DataSource = ds1.Tables[0];
            grdFestival.DataBind();
            //End fetch value of the grid details....

            //if comes from index page
            if (Session["festivalId"] != null)
            {
                int rowno=0;
                for (int i = 0; ds1.Tables[0].Rows.Count > i; i++)
                {
                    if (ds1.Tables[0].Rows[i]["festivalid"].ToString() == Session["festivalId"].ToString())
                        rowno = i;
                }
                FetchGridDetails(Session["festivalId"].ToString());
                grdFestival.PageIndex = rowno / grdFestival.PageSize;
                int SelectedRowIndex = rowno - (grdFestival.PageSize * grdFestival.PageIndex);
                grdFestival.DataBind();
                grdFestival.Rows[SelectedRowIndex].BackColor = System.Drawing.Color.LightGray;
                Session["festivalId"] = null;
            }//other load festival here.....
            else if (Request.QueryString["festivalId"] != null)
            {
                int rowno = 0;
                for (int i = 0; ds1.Tables[0].Rows.Count > i; i++)
                {
                    if (ds1.Tables[0].Rows[i]["festivalid"].ToString() == Request.QueryString["festivalId"].ToString())
                        rowno = i;
                }
                FetchGridDetails(Request.QueryString["festivalId"].ToString());
                grdFestival.PageIndex = rowno / grdFestival.PageSize;
                int SelectedRowIndex = rowno - (grdFestival.PageSize * grdFestival.PageIndex);
                grdFestival.DataBind();
                grdFestival.Rows[SelectedRowIndex].BackColor = System.Drawing.Color.LightGray;
            }
            else
            {
                if (ds1.Tables[0].Rows.Count != 0)
                {
                    FetchGridDetails(ds1.Tables[0].Rows[0][0].ToString());
                    grdFestival.Rows[0].BackColor = System.Drawing.Color.LightGray;
                }
            }

        }
    }
    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 Page_Load(object sender, EventArgs e)
    {
        Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
        Response.Cache.SetCacheability(HttpCacheability.NoCache);
        Response.Cache.SetNoStore();
        if (!IsPostBack)
        {
            #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)
                grdGlossary.PageSize = Convert.ToInt32(pg.Rows[0][1].ToString());
            #endregion

            GlossaryBAL gl = new GlossaryBAL();
            ds = gl.FetchGlossary();
            grdGlossary.DataSource = ds.Tables[0];
            grdGlossary.DataBind();
        }
    }
    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)
        {
            #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)
                gridviewSpot.PageSize = Convert.ToInt32(pg.Rows[0][1].ToString());
            #endregion

            SpotDetailsBAL sp = new SpotDetailsBAL();
            ds = sp.FetchSpotDetails1();

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

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

            ddlBuiltBy.DataSource = ds.Tables[0];
            ddlBuiltBy.DataTextField = "LPName";
            ddlBuiltBy.DataValueField = "LPID";
            ddlBuiltBy.DataBind();
            ddlBuiltBy.Items.Insert(0, "==Select==");

            ddlSanctifiedBy.DataSource = ds.Tables[5];
            ddlSanctifiedBy.DataTextField = "LPName";
            ddlSanctifiedBy.DataValueField = "LPID";
            ddlSanctifiedBy.DataBind();
            ddlSanctifiedBy.Items.Insert(0, "==Select==");

            ddlSpotCategory.DataSource = ds.Tables[3];
            ddlSpotCategory.DataTextField = "SpotCategoryName";
            ddlSpotCategory.DataValueField = "SpotCategoryID";
            ddlSpotCategory.DataBind();
            ddlSpotCategory.Items.Insert(0, "==Select==");

            gridviewSpot.DataSource = ds.Tables[4];
            gridviewSpot.DataBind();
        }
    }
    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)
        {
            FileUpload1.Attributes.Add("onkeypress", "return false;");
            FileUpload2.Attributes.Add("onkeypress", "return false;");
            FileUpload3.Attributes.Add("onkeypress", "return false;");

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

            //#region Fetch Map Grid Page Size map Details....
            //DataTable ds1 = new DataTable();
            //GeneralBAL gl1 = new GeneralBAL();
            //ds = gl.FetchMapGridPageSize();
            //if (ds1.Rows.Count != 0 && ds1.Rows[0][1].ToString() != string.Empty)
            //    GridView3.PageSize = Convert.ToInt32(ds1.Rows[0][1].ToString());
            //#endregion

        }
    }
    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)
        {
            #region Fetch Grid Page Size Details...
            DataTable pg = new DataTable();
            GeneralBAL gl = new GeneralBAL();
            pg = gl.FetchGridPageSize();
            if (pg.Rows.Count != 0 && pg.Rows[0][1].ToString() != string.Empty)
                grdFestival.PageSize = Convert.ToInt32(pg.Rows[0][1].ToString());
            #endregion

            FestivalBAL fs = new FestivalBAL();
            ds = fs.FetchFestival1();

            ddlSpotName.DataSource = ds.Tables[1];
            ddlSpotName.DataTextField = "SpotName";
            ddlSpotName.DataValueField = "SpotID";
            ddlSpotName.DataBind();
            ddlSpotName.Items.Insert(0, "Select");

            grdFestival.DataSource = ds.Tables[0];
            grdFestival.DataBind();

        }
    }