예제 #1
0
        private void btnThem_Click(object sender, EventArgs e)
        {
            TheLoai theLoai = new TheLoai();

            theLoai.MaTLoai  = txtMa.Text;
            theLoai.TenTLoai = txtTen.Text;
            theLoai.GhiChu   = txtGhiChu.Text;
            TheLoaiBUS theLoaiBUS = new TheLoaiBUS();

            if (theLoaiBUS.themTheLoai(theLoai))
            {
                MessageBox.Show("Thêm OK !");
                loadData();
            }
            else
            {
                MessageBox.Show("Thêm lỗi !");
                return;
            }
        }