Example #1
0
        private void btnRRequest_Click(object sender, EventArgs e)
        {
            if (txtFirst.Text == "" || txtLast.Text == "" || txtNumber.Text == "" || cmbBxGender.Text == "")
            {
                MessageBox.Show("Please enter your details", "STOKVEL MANAGEMENT SYSTEM", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else
            {
                try
                {
                    myDb.Open();
                    OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM MembershipRequest", myDb);

                    OleDbCommand sql = new OleDbCommand(@"insert into MembershipRequest([First Name],[Last Name],[Phone],[Gender]) values('" + txtFirst.Text + "','" + txtLast.Text + "','" + txtNumber.Text + "','" + cmbBxGender.SelectedItem + "')", myDb);
                    adapter.InsertCommand = sql;

                    sql.ExecuteNonQuery();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                finally
                {
                    myDb.Close();
                }
                MessageBox.Show("Thank you for your intereset ! \nThe admin will contact your soon");
                frmUsers myUser = new frmUsers();
                this.Hide();
                myUser.FormClosed += (s, args) => this.Close();
                myUser.Show();
                myUser.Focus();
            }
        }
Example #2
0
        private void logoutToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmUsers myUser = new frmUsers();

            this.Hide();

            myUser.Show();
            myUser.Focus();
        }
        private void btnBack_Click(object sender, EventArgs e)
        {
            frmUsers myUser = new frmUsers();

            this.Hide();

            myUser.Show();
            myUser.Focus();
        }
Example #4
0
        private void back_Click(object sender, EventArgs e)
        {
            frmUsers myUser = new frmUsers();

            this.Hide();
            myUser.FormClosed += (s, args) => this.Close();
            myUser.Show();
            myUser.Focus();
        }