Exemplo n.º 1
0
        private void enrollment_Click(object sender, EventArgs e)
        {
            enrolls Enroller = new enrolls();

            Enroller.OnTemplate += this.OnTemplate;
            Enroller.Show();
            this.Hide();
        }
Exemplo n.º 2
0
        private void enroll_Click(object sender, EventArgs e)
        {
            MySqlCommand comm = new MySqlCommand("SELECT * FROM referral;", con);

            con.Open();
            MySqlDataReader reader = comm.ExecuteReader();

            while (reader.Read())
            {
                refid = Convert.ToInt32(reader["refid"]);
            }
            con.Close();
            MySqlCommand cmd = new MySqlCommand("UPDATE referral SET refername = '" + name.Text + "', regisid = " + enrollment.regid + ", employment = '" + status.Text + "', relation = '" + relation.Text + "', status = 'Not Parked' WHERE refid = " + refid + ";", con);

            con.Open(); cmd.ExecuteNonQuery();
            con.Close();
            Stop();
            enrolls Enroller = new enrolls();

            Close();
            Enroller.Show();
        }