public EditUserProfile()
        {
            InitializeComponent();

            try
            {
                MySqlConnection connection = new MySqlConnection(static_connectionString);
                connection.Open();
                MySqlCommand command = new MySqlCommand("select username,firstname,lastname,email from users where userid=@id", connection);
                string       id      = Login_page.GetUserID();
                command.Parameters.AddWithValue("id", id);
                using (MySqlDataReader reader = command.ExecuteReader())
                {
                    if (reader.Read())
                    {
                        username_textbox.Text  = reader["username"].ToString();
                        firstname_textbox.Text = reader["firstname"].ToString();
                        lastname_textbox.Text  = reader["lastname"].ToString();
                        email_textbox.Text     = reader["email"].ToString();
                    }
                    else
                    {
                        username_textbox.Text = "You must Login to Continue to this page";
                    }
                }
                connection.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
 public UserProfile()
 {
     InitializeComponent();
     ShowsNavigationUI = false;
     try
     {
         MySqlConnection connection = new MySqlConnection(static_connectionString);
         connection.Open();
         MySqlCommand command = new MySqlCommand("select username,firstname,lastname,birthday,email from users where userid=@id", connection);
         string       id      = Login_page.GetUserID();
         command.Parameters.AddWithValue("id", id);
         using (MySqlDataReader reader = command.ExecuteReader())
         {
             if (reader.Read())
             {
                 Username_label.Content  = reader["username"].ToString();
                 Firstname_label.Content = reader["firstname"].ToString();
                 Lastname_label.Content  = reader["lastname"].ToString();
                 Birthday_label.Content  = reader["birthday"].ToString();
                 Email_label.Content     = reader["email"].ToString();
             }
             else
             {
                 Username_label.Content = "You must Login to Continue to this page";
             }
         }
         connection.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }