Esempio n. 1
0
    private void FetchDetails()
    {
        SpotDetailsBAL sp = new SpotDetailsBAL();

        ds = sp.FetchSpotDetails();

        gridviewSpot.DataSource = ds.Tables[4];
        gridviewSpot.DataBind();
    }
Esempio n. 2
0
    protected void gridPageChanging(object sender, GridViewPageEventArgs e)
    {
        if (ddlSearchCategory.SelectedItem.Text == "Select" & ddlSearchCategory1.SelectedItem.Text == "Select")
        {
            DataSet        fetchspotdetails = new DataSet();
            SpotDetailsBAL det = new SpotDetailsBAL();
            fetchspotdetails       = det.FetchSpotDetails();
            grdSpotName.DataSource = fetchspotdetails.Tables[4];
            grdSpotName.PageIndex  = e.NewPageIndex;
            grdSpotName.DataBind();
        }
        else
        {
            DataTable  ds = new DataTable();
            GeneralBAL lp = new GeneralBAL();
            ds = lp.SearchBySearchCategory(ddlSearchCategory1.SelectedItem.Text);

            grdSpotName.DataSource = ds;
            grdSpotName.PageIndex  = e.NewPageIndex;
            grdSpotName.DataBind();
        }
    }
Esempio n. 3
0
    protected void ddlSearchCategory_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (ddlSearchCategory.SelectedItem.Text != "Select")
        {
            // Bind the search category value in second ddl
            DataTable  ds = new DataTable();
            GeneralBAL lp = new GeneralBAL();
            ds = lp.FetchDetailBySearchCategory(ddlSearchCategory.SelectedItem.Text);


            ddlSearchCategory1.DataSource = ds;
            if (ddlSearchCategory.SelectedItem.Text == "Religion")
            {
                ddlSearchCategory1.DataTextField  = "ReligionName";
                ddlSearchCategory1.DataValueField = "ReligionID";
            }
            else if (ddlSearchCategory.SelectedItem.Text == "Spot Category")
            {
                ddlSearchCategory1.DataTextField  = "SpotCategoryName";
                ddlSearchCategory1.DataValueField = "SpotCategoryID";
            }

            ddlSearchCategory1.DataBind();
            ddlSearchCategory1.Items.Insert(0, "Select");
            //End Bind the search category value in second ddl
        }
        else
        {
            ddlSearchCategory1.Items.Clear();
            ddlSearchCategory1.Items.Add("Select");
            // 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....
        }
    }
Esempio n. 4
0
    protected void ddlSearchCategory_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (ddlSearchCategory.SelectedItem.Text != "Select")
        {
            // Bind the search category value in second ddl
            DataTable ds = new DataTable();
            GeneralBAL lp = new GeneralBAL();
            ds = lp.FetchDetailBySearchCategory(ddlSearchCategory.SelectedItem.Text);

            ddlSearchCategory1.DataSource = ds;
            if (ddlSearchCategory.SelectedItem.Text == "Religion")
            {
                ddlSearchCategory1.DataTextField = "ReligionName";
                ddlSearchCategory1.DataValueField = "ReligionID";
            }
            else if (ddlSearchCategory.SelectedItem.Text == "Spot Category")
            {
                ddlSearchCategory1.DataTextField = "SpotCategoryName";
                ddlSearchCategory1.DataValueField = "SpotCategoryID";
            }

            ddlSearchCategory1.DataBind();
            ddlSearchCategory1.Items.Insert(0, "Select");
            //End Bind the search category value in second ddl
        }
        else
        {
            ddlSearchCategory1.Items.Clear();
            ddlSearchCategory1.Items.Add("Select");
            // 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....
        }
    }
Esempio n. 5
0
    protected void gridPageChanging1(object sender, GridViewPageEventArgs e)
    {
        if (ddlSearchCategory.SelectedItem.Text == "Select" & ddlSearchCategory1.SelectedItem.Text == "Select")
        {
            DataSet fetchspotdetails = new DataSet();
            SpotDetailsBAL det = new SpotDetailsBAL();
            fetchspotdetails = det.FetchSpotDetails();
            grdSpotName.DataSource = fetchspotdetails.Tables[4];
            grdSpotName.PageIndex = e.NewPageIndex;
            grdSpotName.DataBind();

        }
        else
        {
            DataTable ds = new DataTable();
            GeneralBAL lp = new GeneralBAL();
            ds = lp.SearchBySearchCategory(ddlSearchCategory1.SelectedItem.Text);

            grdSpotName.DataSource = ds;
            grdSpotName.PageIndex = e.NewPageIndex;
            grdSpotName.DataBind();
        }
    }
Esempio n. 6
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());
                    }
                }
            }
        }
    }
Esempio n. 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....

            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
        }
    }
Esempio n. 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 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
    }
Esempio n. 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 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());
                    }
                }
            }
        }
    }
Esempio n. 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
        }
    }
Esempio n. 11
0
    private void FetchDetails()
    {
        SpotDetailsBAL sp = new SpotDetailsBAL();
        ds = sp.FetchSpotDetails();

        gridviewSpot.DataSource = ds.Tables[4];
        gridviewSpot.DataBind();
    }