Beispiel #1
0
        private void lnkUpdatePhoto_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            admin.pbxUserProfile.Image.Dispose();
            pbxProfilePicture.Image.Dispose();


            DataEditor edit = new DataEditor();

            edit.ProfileImage(pbxProfilePicture, lblUserID.Text);
            MessageBox.Show("Profile photo changed.\nMust restart the application to see changes.", "Image updated", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Beispiel #2
0
        public void UpdateInformation()
        {
            DataEditor edit = new DataEditor
            {
                UserID     = lblUserID.Text, FirstName = txtFirstName.Text,
                MiddleName = txtMiddleName.Text, Lastname = txtLastName.Text,
                Email      = txtEmail.Text, Password = txtPassword.Text,
                Username   = txtUsername.Text
            };

            edit.UserData();
        }
Beispiel #3
0
        private void btnDeactivate_Click_1(object sender, EventArgs e)
        {
            DialogResult deactivating = MessageBox.Show("Are you sure you want to deactivate your account?\n-We will logout your account and you will not be able to login using your current account", "Deactivate Account", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (deactivating == DialogResult.Yes)
            {
                DataEditor edit = new DataEditor();
                edit.UserStatus(lblAccountID.Text);
                System.Threading.Thread.Sleep(300);
                MessageBox.Show("Your account is now deactivated. We will logout your account now.", "Account deactivated", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

                System.Threading.Thread.Sleep(700);

                ((Form)this.TopLevelControl).Close();
                Login login = new Login();
                login.Show();
            }
        }