private void GridBind()
 {
     try
     {
         location       = new Location();
         location.OFlag = 4;
         DataTable dt = plocation.GetLocationdescription(location);
         ViewState["Dt"] = dt;
         if (dt.Rows.Count > 0)
         {
             grdrecord.DataSource = dt;
             grdrecord.DataBind();
             pnlrecord.Visible = true;
         }
         else
         {
             lbl_msg.Text         = "No Record found";
             lbl_msg.Visible      = true;
             grdrecord.DataSource = null;
             grdrecord.DataBind();
         }
     }
     catch (Exception ex)
     {
         lbl_msg.Visible  = true;
         lbl_msg.Text     = ex.ToString();
         lbl_msg.CssClass = "general";
     }
 }
        public void funcHotelImage(Int32 LocId)
        {
            try
            {
                location            = new Location();
                location.LocationID = LocId;
                location.OFlag      = 5;
                DataTable dt = plocation.GetLocationdescription(location);
                if (dt.Rows.Count >= 3)
                {
                    imgHotel1.ImageUrl = Convert.ToString(dt.Rows[0]["ImageUrl"]);
                    imgHotel2.ImageUrl = Convert.ToString(dt.Rows[1]["ImageUrl"]);
                    imgHotel3.ImageUrl = Convert.ToString(dt.Rows[2]["ImageUrl"]);


                    lblHotel1Name.Text    = Convert.ToString(dt.Rows[0]["HotelName"]);
                    lblHotel1Address.Text = Convert.ToString(dt.Rows[0]["HotelAddress"]);
                    lblHotel1City.Text    = Convert.ToString(dt.Rows[0]["Location_Name"]);
                    lblHotel1Phone.Text   = Convert.ToString(dt.Rows[0]["HotelMobileNo"]);

                    lblHotel2Name.Text    = Convert.ToString(dt.Rows[1]["HotelName"]);
                    lblHotel2Address.Text = Convert.ToString(dt.Rows[1]["HotelAddress"]);
                    lblHotel2City.Text    = Convert.ToString(dt.Rows[1]["Location_Name"]);
                    lblHotel2Phone.Text   = Convert.ToString(dt.Rows[1]["HotelMobileNo"]);

                    lblHotel3Name.Text    = Convert.ToString(dt.Rows[2]["HotelName"]);
                    lblHotel3Address.Text = Convert.ToString(dt.Rows[2]["HotelAddress"]);
                    lblHotel3City.Text    = Convert.ToString(dt.Rows[2]["Location_Name"]);
                    lblHotel3Phone.Text   = Convert.ToString(dt.Rows[2]["HotelMobileNo"]);
                }
                else if (dt.Rows.Count >= 2)
                {
                    imgHotel1.ImageUrl = Convert.ToString(dt.Rows[0]["ImageUrl"]);
                    imgHotel2.ImageUrl = Convert.ToString(dt.Rows[1]["ImageUrl"]);

                    lblHotel1Name.Text    = Convert.ToString(dt.Rows[0]["HotelName"]);
                    lblHotel1Address.Text = Convert.ToString(dt.Rows[0]["HotelAddress"]);
                    lblHotel1City.Text    = Convert.ToString(dt.Rows[0]["Location_Name"]);
                    lblHotel1Phone.Text   = Convert.ToString(dt.Rows[0]["HotelMobileNo"]);

                    lblHotel2Name.Text    = Convert.ToString(dt.Rows[1]["HotelName"]);
                    lblHotel2Address.Text = Convert.ToString(dt.Rows[1]["HotelAddress"]);
                    lblHotel2City.Text    = Convert.ToString(dt.Rows[1]["Location_Name"]);
                    lblHotel2Phone.Text   = Convert.ToString(dt.Rows[1]["HotelMobileNo"]);
                }
                else if (dt.Rows.Count >= 1)
                {
                    imgHotel1.ImageUrl = Convert.ToString(dt.Rows[0]["ImageUrl"]);

                    lblHotel1Name.Text    = Convert.ToString(dt.Rows[0]["HotelName"]);
                    lblHotel1Address.Text = Convert.ToString(dt.Rows[0]["HotelAddress"]);
                    lblHotel1City.Text    = Convert.ToString(dt.Rows[0]["Location_Name"]);
                    lblHotel1Phone.Text   = Convert.ToString(dt.Rows[0]["HotelMobileNo"]);
                }
                else
                {
                    //    imgHotel1.ImageUrl = Convert.ToString(dt.Rows[0]["ImageUrl"]);
                    //    imgHotel2.ImageUrl = Convert.ToString(dt.Rows[1]["ImageUrl"]);
                    //    imgHotel3.ImageUrl = Convert.ToString(dt.Rows[2]["ImageUrl"]);


                    lblHotel1Name.Text    = "";
                    lblHotel1Address.Text = "";
                    lblHotel1City.Text    = "";
                    lblHotel1Phone.Text   = "";

                    lblHotel2Name.Text    = "";
                    lblHotel2Address.Text = "";
                    lblHotel2City.Text    = "";
                    lblHotel2Phone.Text   = "";

                    lblHotel3Name.Text    = "";
                    lblHotel3Address.Text = "";
                    lblHotel3City.Text    = "";
                    lblHotel3Phone.Text   = "";
                }
            }
            catch (Exception ex)
            {
            }
        }