Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            String F       = textBox1.Text;
            String L       = textBox2.Text;
            String A       = textBox4.Text;
            String ph      = txtphone.Text;
            String bi      = dtDateBirth.Value.Date.ToString("yyyy-MM-dd");
            int    term    = Convert.ToInt32(CBXTerm.SelectedValue);
            String acc     = txtacc.Text;
            String pass    = txtpass.Text;
            int    ClassID = Convert.ToInt32(CBXClass.SelectedValue);
            int    count   = DAO.AddStudent(F, L, bi, A, ph, term, acc, pass, ClassID);

            if (count > 0)
            {
                MessageBox.Show("ADD SO Successfully!!");
            }
            else
            {
                MessageBox.Show("ADD Very Fail!!");
            }
            LoadStudent(ClassID);
        }