protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["tourist_id"] == null)
                {
                    Response.Redirect("TourGuideDetails.aspx");
                }
                else
                {
                    Tours smth = ToursDAO.SelectTourByTourGuideId(int.Parse(Session["SSTourGuideId"].ToString()));
                    tourguidetitleLabel.Text  = smth.Title;
                    tourdescriptionLabel.Text = smth.Description;
                    tourdetailsLabel.Text     = smth.Details;
                    tourpriceLabel.Text       = smth.Price.ToString();

                    gettouristid.Text     = Session["tourist_id"].ToString();
                    gettourguidename.Text = Session["SSName"].ToString();
                    gettourguideid.Text   = Session["SSTourGuideId"].ToString();
                }
            }
        }
Exemple #2
0
 protected void BtnSubmit1_Click(object sender, EventArgs e)
 {
     ToursDAO.InsertTour(int.Parse(tourguideuseridLabel.Text), int.Parse(tourguideidLabel.Text), tourstitleTextBox.Text, tourdescriptionTextBox.Text, tourdetailsTextBox.Text, tourpriceTextBox.Text);
 }