Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            TourGuide tg = TourGuideDAO.SelectTourGuideById(int.Parse(Session["tourguide_id"].ToString()));

            tourguideidLabel.Text     = tg.TourGuideId.ToString();
            tourguideuseridLabel.Text = tg.UserId.ToString();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         TourGuide tg = TourGuideDAO.SelectTourGuideById(int.Parse(Session["tourguide_id"].ToString()));
         tourguidenameTextBox.Text        = tg.Name;
         tourguidedescriptionTextBox.Text = tg.Description;
         tourguidelanguagesTextBox.Text   = tg.Languages;
         tourguidecredentialsTextBox.Text = tg.Credentials;
         tourguideemailLabel.Text         = tg.Email;
         tourguideidLabel.Text            = tg.TourGuideId.ToString();
         tourguideuseridLabel.Text        = tg.UserId.ToString();
         tourguidepasswordLabel.Text      = tg.Password.ToString();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["tourguide_id"] != null || Session["tourist_id"] != null)
     {
         string name = "";
         try
         {
             name = TouristDAO.SelectTouristById(int.Parse(Session["tourist_id"].ToString())).Name;
         }
         catch
         {
             name = TourGuideDAO.SelectTourGuideById(int.Parse(Session["tourguide_id"].ToString())).Name;
         }
         finally
         {
             LblName.Text = name;
         }
     }
     else
     {
         Response.Redirect("Login.aspx");
     }
 }