コード例 #1
0
        // When profile button is clicked.
        private void BtnProfile_Click(object sender, EventArgs e)
        {
            // Load form.
            ProfileFormX profile = new ProfileFormX();

            this.Close();
        }
コード例 #2
0
        // When cancel button is clicked.
        private void CancelBtn_Click(object sender, EventArgs e)
        {
            // Load page.
            ProfileFormX profile = new ProfileFormX();

            profile.Show();
            this.Close();
        }
コード例 #3
0
        // When the profile button is clicked.
        private void BtnProfile_Click(object sender, EventArgs e)
        {
            // Load form.
            ProfileFormX profile = new ProfileFormX();

            profile.Show();
            this.Close();
            //display loading circle.
            LoadingCircle1.Visible = true;
        }
コード例 #4
0
        // When profile picture is clicked.
        private void PictureBox1_Click(object sender, EventArgs e)
        {
            // Show loading circle.
            loadingCircle.Visible = true;
            // Load form.
            ProfileFormX profile = new ProfileFormX();

            profile.Show();
            this.Close();
        }
コード例 #5
0
        // When save button is clicked.
        private void SaveBtn_Click(object sender, EventArgs e)
        {
            // Using MVC.
            User selectedUser = Program.GetCurrentUser();

            sepdbDataSetTableAdapters.usersTableAdapter usersTable = new sepdbDataSetTableAdapters.usersTableAdapter();
            // Update user details using SQL statement.
            usersTable.UpdateUserDetails(TxtEmail.Text, TxtPhoneNo.Text, Convert.ToInt32(TxtID.Text));
            // Update fields.
            selectedUser.EmailAddress = TxtEmail.Text;
            selectedUser.PhoneNo      = TxtPhoneNo.Text;
            // Check if email is valid.
            if (IsValidEmail(TxtEmail.Text) == false || TxtEmail.Text == null)
            {
                MessageBox.Show("Please enter a valid email address.");
            }
            else
            {
                // Load page.
                ProfileFormX profile = new ProfileFormX();
                profile.Show();
                this.Close();
            }
        }