Esempio n. 1
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)
    {
        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();
        }
    }
Esempio n. 3
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();
        }
    }
Esempio n. 4
0
 protected void gridPageChanging(object sender, GridViewPageEventArgs e)
 {
     if (DropDownList2.SelectedItem.Text == "Gallery")
     {
         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.PageIndex  = e.NewPageIndex;
             GridView1.DataBind();
         }
         else if (DropDownList1.SelectedItem.Text == "LP" && ddlColumn1.SelectedItem.Text != "Select")
         {
             DataSet    details = new DataSet();
             GeneralBAL fest    = new GeneralBAL();
             details = fest.FetchLPDetailBySearch(ddlColumn1.SelectedValue.ToString());
             GridView1.DataSource = details.Tables[1];
             GridView1.PageIndex  = e.NewPageIndex;
             GridView1.DataBind();
         }
         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.PageIndex  = e.NewPageIndex;
             GridView1.DataBind();
         }
     }
 }
Esempio n. 5
0
    public DataSet FetchMap()
    {
        DataSet    ds = new DataSet();
        GeneralBAL lp = new GeneralBAL();

        ds = lp.FetchMap();
        return(ds);
    }
Esempio n. 6
0
    protected void Button1_Click1(object sender, EventArgs e)
    {
        if (DropDownList2.SelectedItem.Text == "Map")
        {
            int    a            = 0;
            string path         = Server.MapPath("");
            string sid          = DropDownList3.SelectedValue.ToString();
            string OriginalName = FileUpload3.FileName.ToString();
            byte[] Filedata     = (byte[])FileUpload3.FileBytes;
            int    count        = Filedata.Length;

            Stream sr = FileUpload3.PostedFile.InputStream;
            sr.InitializeLifetimeService();
            sr.Read(Filedata, 0, count);

            if (System.IO.Path.GetExtension(OriginalName).ToLower() == ".jpg")
            {
                System.Drawing.Image img;
                img = System.Drawing.Image.FromStream(sr);
                if (FileUpload3.HasFile == true && FileUpload3.PostedFile.ContentLength != 0 && img.Height >= 128 && img.Width >= 128)
                {
                    try
                    {
                        if (DropDownList1.SelectedItem.Text == "Historical Spots")
                        {
                            string     lpid = DropDownList3.SelectedValue.ToString();
                            GeneralBAL ph   = new GeneralBAL();
                            a = ph.InsertSpotMap(sid, ("~/image/" + sid + "_Map_" + OriginalName));
                            FileStream fs = new FileStream(path + @"\image\" + sid + "_Map_" + OriginalName, FileMode.OpenOrCreate, FileAccess.Write);
                            fs.Write(Filedata, 0, count);
                            fs.Flush();
                            fs.Close();
                        }
                        if (a != 0)
                        {
                            Page.ClientScript.RegisterStartupScript(typeof(Page), "key", "alert('Map Photo Added.');location='GalleryManager.aspx';", true);
                        }
                        else
                        {
                            Page.ClientScript.RegisterStartupScript(typeof(Page), "key", "alert('Contact Administrator.');", true);
                        }
                    }
                    catch
                    {
                        Page.ClientScript.RegisterStartupScript(typeof(Page), "key", "alert('Some problem occured while adding the photo. Please contact administrator');location='GalleryManager.aspx';", true);
                    }
                }
                else
                {
                    Page.ClientScript.RegisterStartupScript(typeof(Page), "key", "alert('Please choose correct size and type photo .');location='GalleryManager.aspx';", true);
                }
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(typeof(Page), "key", "alert('Please choose correct size and type photo .');location='GalleryManager.aspx';", true);
            }
        }
    }
    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....
            }
        }
    }
Esempio n. 8
0
 protected void gridPageChanging(object sender, GridViewPageEventArgs e)
 {
     DataTable ds = new DataTable();
         GeneralBAL lp = new GeneralBAL();
         ds = lp.FetchFestivalByMonth();
         grdFestival.DataSource = ds;
         grdFestival.PageIndex = e.NewPageIndex;
         grdFestival.DataBind();
 }
Esempio n. 9
0
    protected void gridPageChanging(object sender, GridViewPageEventArgs e)
    {
        DataTable  ds = new DataTable();
        GeneralBAL lp = new GeneralBAL();

        ds = lp.FetchFestivalByMonth();
        grdFestival.DataSource = ds;
        grdFestival.PageIndex  = e.NewPageIndex;
        grdFestival.DataBind();
    }
    protected void ddlSearchCategory1_SelectedIndexChanged(object sender, EventArgs e)
    {
        // to bind second ddl value based on the first ddl value...
        DataTable  ds = new DataTable();
        GeneralBAL lp = new GeneralBAL();

        ds = lp.FetchLPGridDetails(ddlSearchCategory1.SelectedItem.Text);
        grdLP.DataSource = ds;
        grdLP.DataBind();
    }
Esempio n. 11
0
    protected void ddlSearchCategory1_SelectedIndexChanged(object sender, EventArgs e)
    {
        // to bind the grid details in gridview based on the second ddl value...
        DataTable ds = new DataTable();
        GeneralBAL lp = new GeneralBAL();
        ds = lp.SearchBySearchCategory(ddlSearchCategory1.SelectedItem.Text);

        grdSpotName.DataSource = ds;
        grdSpotName.DataBind();
    }
Esempio n. 12
0
    protected void gridPageChanging1(object sender, GridViewPageEventArgs e)
    {
        DataSet    details = new DataSet();
        GeneralBAL spot    = new GeneralBAL();

        details = spot.FetchDetailBySearch(lblSpotID.Text);
        grdFestival.DataSource = details.Tables[2];
        grdFestival.PageIndex  = e.NewPageIndex;
        grdFestival.DataBind();
    }
Esempio n. 13
0
    protected void ddlSearchCategory1_SelectedIndexChanged(object sender, EventArgs e)
    {
        DataTable  ds = new DataTable();
        GeneralBAL lp = new GeneralBAL();

        ds = lp.FetchFestivalGridDetails(ddlSearchCategory1.SelectedItem.Text);

        grdFestival.DataSource = ds;
        grdFestival.DataBind();
    }
Esempio n. 14
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)
            {
                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();
        }
    }
Esempio n. 15
0
 protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DropDownList1.SelectedItem.Text == "Historical Spots" && DropDownList3.SelectedItem.Text != "Select")
     {
         DataSet    details = new DataSet();
         GeneralBAL fest    = new GeneralBAL();
         details = fest.FetchDetailBySearch(DropDownList3.SelectedValue.ToString());
         GridView3.DataSource = details.Tables[3];
         GridView3.DataBind();
     }
 }
Esempio n. 16
0
    protected void ddlSearchCategory1_SelectedIndexChanged(object sender, EventArgs e)
    {
        // to bind the grid details in gridview based on the second ddl value...
        DataTable  ds = new DataTable();
        GeneralBAL lp = new GeneralBAL();

        ds = lp.SearchBySearchCategory(ddlSearchCategory1.SelectedItem.Text);

        grdSpotName.DataSource = ds;
        grdSpotName.DataBind();
    }
Esempio n. 17
0
 protected void ddlColumn1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DropDownList1.SelectedItem.Text == "LP" && ddlColumn1.SelectedItem.Text != "Select")
     {
         DataSet    details = new DataSet();
         GeneralBAL fest    = new GeneralBAL();
         details = fest.FetchLPDetailBySearch(ddlColumn1.SelectedValue.ToString());
         GridView1.DataSource = details.Tables[1];
         GridView1.DataBind();
     }
 }
Esempio n. 18
0
    protected void Gridview_OnRowCommand(object sender, GridViewCommandEventArgs e)
    {
        string _commandName;

        if (e.CommandArgument.ToString() == "Next" || e.CommandArgument.ToString() == "Last" || e.CommandArgument.ToString() == "First" || e.CommandArgument.ToString() == "Prev")
        {
        }
        else
        {
            // Get the selected index and the command name
            int _selectedIndex = int.Parse(e.CommandArgument.ToString());

            _commandName = e.CommandName;
            if (_commandName == "PhotoDelete")
            {
                int   a           = 0;
                Label lpid        = (Label)GridView1.Rows[_selectedIndex].Cells[0].FindControl("grdID");
                Image lblPhtoPath = (Image)GridView1.Rows[_selectedIndex].Cells[0].FindControl("grdImg");

                if (ddlColumn.SelectedItem.Text != "Select" && DropDownList1.SelectedItem.Text == "LP" && ddlColumn1.SelectedItem.Text != "Select")
                {
                    GeneralBAL ph = new GeneralBAL();
                    a = ph.DeleteLPPhoto(lpid.Text);
                }
                else if (DropDownList1.SelectedItem.Text == "Festivals" && ddlColumn.SelectedItem.Text != "Select")
                {
                    GeneralBAL ph = new GeneralBAL();
                    a = ph.DeleteFestivalPhoto(lpid.Text);
                }
                else if (DropDownList1.SelectedItem.Text == "Historical Spots" && ddlColumn.SelectedItem.Text != "Select")
                {
                    GeneralBAL ph = new GeneralBAL();
                    a = ph.DeleteSpotPhoto(lpid.Text);
                }

                if (a != 0)
                {
                    string pt = Server.MapPath("");
                    string st = lblPhtoPath.ImageUrl.ToString().Remove(0, 1).Replace('/', '\\');
                    System.IO.File.Delete(pt + st);
                    Page.ClientScript.RegisterStartupScript(typeof(Page), "key", "alert('Photo Deleted.');location='GalleryManager.aspx';", true);
                }
                else
                {
                    Page.ClientScript.RegisterStartupScript(typeof(Page), "key", "alert('Contact Administrator.');location='GalleryManager.aspx';", true);
                }
            }
        }
    }
Esempio n. 19
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();
        }
    }
Esempio n. 20
0
 protected void gridPageChanging(object sender, GridViewPageEventArgs e)
 {
     if (ddlSearchCategory.SelectedItem.Text == "Select" & ddlSearchCategory1.SelectedItem.Text == "Select")
     {
         DataSet     ds1 = new DataSet();
         FestivalBAL fs  = new FestivalBAL();
         ds1 = fs.FetchFestival();
         grdFestival.DataSource = ds1.Tables[0];
         grdFestival.PageIndex  = e.NewPageIndex;
         grdFestival.DataBind();
     }
     else
     {
         DataTable  ds = new DataTable();
         GeneralBAL lp = new GeneralBAL();
         ds = lp.FetchFestivalGridDetails(ddlSearchCategory1.SelectedItem.Text);
         grdFestival.DataSource = ds;
         grdFestival.PageIndex  = e.NewPageIndex;
         grdFestival.DataBind();
     }
 }
Esempio n. 21
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. 22
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. 23
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. 24
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();
        }
    }
Esempio n. 25
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();
        }
    }
 protected void ddlSearchCategory1_SelectedIndexChanged(object sender, EventArgs e)
 {
     // to bind second ddl value based on the first ddl value...
     DataTable ds = new DataTable();
     GeneralBAL lp = new GeneralBAL();
     ds = lp.FetchLPGridDetails(ddlSearchCategory1.SelectedItem.Text);
     grdLP.DataSource = ds;
     grdLP.DataBind();
 }
Esempio n. 27
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();
        }
    }
Esempio n. 28
0
 protected void GridView3_PageIndexChanging(object sender, GridViewPageEventArgs e)
 {
     if (DropDownList2.SelectedItem.Text == "Map")
     {
         if (DropDownList1.SelectedItem.Text == "Historical Spots" && DropDownList3.SelectedItem.Text != "Select")
         {
             DataSet details = new DataSet();
             GeneralBAL fest = new GeneralBAL();
             details = fest.FetchDetailBySearch(DropDownList3.SelectedValue.ToString());
            GridView3.DataSource = details.Tables[1];
             GridView3.PageIndex = e.NewPageIndex;
             GridView3.DataBind();
         }
     }
 }
    public void FetchGridDetails(string LPID)
    {
        DataSet    details = new DataSet();
        GeneralBAL spot    = new GeneralBAL();

        details = spot.FetchLPDetailBySearch(LPID);

        if (details.Tables[0].Rows.Count != 0)
        {
            lblName.Text = details.Tables[0].Rows[0][1].ToString();

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][3].ToString()))
            {
                lblDescription.Visible = false;
                tr1.Visible            = false;
                trs1.Visible           = false;
            }
            else
            {
                lblDescription.Visible = true;
                lblDescription.Text    = details.Tables[0].Rows[0][3].ToString();
                tr1.Visible            = true;
                trs1.Visible           = true;
            }

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][4].ToString()))
            {
                tr1.Visible            = true;
                lblReligion.Visible    = false;
                lblReligionVal.Visible = false;
                tr12.Visible           = false;
                trs12.Visible          = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][4].ToString()) && details.Tables[0].Rows[0][4].ToString() != "==Select==")
            {
                lblReligion.Visible    = true;
                lblReligionVal.Visible = true;
                lblReligionVal.Text    = details.Tables[0].Rows[0][4].ToString();
                tr12.Visible           = true;
                trs12.Visible          = true;
            }
            else
            {
                lblReligion.Visible    = false;
                lblReligionVal.Visible = false;
                tr12.Visible           = false;
                trs12.Visible          = false;
            }

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][2].ToString()))
            {
                lblLPCategroy.Visible    = false;
                lblLPCategroyVal.Visible = false;
                tr2.Visible  = false;
                trs2.Visible = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][2].ToString()) && details.Tables[0].Rows[0][2].ToString() != "==Select==")
            {
                lblLPCategroy.Visible    = true;
                lblLPCategroyVal.Visible = true;
                lblLPCategroyVal.Text    = details.Tables[0].Rows[0][2].ToString();
                tr2.Visible  = true;
                trs2.Visible = true;
            }
            else
            {
                lblLPCategroy.Visible    = false;
                lblLPCategroyVal.Visible = false;
                tr2.Visible  = false;
                trs2.Visible = false;
            }

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][5].ToString()))
            {
                lblDynasty.Visible    = false;
                lblDynastyVal.Visible = false;
                tr3.Visible           = false;
                trs3.Visible          = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][5].ToString()) && details.Tables[0].Rows[0][5].ToString() != "==Select==")
            {
                lblDynasty.Visible    = true;
                lblDynastyVal.Visible = true;
                lblDynastyVal.Text    = details.Tables[0].Rows[0][5].ToString();
                tr3.Visible           = true;
                trs3.Visible          = true;
            }
            else
            {
                lblDynasty.Visible    = false;
                lblDynastyVal.Visible = false;
                tr3.Visible           = false;
                trs3.Visible          = false;
            }

            if (details.Tables[1].Rows.Count != 0)
            {
                if (!string.IsNullOrEmpty(details.Tables[1].Rows[0][0].ToString()))
                {
                    GridView1.DataSource = details.Tables[1];
                    GridView1.DataBind();
                    tr11.Visible = true;
                }
                else
                {
                    tr11.Visible = false;
                }
            }
            else
            {
                tr11.Visible = false;
            }

            #region Batch process...
            DataTable  bt  = new DataTable();
            GeneralBAL bto = new GeneralBAL();
            bt = bto.FetchBatchProcess();
            if (bt.Rows.Count != 0)
            {
                for (int i = 0; i < bt.Rows.Count; i++)
                {
                    if (!bt.Rows[i]["destination"].ToString().Contains("LegendaryPersonalities.aspx"))
                    {
                        lblDescription.Text = lblDescription.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                    }
                }
            }
            #endregion
        }
        else
        {
            lblName.Text             = "Details not available.";
            lblDescription.Visible   = false;
            lblReligion.Visible      = false;
            lblReligionVal.Visible   = false;
            lblLPCategroy.Visible    = false;
            lblLPCategroyVal.Visible = false;
            lblDynasty.Visible       = false;
            lblDynastyVal.Visible    = false;
            tr11.Visible             = false;
            GridView1.Visible        = false;
        }
    }
Esempio n. 30
0
    public void FetchGridDetails(string SpotId)
    {
        DataSet    details = new DataSet();
        GeneralBAL spot    = new GeneralBAL();

        details = spot.FetchDetailBySearch(SpotId);
        if (details.Tables[0].Rows.Count != 0)
        {
            lblSpotID.Text = details.Tables[0].Rows[0][0].ToString();
            lblName.Text   = details.Tables[0].Rows[0][1].ToString();
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][2].ToString()))
            {
                lblDescription.Visible = false;
                tr1.Visible            = false;
                trs1.Visible           = false;
            }
            else
            {
                lblDescription.Visible = true;
                lblDescription.Text    = details.Tables[0].Rows[0][2].ToString();
                tr1.Visible            = true;
                trs1.Visible           = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][3].ToString()))
            {
                tr1.Visible            = true;
                lblReligion.Visible    = false;
                lblReligionVal.Visible = false;
                tr12.Visible           = false;
                trs12.Visible          = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][3].ToString()) && details.Tables[0].Rows[0][3].ToString() != "==Select==")
            {
                lblReligion.Visible    = true;
                lblReligionVal.Visible = true;
                lblReligionVal.Text    = details.Tables[0].Rows[0][3].ToString();
                tr12.Visible           = true;
                trs12.Visible          = true;
            }
            else
            {
                lblReligion.Visible    = false;
                lblReligionVal.Visible = false;
                tr12.Visible           = false;
                trs12.Visible          = false;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][4].ToString()))
            {
                lblDeity.Visible    = false;
                lblDeityVal.Visible = false;
                tr14.Visible        = false;
                trs14.Visible       = false;
            }
            else
            {
                lblDeity.Visible    = true;
                lblDeityVal.Visible = true;
                lblDeityVal.Text    = details.Tables[0].Rows[0][4].ToString();
                tr14.Visible        = true;
                trs14.Visible       = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][5].ToString()))
            {
                lblPeriod.Visible    = false;
                lblPeriodVal.Visible = false;
                tr16.Visible         = false;
                trs16.Visible        = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][5].ToString()) && details.Tables[0].Rows[0][5].ToString() != "==Select==")
            {
                lblPeriod.Visible    = true;
                lblPeriodVal.Visible = true;
                string period    = lblPeriodVal.Text = details.Tables[0].Rows[0][5].ToString();
                int    intperiod = int.Parse(period);
                if (intperiod == 11 || intperiod == 12 || intperiod == 13)
                {
                    period            = period + "th Century";
                    lblPeriodVal.Text = period;
                }
                else
                {
                    int lastnumber = intperiod % 10;
                    if (lastnumber == 0 || lastnumber == 4 || lastnumber == 5 || lastnumber == 6 || lastnumber == 7 || lastnumber == 8 || lastnumber == 9)
                    {
                        period            = period + "th Century";
                        lblPeriodVal.Text = period;
                    }
                    else if (lastnumber == 1)
                    {
                        period            = period + "st Century";
                        lblPeriodVal.Text = period;
                    }
                    else if (lastnumber == 2)
                    {
                        period            = period + "nd Century";
                        lblPeriodVal.Text = period;
                    }
                    else if (lastnumber == 3)
                    {
                        period            = period + "rd Century";
                        lblPeriodVal.Text = period;
                    }
                }
                tr16.Visible  = true;
                trs16.Visible = true;
            }
            else
            {
                lblPeriod.Visible    = false;
                lblPeriodVal.Visible = false;
                tr16.Visible         = false;
                trs16.Visible        = false;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][6].ToString()))
            {
                lblBuiltBy.Visible    = false;
                lblBuiltByVal.Visible = false;
                tr15.Visible          = false;
                trs15.Visible         = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][6].ToString()) && details.Tables[0].Rows[0][6].ToString() != "==Select==")
            {
                lblBuiltBy.Visible    = true;
                lblBuiltByVal.Visible = true;
                lblBuiltByVal.Text    = details.Tables[0].Rows[0][6].ToString();
                tr15.Visible          = true;
                trs15.Visible         = true;
            }
            else
            {
                lblBuiltBy.Visible    = false;
                lblBuiltByVal.Visible = false;
                tr15.Visible          = false;
                trs15.Visible         = false;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][7].ToString()))
            {
                lblArchitecture.Visible    = false;
                lblArchitectureVal.Visible = false;
                tr3.Visible  = false;
                trs3.Visible = false;
            }
            else
            {
                lblArchitecture.Visible    = true;
                lblArchitectureVal.Visible = true;
                lblArchitectureVal.Text    = details.Tables[0].Rows[0][7].ToString();
                tr3.Visible  = true;
                trs3.Visible = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][8].ToString()))
            {
                lblSculpture.Visible    = false;
                lblSculptureVal.Visible = false;
                tr4.Visible             = false;
                trs4.Visible            = false;
            }
            else
            {
                lblSculpture.Visible    = true;
                lblSculptureVal.Visible = true;
                lblSculptureVal.Text    = details.Tables[0].Rows[0][8].ToString();
                tr4.Visible             = true;
                trs4.Visible            = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][9].ToString()))
            {
                lblPainting.Visible    = false;
                lblPaintingVal.Visible = false;
                tr5.Visible            = false;
                trs5.Visible           = false;
            }
            else
            {
                lblPainting.Visible    = true;
                lblPaintingVal.Visible = true;
                lblPaintingVal.Text    = details.Tables[0].Rows[0][9].ToString();
                tr5.Visible            = true;
                trs5.Visible           = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][10].ToString()))
            {
                lblInscription.Visible    = false;
                lblInscriptionVal.Visible = false;
                tr6.Visible  = false;
                trs6.Visible = false;
            }
            else
            {
                lblInscription.Visible    = true;
                lblInscriptionVal.Visible = true;
                lblInscriptionVal.Text    = details.Tables[0].Rows[0][10].ToString();
                tr6.Visible  = true;
                trs6.Visible = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][11].ToString()))
            {
                lblHymns.Visible    = false;
                lblHymnsVal.Visible = false;
                tr7.Visible         = false;
                trs7.Visible        = false;
            }
            else
            {
                lblHymns.Visible    = true;
                lblHymnsVal.Visible = true;
                lblHymnsVal.Text    = details.Tables[0].Rows[0][11].ToString();
                tr7.Visible         = true;
                trs7.Visible        = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][12].ToString()))
            {
                lblMythology.Visible    = false;
                lblMythologyVal.Visible = false;
                tr8.Visible             = false;
                trs8.Visible            = false;
            }
            else
            {
                lblMythology.Visible    = true;
                lblMythologyVal.Visible = true;
                lblMythologyVal.Text    = details.Tables[0].Rows[0][12].ToString();
                tr8.Visible             = true;
                trs8.Visible            = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][13].ToString()))
            {
                lblEvents.Visible    = false;
                lblEventsVal.Visible = false;
                tr9.Visible          = false;
                trs9.Visible         = false;
            }
            else
            {
                lblEvents.Visible    = true;
                lblEventsVal.Visible = true;
                lblEventsVal.Text    = details.Tables[0].Rows[0][13].ToString();
                tr9.Visible          = true;
                trs9.Visible         = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][14].ToString()))
            {
                lblTiming.Visible    = false;
                lblTimingVal.Visible = false;
                tr13.Visible         = false;
                trs13.Visible        = false;
            }
            else
            {
                lblTiming.Visible    = true;
                lblTimingVal.Visible = true;
                lblTimingVal.Text    = details.Tables[0].Rows[0][14].ToString();
                tr13.Visible         = true;
                trs13.Visible        = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][15].ToString()))
            {
                lblLocation.Visible    = false;
                lblLocationVal.Visible = false;
                tr2.Visible            = false;
                trs2.Visible           = false;
            }
            else
            {
                lblLocation.Visible    = true;
                lblLocationVal.Visible = true;
                lblLocationVal.Text    = details.Tables[0].Rows[0][15].ToString();
                tr2.Visible            = true;
                trs2.Visible           = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][17].ToString()))
            {
                lblSpotCategory.Visible    = false;
                lblSpotCategoryVal.Visible = false;
                tr18.Visible  = false;
                trs18.Visible = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][17].ToString()) && details.Tables[0].Rows[0][17].ToString() != "==Select==")
            {
                lblSpotCategory.Visible    = true;
                lblSpotCategoryVal.Visible = true;
                lblSpotCategoryVal.Text    = details.Tables[0].Rows[0][17].ToString();
                tr18.Visible  = true;
                trs18.Visible = true;
            }
            else
            {
                lblSpotCategory.Visible    = false;
                lblSpotCategoryVal.Visible = false;
                tr18.Visible  = false;
                trs18.Visible = false;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][18].ToString()))
            {
                lblSanctifiedBy.Visible    = false;
                lblSanctifiedByVal.Visible = false;
                tr17.Visible  = false;
                trs17.Visible = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][18].ToString()) && details.Tables[0].Rows[0][18].ToString() != "==Select==")
            {
                lblSanctifiedBy.Visible    = true;
                lblSanctifiedByVal.Visible = true;
                lblSanctifiedByVal.Text    = details.Tables[0].Rows[0][18].ToString();
                tr17.Visible  = true;
                trs17.Visible = true;
            }
            else
            {
                lblSanctifiedBy.Visible    = false;
                lblSanctifiedByVal.Visible = false;
                tr17.Visible  = false;
                trs17.Visible = false;
            }
            // bind the festival details basaed on the spotname....
            if (details.Tables[2].Rows.Count != 0)
            {
                if (!string.IsNullOrEmpty(details.Tables[2].Rows[0][0].ToString()))
                {
                    lblFestivals.Visible   = true;
                    grdFestival.DataSource = details.Tables[2];
                    grdFestival.DataBind();
                    tr19.Visible = true;
                }
                else
                {
                    tr19.Visible = false;
                }
            }
            else
            {
                tr19.Visible = false;
            }
            //end bind the festival details basaed on the spotname....

            // bind the image details basaed on the spotname....
            if (details.Tables[1].Rows.Count != 0)
            {
                if (!string.IsNullOrEmpty(details.Tables[1].Rows[0][0].ToString()))
                {
                    GridView1.DataSource = details.Tables[1];
                    GridView1.DataBind();
                    tr10.Visible = true;
                }
                else
                {
                    tr10.Visible = false;
                }
            }
            else
            {
                tr10.Visible = false;
            }
            //end bind the image details basaed on the spotname....



            //bind the map image based on spotname....
            if (details.Tables[3].Rows.Count != 0)
            {
                if (!string.IsNullOrEmpty(details.Tables[3].Rows[0][0].ToString()))
                {
                    GridView2.DataSource = details.Tables[3];
                    GridView2.DataBind();
                    tr11.Visible = true;
                }
                else
                {
                    tr11.Visible = false;
                }
            }
            else
            {
                tr11.Visible = false;
            }



            #region Batch process...
            DataTable  bt  = new DataTable();
            GeneralBAL bto = new GeneralBAL();
            bt = bto.FetchBatchProcess();
            if (bt.Rows.Count != 0)
            {
                for (int i = 0; i < bt.Rows.Count; i++)
                {
                    if (!bt.Rows[i]["destination"].ToString().Contains("HistoricalSpots.aspx"))
                    {
                        lblDescription.Text     = lblDescription.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblArchitectureVal.Text = lblArchitectureVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblSculptureVal.Text    = lblSculptureVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblPaintingVal.Text     = lblPaintingVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblInscriptionVal.Text  = lblInscriptionVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblHymnsVal.Text        = lblHymnsVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblMythologyVal.Text    = lblMythologyVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblEventsVal.Text       = lblEventsVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblLocationVal.Text     = lblLocationVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                    }
                }
            }
            #endregion
        }
        else
        {
            lblName.Text               = "Details not available.";
            lblDescription.Visible     = false;
            lblSanctifiedBy.Visible    = false;
            lblSanctifiedByVal.Visible = false;
            lblSpotCategory.Visible    = false;
            lblSpotCategoryVal.Visible = false;
            lblLocation.Visible        = false;
            lblLocationVal.Visible     = false;
            lblTiming.Visible          = false;
            lblTimingVal.Visible       = false;
            lblPainting.Visible        = false;
            lblPaintingVal.Visible     = false;
            lblInscription.Visible     = false;
            lblInscriptionVal.Visible  = false;
            lblHymns.Visible           = false;
            lblHymnsVal.Visible        = false;
            lblMythology.Visible       = false;
            lblMythologyVal.Visible    = false;
            lblEvents.Visible          = false;
            lblEventsVal.Visible       = false;
            lblMythology.Visible       = false;
            lblMythologyVal.Visible    = false;
            lblHymns.Visible           = false;
            lblHymnsVal.Visible        = false;
            lblInscription.Visible     = false;
            lblInscriptionVal.Visible  = false;
            lblPainting.Visible        = false;
            lblPaintingVal.Visible     = false;
            lblSculpture.Visible       = false;
            lblSculptureVal.Visible    = false;
            lblArchitecture.Visible    = false;
            lblArchitectureVal.Visible = false;
            lblBuiltBy.Visible         = false;
            lblBuiltByVal.Visible      = false;
            lblPeriod.Visible          = false;
            lblPeriodVal.Visible       = false;
            lblDeity.Visible           = false;
            lblDeityVal.Visible        = false;
            lblReligion.Visible        = false;
            lblReligionVal.Visible     = false;
            tr10.Visible               = false;
            tr11.Visible               = false;
            GridView1.Visible          = false;
            GridView2.Visible          = false;
            lblFestivals.Visible       = false;
            grdFestival.Visible        = false;
        }
    }
Esempio n. 31
0
    public void FetchGridDetails(string FestivalID)
    {
        DataSet    details = new DataSet();
        GeneralBAL fest    = new GeneralBAL();

        details = fest.FetchFestivalBySearch(FestivalID);

        if (details.Tables[0].Rows.Count != 0)
        {
            lblName.Text = details.Tables[0].Rows[0][1].ToString();
            //lnkSpotName.CommandArgument = details.Tables[0].Rows[0][1].ToString();

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][3].ToString()))
            {
                lblDescription.Visible = false;
                tr1.Visible            = false;
                trs1.Visible           = false;
            }
            else
            {
                lblDescription.Visible = true;
                lblDescription.Text    = details.Tables[0].Rows[0][3].ToString();
                tr1.Visible            = true;
                trs1.Visible           = true;
            }

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][2].ToString()))
            {
                lblMonth.Visible    = false;
                lblMonthVal.Visible = false;
                tr2.Visible         = false;
                trs2.Visible        = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][2].ToString()) && details.Tables[0].Rows[0][2].ToString() != "Select")
            {
                lblMonth.Visible    = true;
                lblMonthVal.Visible = true;
                lblMonthVal.Text    = details.Tables[0].Rows[0][2].ToString();
                tr2.Visible         = true;
                trs2.Visible        = true;
            }
            else
            {
                lblMonth.Visible    = false;
                lblMonthVal.Visible = false;
                tr2.Visible         = false;
                trs2.Visible        = false;
            }

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][5].ToString()))
            {
                lblSpotName.Visible    = false;
                lblSpotNameVal.Visible = false;
                tr3.Visible            = false;
                trs3.Visible           = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][5].ToString()) && details.Tables[0].Rows[0][5].ToString() != "Select")
            {
                lblSpotName.Visible    = true;
                lblSpotNameVal.Visible = true;
                lblSpotNameVal.Text    = details.Tables[0].Rows[0][5].ToString();
                tr3.Visible            = true;
                trs3.Visible           = true;
            }
            else
            {
                lblSpotName.Visible    = false;
                lblSpotNameVal.Visible = false;
                tr3.Visible            = false;
                trs3.Visible           = false;
            }

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][4].ToString()))
            {
                lblDuration.Visible    = false;
                lblDurationVal.Visible = false;
                tr4.Visible            = false;
                trs4.Visible           = false;
            }
            else
            {
                lblDuration.Visible    = true;
                lblDurationVal.Visible = true;
                lblDurationVal.Text    = details.Tables[0].Rows[0][4].ToString();
                tr4.Visible            = true;
                trs4.Visible           = true;
            }

            if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][6].ToString()))
            {
                lnkSpotName.CommandArgument = details.Tables[0].Rows[0][6].ToString();
            }

            if (details.Tables[1].Rows.Count != 0)
            {
                if (!string.IsNullOrEmpty(details.Tables[1].Rows[0][0].ToString()))
                {
                    GridView1.DataSource = details.Tables[1];
                    GridView1.DataBind();
                    tr11.Visible = true;
                }
                else
                {
                    tr11.Visible = false;
                }
            }
            else
            {
                tr11.Visible = false;
            }

            #region Batch process...
            DataTable  bt  = new DataTable();
            GeneralBAL bto = new GeneralBAL();
            bt = bto.FetchBatchProcess();
            if (bt.Rows.Count != 0)
            {
                for (int i = 0; i < bt.Rows.Count; i++)
                {
                    if (!bt.Rows[i]["destination"].ToString().Contains("Festivals.aspx"))
                    {
                        lblDescription.Text = lblDescription.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                    }
                }
            }
            #endregion
        }
        else
        {
            lblName.Text           = "Details not available.";
            lblDescription.Visible = false;
            lblMonth.Visible       = false;
            lblMonthVal.Visible    = false;
            lblSpotName.Visible    = false;
            lblSpotNameVal.Visible = false;
            lblDuration.Visible    = false;
            lblDurationVal.Visible = false;
            tr11.Visible           = false;
            GridView1.Visible      = false;
        }
    }
    public void FetchGridDetails(string LPID)
    {
        DataSet details = new DataSet();
        GeneralBAL spot = new GeneralBAL();
        details = spot.FetchLPDetailBySearch(LPID);

        if (details.Tables[0].Rows.Count != 0)
        {
            lblName.Text = details.Tables[0].Rows[0][1].ToString();

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][3].ToString()))
            {
                lblDescription.Visible = false;
                tr1.Visible = false;
                trs1.Visible = false;
            }
            else
            {
                lblDescription.Visible = true;
                lblDescription.Text = details.Tables[0].Rows[0][3].ToString();
                tr1.Visible = true;
                trs1.Visible = true;
            }

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][4].ToString()))
            {
                tr1.Visible = true;
                lblReligion.Visible = false;
                lblReligionVal.Visible = false;
                tr12.Visible = false;
                trs12.Visible = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][4].ToString()) && details.Tables[0].Rows[0][4].ToString() != "==Select==")
            {
                lblReligion.Visible = true;
                lblReligionVal.Visible = true;
                lblReligionVal.Text = details.Tables[0].Rows[0][4].ToString();
                tr12.Visible = true;
                trs12.Visible = true;
            }
            else
            {
                lblReligion.Visible = false;
                lblReligionVal.Visible = false;
                tr12.Visible = false;
                trs12.Visible = false;
            }

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][2].ToString()))
            {
                lblLPCategroy.Visible = false;
                lblLPCategroyVal.Visible = false;
                tr2.Visible = false;
                trs2.Visible = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][2].ToString()) && details.Tables[0].Rows[0][2].ToString() != "==Select==")
            {
                lblLPCategroy.Visible = true;
                lblLPCategroyVal.Visible = true;
                lblLPCategroyVal.Text = details.Tables[0].Rows[0][2].ToString();
                tr2.Visible = true;
                trs2.Visible = true;
            }
            else
            {
                lblLPCategroy.Visible = false;
                lblLPCategroyVal.Visible = false;
                tr2.Visible = false;
                trs2.Visible = false;
            }

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][5].ToString()))
            {
                lblDynasty.Visible = false;
                lblDynastyVal.Visible = false;
                tr3.Visible = false;
                trs3.Visible = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][5].ToString()) && details.Tables[0].Rows[0][5].ToString() != "==Select==")
            {
                lblDynasty.Visible = true;
                lblDynastyVal.Visible = true;
                lblDynastyVal.Text = details.Tables[0].Rows[0][5].ToString();
                tr3.Visible = true;
                trs3.Visible = true;
            }
            else
            {
                lblDynasty.Visible = false;
                lblDynastyVal.Visible = false;
                tr3.Visible = false;
                trs3.Visible = false;
            }

            if (details.Tables[1].Rows.Count != 0)
            {
                if (!string.IsNullOrEmpty(details.Tables[1].Rows[0][0].ToString()))
                {
                    GridView1.DataSource = details.Tables[1];
                    GridView1.DataBind();
                    tr11.Visible = true;
                }
                else
                    tr11.Visible = false;
            }
            else
                tr11.Visible = false;

            #region Batch process...
            DataTable bt = new DataTable();
            GeneralBAL bto = new GeneralBAL();
            bt = bto.FetchBatchProcess();
            if (bt.Rows.Count != 0)
            {
                for (int i = 0; i < bt.Rows.Count; i++)
                    if (!bt.Rows[i]["destination"].ToString().Contains("LegendaryPersonalities.aspx"))
                        lblDescription.Text = lblDescription.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
            }
            #endregion
        }
        else
        {
            lblName.Text = "Details not available.";
            lblDescription.Visible = false;
            lblReligion.Visible = false;
            lblReligionVal.Visible = false;
            lblLPCategroy.Visible = false;
            lblLPCategroyVal.Visible = false;
            lblDynasty.Visible = false;
            lblDynastyVal.Visible = false;
            tr11.Visible = false;
            GridView1.Visible = false;
        }
    }
Esempio n. 33
0
    public void FetchGridDetails(string SpotId)
    {
        DataSet details = new DataSet();
        GeneralBAL spot = new GeneralBAL();
        details = spot.FetchDetailBySearch(SpotId);
        if (details.Tables[0].Rows.Count != 0)
        {
            lblSpotID.Text = details.Tables[0].Rows[0][0].ToString();
            lblName.Text = details.Tables[0].Rows[0][1].ToString();
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][2].ToString()))
            {
                lblDescription.Visible = false;
                tr1.Visible = false;
                trs1.Visible = false;
            }
            else
            {
                lblDescription.Visible = true;
                lblDescription.Text = details.Tables[0].Rows[0][2].ToString();
                tr1.Visible = true;
                trs1.Visible = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][3].ToString()))
            {
                tr1.Visible = true;
                lblReligion.Visible = false;
                lblReligionVal.Visible = false;
                tr12.Visible = false;
                trs12.Visible = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][3].ToString()) && details.Tables[0].Rows[0][3].ToString() != "==Select==")
            {
                lblReligion.Visible = true;
                lblReligionVal.Visible = true;
                lblReligionVal.Text = details.Tables[0].Rows[0][3].ToString();
                tr12.Visible = true;
                trs12.Visible = true;
            }
            else
            {
                lblReligion.Visible = false;
                lblReligionVal.Visible = false;
                tr12.Visible = false;
                trs12.Visible = false;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][4].ToString()))
            {
                lblDeity.Visible = false;
                lblDeityVal.Visible = false;
                tr14.Visible = false;
                trs14.Visible = false;
            }
            else
            {
                lblDeity.Visible = true;
                lblDeityVal.Visible = true;
                lblDeityVal.Text = details.Tables[0].Rows[0][4].ToString();
                tr14.Visible = true;
                trs14.Visible = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][5].ToString()))
            {
                lblPeriod.Visible = false;
                lblPeriodVal.Visible = false;
                tr16.Visible = false;
                trs16.Visible = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][5].ToString()) && details.Tables[0].Rows[0][5].ToString() != "==Select==")
            {
                lblPeriod.Visible = true;
                lblPeriodVal.Visible = true;
                string period = lblPeriodVal.Text = details.Tables[0].Rows[0][5].ToString();
                int intperiod = int.Parse(period);
                if (intperiod == 11 || intperiod == 12 || intperiod == 13)
                {
                    period = period + "th Century";
                    lblPeriodVal.Text = period;
                }
                else
                {
                    int lastnumber = intperiod % 10;
                    if (lastnumber == 0 || lastnumber == 4 || lastnumber == 5 || lastnumber == 6 || lastnumber == 7 || lastnumber == 8 || lastnumber == 9)
                    {
                        period = period + "th Century";
                        lblPeriodVal.Text = period;
                    }
                    else if (lastnumber == 1)
                    {
                        period = period + "st Century";
                        lblPeriodVal.Text = period;
                    }
                    else if (lastnumber == 2)
                    {
                        period = period + "nd Century";
                        lblPeriodVal.Text = period;
                    }
                    else if (lastnumber == 3)
                    {
                        period = period + "rd Century";
                        lblPeriodVal.Text = period;
                    }
                }
                tr16.Visible = true;
                trs16.Visible = true;
            }
            else
            {
                lblPeriod.Visible = false;
                lblPeriodVal.Visible = false;
                tr16.Visible = false;
                trs16.Visible = false;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][6].ToString()))
            {
                lblBuiltBy.Visible = false;
                lblBuiltByVal.Visible = false;
                tr15.Visible = false;
                trs15.Visible = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][6].ToString()) && details.Tables[0].Rows[0][6].ToString() != "==Select==")
            {
                lblBuiltBy.Visible = true;
                lblBuiltByVal.Visible = true;
                lblBuiltByVal.Text = details.Tables[0].Rows[0][6].ToString();
                tr15.Visible = true;
                trs15.Visible = true;
            }
            else
            {
                lblBuiltBy.Visible = false;
                lblBuiltByVal.Visible = false;
                tr15.Visible = false;
                trs15.Visible = false;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][7].ToString()))
            {
                lblArchitecture.Visible = false;
                lblArchitectureVal.Visible = false;
                tr3.Visible = false;
                trs3.Visible = false;
            }
            else
            {
                lblArchitecture.Visible = true;
                lblArchitectureVal.Visible = true;
                lblArchitectureVal.Text = details.Tables[0].Rows[0][7].ToString();
                tr3.Visible = true;
                trs3.Visible = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][8].ToString()))
            {
                lblSculpture.Visible = false;
                lblSculptureVal.Visible = false;
                tr4.Visible = false;
                trs4.Visible = false;
            }
            else
            {
                lblSculpture.Visible = true;
                lblSculptureVal.Visible = true;
                lblSculptureVal.Text = details.Tables[0].Rows[0][8].ToString();
                tr4.Visible = true;
                trs4.Visible = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][9].ToString()))
            {
                lblPainting.Visible = false;
                lblPaintingVal.Visible = false;
                tr5.Visible = false;
                trs5.Visible = false;
            }
            else
            {
                lblPainting.Visible = true;
                lblPaintingVal.Visible = true;
                lblPaintingVal.Text = details.Tables[0].Rows[0][9].ToString();
                tr5.Visible = true;
                trs5.Visible = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][10].ToString()))
            {
                lblInscription.Visible = false;
                lblInscriptionVal.Visible = false;
                tr6.Visible = false;
                trs6.Visible = false;
            }
            else
            {
                lblInscription.Visible = true;
                lblInscriptionVal.Visible = true;
                lblInscriptionVal.Text = details.Tables[0].Rows[0][10].ToString();
                tr6.Visible = true;
                trs6.Visible = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][11].ToString()))
            {
                lblHymns.Visible = false;
                lblHymnsVal.Visible = false;
                tr7.Visible = false;
                trs7.Visible = false;
            }
            else
            {
                lblHymns.Visible = true;
                lblHymnsVal.Visible = true;
                lblHymnsVal.Text = details.Tables[0].Rows[0][11].ToString();
                tr7.Visible = true;
                trs7.Visible = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][12].ToString()))
            {
                lblMythology.Visible = false;
                lblMythologyVal.Visible = false;
                tr8.Visible = false;
                trs8.Visible = false;
            }
            else
            {
                lblMythology.Visible = true;
                lblMythologyVal.Visible = true;
                lblMythologyVal.Text = details.Tables[0].Rows[0][12].ToString();
                tr8.Visible = true;
                trs8.Visible = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][13].ToString()))
            {
                lblEvents.Visible = false;
                lblEventsVal.Visible = false;
                tr9.Visible = false;
                trs9.Visible = false;
            }
            else
            {
                lblEvents.Visible = true;
                lblEventsVal.Visible = true;
                lblEventsVal.Text = details.Tables[0].Rows[0][13].ToString();
                tr9.Visible = true;
                trs9.Visible = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][14].ToString()))
            {
                lblTiming.Visible = false;
                lblTimingVal.Visible = false;
                tr13.Visible = false;
                trs13.Visible = false;
            }
            else
            {
                lblTiming.Visible = true;
                lblTimingVal.Visible = true;
                lblTimingVal.Text = details.Tables[0].Rows[0][14].ToString();
                tr13.Visible = true;
                trs13.Visible = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][15].ToString()))
            {
                lblLocation.Visible = false;
                lblLocationVal.Visible = false;
                tr2.Visible = false;
                trs2.Visible = false;
            }
            else
            {
                lblLocation.Visible = true;
                lblLocationVal.Visible = true;
                lblLocationVal.Text = details.Tables[0].Rows[0][15].ToString();
                tr2.Visible = true;
                trs2.Visible = true;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][17].ToString()))
            {
                lblSpotCategory.Visible = false;
                lblSpotCategoryVal.Visible = false;
                tr18.Visible = false;
                trs18.Visible = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][17].ToString()) && details.Tables[0].Rows[0][17].ToString() != "==Select==")
            {
                lblSpotCategory.Visible = true;
                lblSpotCategoryVal.Visible = true;
                lblSpotCategoryVal.Text = details.Tables[0].Rows[0][17].ToString();
                tr18.Visible = true;
                trs18.Visible = true;
            }
            else
            {
                lblSpotCategory.Visible = false;
                lblSpotCategoryVal.Visible = false;
                tr18.Visible = false;
                trs18.Visible = false;
            }
            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][18].ToString()))
            {
                lblSanctifiedBy.Visible = false;
                lblSanctifiedByVal.Visible = false;
                tr17.Visible = false;
                trs17.Visible = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][18].ToString()) && details.Tables[0].Rows[0][18].ToString() != "==Select==")
            {
                lblSanctifiedBy.Visible = true;
                lblSanctifiedByVal.Visible = true;
                lblSanctifiedByVal.Text = details.Tables[0].Rows[0][18].ToString();
                tr17.Visible = true;
                trs17.Visible = true;
            }
            else
            {
                lblSanctifiedBy.Visible = false;
                lblSanctifiedByVal.Visible = false;
                tr17.Visible = false;
                trs17.Visible = false;
            }
            // bind the festival details basaed on the spotname....
            if (details.Tables[2].Rows.Count != 0)
            {
                if (!string.IsNullOrEmpty(details.Tables[2].Rows[0][0].ToString()))
                {
                    lblFestivals.Visible = true;
                    grdFestival.DataSource = details.Tables[2];
                    grdFestival.DataBind();
                    tr19.Visible = true;
                }
                else
                    tr19.Visible = false;
            }
            else
                tr19.Visible = false;
            //end bind the festival details basaed on the spotname....

            // bind the image details basaed on the spotname....
            if (details.Tables[1].Rows.Count != 0)
            {
                if (!string.IsNullOrEmpty(details.Tables[1].Rows[0][0].ToString()))
                {
                    GridView1.DataSource = details.Tables[1];
                    GridView1.DataBind();
                    tr10.Visible = true;
                }
                else
                    tr10.Visible = false;
            }
            else
                tr10.Visible = false;
            //end bind the image details basaed on the spotname....

            //bind the map image based on spotname....
            if (details.Tables[3].Rows.Count != 0)
            {
                if (!string.IsNullOrEmpty(details.Tables[3].Rows[0][0].ToString()))
                {
                    GridView2.DataSource = details.Tables[3];
                    GridView2.DataBind();
                    tr11.Visible = true;
                }
                else
                    tr11.Visible = false;
            }
            else
                tr11.Visible = false;

            #region Batch process...
            DataTable bt = new DataTable();
            GeneralBAL bto = new GeneralBAL();
            bt = bto.FetchBatchProcess();
            if (bt.Rows.Count != 0)
            {
                for (int i = 0; i < bt.Rows.Count; i++)
                {
                    if (!bt.Rows[i]["destination"].ToString().Contains("HistoricalSpots.aspx"))
                    {
                        lblDescription.Text = lblDescription.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblArchitectureVal.Text = lblArchitectureVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblSculptureVal.Text = lblSculptureVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblPaintingVal.Text = lblPaintingVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblInscriptionVal.Text = lblInscriptionVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblHymnsVal.Text = lblHymnsVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblMythologyVal.Text = lblMythologyVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblEventsVal.Text = lblEventsVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                        lblLocationVal.Text = lblLocationVal.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
                    }
                }
            }
            #endregion
        }
        else
        {
            lblName.Text = "Details not available.";
            lblDescription.Visible = false;
            lblSanctifiedBy.Visible = false;
            lblSanctifiedByVal.Visible = false;
            lblSpotCategory.Visible = false;
            lblSpotCategoryVal.Visible = false;
            lblLocation.Visible = false;
            lblLocationVal.Visible = false;
            lblTiming.Visible = false;
            lblTimingVal.Visible = false;
            lblPainting.Visible = false;
            lblPaintingVal.Visible = false;
            lblInscription.Visible = false;
            lblInscriptionVal.Visible = false;
            lblHymns.Visible = false;
            lblHymnsVal.Visible = false;
            lblMythology.Visible = false;
            lblMythologyVal.Visible = false;
            lblEvents.Visible = false;
            lblEventsVal.Visible = false;
            lblMythology.Visible = false;
            lblMythologyVal.Visible = false;
            lblHymns.Visible = false;
            lblHymnsVal.Visible = false;
            lblInscription.Visible = false;
            lblInscriptionVal.Visible = false;
            lblPainting.Visible = false;
            lblPaintingVal.Visible = false;
            lblSculpture.Visible = false;
            lblSculptureVal.Visible = false;
            lblArchitecture.Visible = false;
            lblArchitectureVal.Visible = false;
            lblBuiltBy.Visible = false;
            lblBuiltByVal.Visible = false;
            lblPeriod.Visible = false;
            lblPeriodVal.Visible = false;
            lblDeity.Visible = false;
            lblDeityVal.Visible = false;
            lblReligion.Visible = false;
            lblReligionVal.Visible = false;
            tr10.Visible = false;
            tr11.Visible = false;
            GridView1.Visible = false;
            GridView2.Visible = false;
            lblFestivals.Visible = false;
            grdFestival.Visible = false;
        }
    }
Esempio n. 34
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)
                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;
                }
            }

        }
    }
Esempio n. 35
0
 protected void gridPageChanging(object sender, GridViewPageEventArgs e)
 {
     if (ddlSearchCategory.SelectedItem.Text == "Select" & ddlSearchCategory1.SelectedItem.Text == "Select")
     {
         DataSet ds1 = new DataSet();
         FestivalBAL fs = new FestivalBAL();
         ds1 = fs.FetchFestival();
         grdFestival.DataSource = ds1.Tables[0];
         grdFestival.PageIndex = e.NewPageIndex;
         grdFestival.DataBind();
     }
     else
     {
         DataTable ds = new DataTable();
         GeneralBAL lp = new GeneralBAL();
         ds = lp.FetchFestivalGridDetails(ddlSearchCategory1.SelectedItem.Text);
         grdFestival.DataSource = ds;
         grdFestival.PageIndex = e.NewPageIndex;
         grdFestival.DataBind();
     }
 }
Esempio n. 36
0
    public void FetchGridDetails(string FestivalID)
    {
        DataSet details = new DataSet();
        GeneralBAL fest = new GeneralBAL();
        details = fest.FetchFestivalBySearch(FestivalID);

        if (details.Tables[0].Rows.Count != 0)
        {
            lblName.Text = details.Tables[0].Rows[0][1].ToString();
            //lnkSpotName.CommandArgument = details.Tables[0].Rows[0][1].ToString();

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][3].ToString()))
            {
                lblDescription.Visible = false;
                tr1.Visible = false;
                trs1.Visible = false;
            }
            else
            {
                lblDescription.Visible = true;
                lblDescription.Text = details.Tables[0].Rows[0][3].ToString();
                tr1.Visible = true;
                trs1.Visible = true;
            }

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][2].ToString()))
            {
                lblMonth.Visible = false;
                lblMonthVal.Visible = false;
                tr2.Visible = false;
                trs2.Visible = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][2].ToString()) && details.Tables[0].Rows[0][2].ToString() != "Select")
            {
                lblMonth.Visible = true;
                lblMonthVal.Visible = true;
                lblMonthVal.Text = details.Tables[0].Rows[0][2].ToString();
                tr2.Visible = true;
                trs2.Visible = true;
            }
            else
            {
                lblMonth.Visible = false;
                lblMonthVal.Visible = false;
                tr2.Visible = false;
                trs2.Visible = false;
            }

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][5].ToString()))
            {
                lblSpotName.Visible = false;
                lblSpotNameVal.Visible = false;
                tr3.Visible = false;
                trs3.Visible = false;
            }
            else if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][5].ToString()) && details.Tables[0].Rows[0][5].ToString() != "Select")
            {
                lblSpotName.Visible = true;
                lblSpotNameVal.Visible = true;
                lblSpotNameVal.Text = details.Tables[0].Rows[0][5].ToString();
                tr3.Visible = true;
                trs3.Visible = true;
            }
            else
            {
                lblSpotName.Visible = false;
                lblSpotNameVal.Visible = false;
                tr3.Visible = false;
                trs3.Visible = false;
            }

            if (string.IsNullOrEmpty(details.Tables[0].Rows[0][4].ToString()))
            {
                lblDuration.Visible = false;
                lblDurationVal.Visible = false;
                tr4.Visible = false;
                trs4.Visible = false;
            }
            else
            {
                lblDuration.Visible = true;
                lblDurationVal.Visible = true;
                lblDurationVal.Text = details.Tables[0].Rows[0][4].ToString();
                tr4.Visible = true;
                trs4.Visible = true;
            }

            if (!string.IsNullOrEmpty(details.Tables[0].Rows[0][6].ToString()))
                lnkSpotName.CommandArgument = details.Tables[0].Rows[0][6].ToString();

            if (details.Tables[1].Rows.Count != 0)
            {
                if (!string.IsNullOrEmpty(details.Tables[1].Rows[0][0].ToString()))
                {
                    GridView1.DataSource = details.Tables[1];
                    GridView1.DataBind();
                    tr11.Visible = true;
                }
                else
                    tr11.Visible = false;
            }
            else
                tr11.Visible = false;

            #region Batch process...
            DataTable bt = new DataTable();
            GeneralBAL bto = new GeneralBAL();
            bt = bto.FetchBatchProcess();
            if (bt.Rows.Count != 0)
            {
                for (int i = 0; i < bt.Rows.Count; i++)
                    if (!bt.Rows[i]["destination"].ToString().Contains("Festivals.aspx"))
                        lblDescription.Text = lblDescription.Text.Replace(bt.Rows[i]["li"].ToString(), bt.Rows[i]["destination"].ToString());
            }
            #endregion
        }
        else
        {
            lblName.Text = "Details not available.";
            lblDescription.Visible = false;
            lblMonth.Visible = false;
            lblMonthVal.Visible = false;
            lblSpotName.Visible = false;
            lblSpotNameVal.Visible = false;
            lblDuration.Visible = false;
            lblDurationVal.Visible = false;
            tr11.Visible = false;
            GridView1.Visible = false;
        }
    }
Esempio n. 37
0
    protected void ddlSearchCategory1_SelectedIndexChanged(object sender, EventArgs e)
    {
        DataTable ds = new DataTable();
        GeneralBAL lp = new GeneralBAL();
        ds = lp.FetchFestivalGridDetails(ddlSearchCategory1.SelectedItem.Text);

        grdFestival.DataSource = ds;
        grdFestival.DataBind();
    }
Esempio n. 38
0
 protected void gridPageChanging(object sender, GridViewPageEventArgs e)
 {
     if (DropDownList2.SelectedItem.Text == "Gallery")
     {
         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.PageIndex = e.NewPageIndex;
             GridView1.DataBind();
         }
         else if (DropDownList1.SelectedItem.Text == "LP" && ddlColumn1.SelectedItem.Text != "Select")
         {
             DataSet details = new DataSet();
             GeneralBAL fest = new GeneralBAL();
             details = fest.FetchLPDetailBySearch(ddlColumn1.SelectedValue.ToString());
             GridView1.DataSource = details.Tables[1];
             GridView1.PageIndex = e.NewPageIndex;
             GridView1.DataBind();
         }
         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.PageIndex = e.NewPageIndex;
             GridView1.DataBind();
         }
     }
 }
Esempio n. 39
0
 protected void ddlColumn1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DropDownList1.SelectedItem.Text == "LP" && ddlColumn1.SelectedItem.Text != "Select")
     {
         DataSet details = new DataSet();
         GeneralBAL fest = new GeneralBAL();
         details = fest.FetchLPDetailBySearch(ddlColumn1.SelectedValue.ToString());
         GridView1.DataSource = details.Tables[1];
         GridView1.DataBind();
     }
 }
Esempio n. 40
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. 41
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. 42
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

        }
    }
Esempio n. 43
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        int a = 0;
        string path = Server.MapPath("");
        string OriginalName = FileUpload1.FileName.ToString();
        byte[] Filedata = (byte[])FileUpload1.FileBytes;
        int count = Filedata.Length;

        Stream sr = FileUpload1.PostedFile.InputStream;
        sr.InitializeLifetimeService();
        sr.Read(Filedata, 0, count);

        if (System.IO.Path.GetExtension(OriginalName).ToLower() == ".jpg")
        {
            System.Drawing.Image img;
            img = System.Drawing.Image.FromStream(sr);
            if (FileUpload1.HasFile == true && FileUpload1.PostedFile.ContentLength != 0 && img.Height >= 128 && img.Width >= 128)
            {
                try
                {
                    if (DropDownList1.SelectedItem.Text == "Home")
                    {
                        if (DropDownList2.SelectedItem.Text == "Banner")
                        {
                            GeneralBAL ph = new GeneralBAL();
                            a = ph.InsertBanner("home", txtDescription1.Text);
                            FileStream fs = new FileStream(path + @"\image\home_banner.jpg", FileMode.OpenOrCreate, FileAccess.Write);
                            fs.Write(Filedata, 0, count);
                            fs.Flush();
                            fs.Close();
                        }
                    }
                    else if (DropDownList1.SelectedItem.Text == "Historical Spots")
                    {
                        if (DropDownList2.SelectedItem.Text == "Banner")
                        {
                            GeneralBAL ph = new GeneralBAL();
                            a = ph.InsertBanner("hs", txtDescription1.Text);
                            FileStream fs = new FileStream(path + @"\image\hs_banner.jpg", FileMode.OpenOrCreate, FileAccess.Write);
                            fs.Write(Filedata, 0, count);
                            fs.Flush();
                            fs.Close();
                        }
                    }
                    else if (DropDownList1.SelectedItem.Text == "LP")
                    {
                        if (DropDownList2.SelectedItem.Text == "Banner")
                        {
                            GeneralBAL ph = new GeneralBAL();
                            a = ph.InsertBanner("lp", txtDescription1.Text);
                            FileStream fs = new FileStream(path + @"\image\lp_banner.jpg", FileMode.OpenOrCreate, FileAccess.Write);
                            fs.Write(Filedata, 0, count);
                            fs.Flush();
                            fs.Close();
                        }
                    }
                    else if (DropDownList1.SelectedItem.Text == "Festivals")
                    {
                        if (DropDownList2.SelectedItem.Text == "Banner")
                        {
                            GeneralBAL ph = new GeneralBAL();
                            a = ph.InsertBanner("fs", txtDescription1.Text);
                            FileStream fs = new FileStream(path + @"\image\fs_banner.jpg", FileMode.OpenOrCreate, FileAccess.Write);
                            fs.Write(Filedata, 0, count);
                            fs.Flush();
                            fs.Close();
                        }
                    }

                    if (a != 0)
                        Page.ClientScript.RegisterStartupScript(typeof(Page), "key", "alert('Photo Added.');location='GalleryManager.aspx';", true);
                    else
                        Page.ClientScript.RegisterStartupScript(typeof(Page), "key", "alert('Contact Administrator.');location='GalleryManager.aspx';", true);
                }
                catch
                {
                    Page.ClientScript.RegisterStartupScript(typeof(Page), "key", "alert('Some problem occured while adding the photo. Please contact administrator');location='GalleryManager.aspx';", true);
                }
            }
            else
                Page.ClientScript.RegisterStartupScript(typeof(Page), "key", "alert('Please choose correct size and type photo .');location='GalleryManager.aspx';", true);
        }
        else
            Page.ClientScript.RegisterStartupScript(typeof(Page), "key", "alert('Please choose correct size and type photo .');location='GalleryManager.aspx';", true);
    }
Esempio n. 44
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 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();

        }
    }
Esempio n. 45
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. 46
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();
        }
    }
Esempio n. 47
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. 48
0
 protected void gridPageChanging1(object sender, GridViewPageEventArgs e)
 {
     DataSet details = new DataSet();
     GeneralBAL spot = new GeneralBAL();
     details = spot.FetchDetailBySearch(lblSpotID.Text);
     grdFestival.DataSource = details.Tables[2];
     grdFestival.PageIndex = e.NewPageIndex;
     grdFestival.DataBind();
 }
Esempio n. 49
0
    protected void Gridview_OnRowCommand(object sender, GridViewCommandEventArgs e)
    {
        string _commandName;
        if (e.CommandArgument.ToString() == "Next" || e.CommandArgument.ToString() == "Last" || e.CommandArgument.ToString() == "First" || e.CommandArgument.ToString() == "Prev")
        {
        }
        else
        {
            // Get the selected index and the command name
            int _selectedIndex = int.Parse(e.CommandArgument.ToString());

            _commandName = e.CommandName;
            if (_commandName == "PhotoDelete")
            {
                int a = 0;
                Label lpid = (Label)GridView1.Rows[_selectedIndex].Cells[0].FindControl("grdID");
                Image lblPhtoPath = (Image)GridView1.Rows[_selectedIndex].Cells[0].FindControl("grdImg");

                if (ddlColumn.SelectedItem.Text != "Select" && DropDownList1.SelectedItem.Text == "LP" && ddlColumn1.SelectedItem.Text != "Select")
                {
                    GeneralBAL ph = new GeneralBAL();
                    a = ph.DeleteLPPhoto(lpid.Text);
                }
                else if (DropDownList1.SelectedItem.Text == "Festivals" && ddlColumn.SelectedItem.Text != "Select")
                {
                    GeneralBAL ph = new GeneralBAL();
                    a = ph.DeleteFestivalPhoto(lpid.Text);
                }
                else if (DropDownList1.SelectedItem.Text == "Historical Spots" && ddlColumn.SelectedItem.Text != "Select")
                {
                    GeneralBAL ph = new GeneralBAL();
                    a = ph.DeleteSpotPhoto(lpid.Text);
                }

                if (a != 0)
                {
                    string pt = Server.MapPath("");
                    string st = lblPhtoPath.ImageUrl.ToString().Remove(0, 1).Replace('/', '\\');
                    System.IO.File.Delete(pt + st);
                    Page.ClientScript.RegisterStartupScript(typeof(Page), "key", "alert('Photo Deleted.');location='GalleryManager.aspx';", true);
                }
                else
                    Page.ClientScript.RegisterStartupScript(typeof(Page), "key", "alert('Contact Administrator.');location='GalleryManager.aspx';", true);

            }
        }
    }
Esempio n. 50
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. 51
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)
                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();
        }
    }
Esempio n. 52
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();
        }
    }
Esempio n. 53
0
 public DataSet FetchMap()
 {
     DataSet ds = new DataSet();
     GeneralBAL lp = new GeneralBAL();
     ds = lp.FetchMap();
     return ds;
 }