Beispiel #1
0
        private void Apply_Click(object sender, EventArgs e)
        {
            firstName    = FirstName.Text;
            lastName     = LastName.Text;
            email        = Email.Text;
            userRole     = UserRole.Text.ToLower();
            active       = Active.Text.ToLower();
            street       = Street.Text;
            streetNumber = StreetNumber.Text;
            postalCode   = PostalCode.Text;
            city         = City.Text;
            country      = Country.Text;
            telephone    = Telephone.Text;

            string details = userID + ";" + firstName + ";" + lastName + ";" + email + ";" + userRole + ";" + active + ";" + street + ";"
                             + streetNumber + ";" + postalCode + ";" + city + ";" + country + ";" + telephone;

            if (connect.updateUserData(details))
            {
                DatabaseInfo.Text    = "User data was updated";
                DatabaseInfo.Visible = true;
            }
            else
            {
                DatabaseInfo.Text    = "Cannot connect to the database!";
                DatabaseInfo.Visible = true;
            }
        }