Exemplo n.º 1
0
        private void reg_send_Click(object sender, EventArgs e)
        {
            DBA db = DBA.Instance;

            db.connect();

            if (reg_id.Text != "" && reg_fname.Text != "" && reg_lname.Text != "" && reg_email.Text != "" && reg_password.Text != "")
            {
                if (GlobalItems.checkIdNumber(reg_id.Text))
                {
                    db.query("INSERT INTO users (fname, lname, email, password, idNUmber, type) VALUES ('" + reg_fname.Text + "', '" + reg_lname.Text + "', '" + reg_email.Text + "', '" + reg_password.Text + "', '" + reg_id.Text + "', 6)");

                    MessageBox.Show("Data is Saved, Please type your id number and password to login into system");

                    GlobalItems.slideLeftSize(this, 350);
                }
                else
                {
                    MessageBox.Show("User with this id number is already exist in system, please type another id");
                }
            }
            else
            {
                MessageBox.Show("All fields have to be filled");
            }
        }
Exemplo n.º 2
0
 private void reg_cancel_Click(object sender, EventArgs e)
 {
     GlobalItems.slideLeftSize(this, 350);
     reg_fname.Text    = "";
     reg_lname.Text    = "";
     reg_email.Text    = "";
     reg_password.Text = "";
     reg_id.Text       = "";
 }
Exemplo n.º 3
0
 private void button2_Click(object sender, EventArgs e)
 {
     textBox1.Text = "";
     textBox2.Text = "";
     GlobalItems.slideLeftSize(this, 350);
 }