Example #1
0
        void next()
        {
            signin ss = new signin();

            ss.Show();
            this.Hide();
        }
Example #2
0
        private void button4_Click(object sender, EventArgs e)
        {
            signin ss = new signin();

            ss.Show();
            this.Hide();
        }
Example #3
0
        private void logout_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            signin ss = new signin();

            ss.Show();
            this.Hide();
        }
Example #4
0
        private void del_acc_Click(object sender, EventArgs e)
        {
            string oradb = "Data Source=localhost;User Id=DBMS;Password=DBMS;";

            if (MessageBox.Show("DO YOU REALLY WANT TO DELETE THE ACCOUNT????", "CONFIRM", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                string cmdText = "DELETE from sign_up WHERE sid  = :ID";
                using (OracleConnection conn = new OracleConnection(oradb))
                    using (OracleCommand cmd = new OracleCommand(cmdText, conn))
                    {
                        conn.Open();
                        cmd.Parameters.Add("ID", passclass.id);
                        cmd.ExecuteNonQuery();
                    }
                MessageBox.Show("DELETED ACCOUNT");
                signin ss = new signin();
                ss.Show();
                this.Hide();
            }
        }
Example #5
0
        private void go_to_signin_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            signin newForm = new signin();

            newForm.Show(); this.Hide();
        }
Example #6
0
 private void update_button_Click(object sender, EventArgs e)
 {
     if (passclass.Test == 1)
     {
         string oradb = "Data Source=localhost;User Id=DBMS;Password=DBMS;";
         if (pass_change.Checked && phone_change.Checked)
         {
             if (change_pass.Text == "" || confirm_pass.Text == "" || change_phone.Text == "")
             {
                 MessageBox.Show("Enter all the fields");
             }
             else
             {
                 if (change_pass.Text == confirm_pass.Text)
                 {
                     using (OracleConnection con = new OracleConnection(oradb))
                     {
                         con.Open();
                         OracleCommand cmd = con.CreateCommand();
                         cmd.CommandType = CommandType.Text;
                         cmd.CommandText = "update t_signup set password = :param1, phone_no = :param2 where tid = :keyValue";
                         cmd.Parameters.Add("param1", change_pass.Text);
                         cmd.Parameters.Add("param2", change_phone.Text);
                         cmd.Parameters.Add("keyValue", passclass.id);
                         cmd.ExecuteNonQuery();
                         MessageBox.Show("Update successfull");
                     }
                     signin ss = new signin();
                     ss.Show();
                     this.Hide();
                 }
                 else if (change_pass.Text != confirm_pass.Text)
                 {
                     MessageBox.Show("passwords do not match");
                 }
             }
         }
         else if (pass_change.Checked && (phone_change.Checked == false))
         {
             if (change_pass.Text != confirm_pass.Text)
             {
                 MessageBox.Show("passwords do no match");
             }
             else
             {
                 using (OracleConnection con = new OracleConnection(oradb))
                 {
                     con.Open();
                     OracleCommand cmd = con.CreateCommand();
                     cmd.CommandType = CommandType.Text;
                     cmd.CommandText = "update t_signup set password = :param1 where tid = :keyValue";
                     cmd.Parameters.Add("param1", change_pass.Text);
                     cmd.Parameters.Add("keyValue", passclass.id);
                     cmd.ExecuteNonQuery();
                     MessageBox.Show("Update successfull");
                 }
                 signin ss = new signin();
                 ss.Show();
                 this.Hide();
             }
         }
         else if (phone_change.Checked && (pass_change.Checked == false))
         {
             using (OracleConnection con = new OracleConnection(oradb))
             {
                 con.Open();
                 OracleCommand cmd = con.CreateCommand();
                 cmd.CommandType = CommandType.Text;
                 cmd.CommandText = "update t_signup set phone_no = :param2 where tid = :keyValue";
                 cmd.Parameters.Add("param2", change_phone.Text);
                 cmd.Parameters.Add("keyValue", passclass.id);
                 cmd.ExecuteNonQuery();
                 MessageBox.Show("Update successfull");
             }
             signin ss = new signin();
             ss.Show();
             this.Hide();
         }
     }
     else
     {
         string oradb = "Data Source=localhost;User Id=DBMS;Password=DBMS;";
         if (pass_change.Checked && phone_change.Checked)
         {
             if (change_pass.Text == "" || confirm_pass.Text == "" || change_phone.Text == "")
             {
                 MessageBox.Show("Enter all the fields");
             }
             else
             {
                 if (change_pass.Text == confirm_pass.Text)
                 {
                     using (OracleConnection con = new OracleConnection(oradb))
                     {
                         con.Open();
                         OracleCommand cmd = con.CreateCommand();
                         cmd.CommandType = CommandType.Text;
                         cmd.CommandText = "update sign_up set password = :param1, phone_no = :param2 where sid = :keyValue";
                         cmd.Parameters.Add("param1", change_pass.Text);
                         cmd.Parameters.Add("param2", change_phone.Text);
                         cmd.Parameters.Add("keyValue", passclass.id);
                         cmd.ExecuteNonQuery();
                         MessageBox.Show("Update successfull");
                     }
                     signin ss = new signin();
                     ss.Show();
                     this.Hide();
                 }
                 else if (change_pass.Text != confirm_pass.Text)
                 {
                     MessageBox.Show("passwords do not match");
                 }
             }
         }
         else if (pass_change.Checked && (phone_change.Checked == false))
         {
             if (change_pass.Text != confirm_pass.Text)
             {
                 MessageBox.Show("passwords do no match");
             }
             else
             {
                 using (OracleConnection con = new OracleConnection(oradb))
                 {
                     con.Open();
                     OracleCommand cmd = con.CreateCommand();
                     cmd.CommandType = CommandType.Text;
                     cmd.CommandText = "update sign_up set password = :param1 where sid = :keyValue";
                     cmd.Parameters.Add("param1", change_pass.Text);
                     cmd.Parameters.Add("keyValue", passclass.id);
                     cmd.ExecuteNonQuery();
                     MessageBox.Show("Update successfull");
                 }
                 signin ss = new signin();
                 ss.Show();
                 this.Hide();
             }
         }
         else if (phone_change.Checked && (pass_change.Checked == false))
         {
             using (OracleConnection con = new OracleConnection(oradb))
             {
                 con.Open();
                 OracleCommand cmd = con.CreateCommand();
                 cmd.CommandType = CommandType.Text;
                 cmd.CommandText = "update sign_up set phone_no = :param2 where sid = :keyValue";
                 cmd.Parameters.Add("param2", change_phone.Text);
                 cmd.Parameters.Add("keyValue", passclass.id);
                 cmd.ExecuteNonQuery();
                 MessageBox.Show("Update successfull");
             }
             signin ss = new signin();
             ss.Show();
             this.Hide();
         }
     }
 }