Esempio n. 1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            SinhVienBUL   cls = new SinhVienBUL();
            HocSinhPublic x   = new HocSinhPublic();

            x.MaSV  = txtMaSV.Text;
            x.TenSV = txtTenSV.Text;
            x.MaLop = txtMaLop.Text;
            cls.ThemSV(x);
            Form1_Load(sender, e);
        }
Esempio n. 2
0
        public int ThemSV(HocSinhPublic x)
        {
            int n = 3;

            string[] name  = new string[n];
            object[] value = new object[n];
            name[0]  = "@MaSV";
            name[1]  = "@TenSV";
            name[2]  = "@MaLop";
            value[0] = x.MaSV;
            value[1] = x.TenSV;
            value[2] = x.MaLop;
            return(cn.Update("insert into SinhVien values(@MaSV,@TenSV,@MaLop)", name, value, n));
        }
Esempio n. 3
0
 public int ThemSV(HocSinhPublic x)
 {
     return(cls.ThemSV(x));
 }