protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Session["AttractionId"] != null)
                {
                    string attractId = Session["AttractionId"].ToString();

                    // Retrieve TDMaster records by Id
                    Attraction td = new Attraction();
                    td = td.GetAttractionDataById(attractId);

                    LbImage.Text              = td.Image;
                    Image1.ImageUrl           = td.Image;
                    TbName.Text               = td.Name;
                    TbDesc.Text               = td.Description;
                    TbPrice.Text              = td.Price;
                    TbLocation.Text           = td.Location;
                    TbDate.Text               = td.DateTime;
                    TbLat.Text                = td.Latitude.ToString();
                    TbLong.Text               = td.Longitude.ToString();
                    DdlInterest.SelectedValue = td.Interest;
                    DdlType.SelectedValue     = td.Type;
                    DdlTran.SelectedValue     = td.Transaction;
                }
                else
                {
                    Response.Redirect("AdminPageAddAttraction.aspx");
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["AttractionId"] != null)
            {
                string attractId = Session["AttractionId"].ToString();

                // Retrieve TDMaster records by Id
                Attraction td = new Attraction();
                td = td.GetAttractionDataById(attractId);

                lbName.Text  = td.Name;
                lbDesc.Text  = td.Description;
                lbPlace.Text = td.Location;
                LbImg.Text   = td.Image;
            }
            else
            {
                Response.Redirect("Guidebook.aspx");
            }
            if (Session["tourist_id"] == null && Session["tourguide_id"] == null)
            {
                BtnConfirm.Text             = "Login to reserve";
                BtnConfirm.CausesValidation = false;
            }
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var        attractionId = Session["AttractionId"].ToString();
            Attraction newTix       = new Attraction();

            newTix            = newTix.GetAttractionDataById(attractionId);
            lbTicketName.Text = newTix.Name;
            lbTicketDesc.Text = newTix.Description;
            lblPrice.Text     = newTix.Price.ToString();
        }