Esempio n. 1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            string maDATN     = txtMaDATN.Text;
            string tenDATN    = txtTenDATN.Text;
            string sinhvienTH = txtTenSVTH.Text;
            string huongNC    = comboBoxHuongNC.Text;

            bool tinhtrang;

            if (rbChuaBaoVe.Checked)
            {
                tinhtrang = false;
            }
            else
            {
                tinhtrang = true;
            }
            int nambaove = Int32.Parse(comboBoxNamBaoVe.Text);

            var arr = (gvhdBLL.getListGVHD()).Join(huongNCBLL.getListHuongNC(), p => p.MaHuongNC, q => q.MaHuongNC,
                                                   (p, q) => new
            {
                p.MaHuongNC, p.TenGiangVien, q.TenHuongNC
            });

            string mahuongNC = "";

            foreach (var a in arr)
            {
                if (a.TenGiangVien == comboBoxGVHD.Text && (a.TenHuongNC == huongNC))
                {
                    mahuongNC = a.MaHuongNC;
                }
            }

            DoAnTotNghiep datn = new DoAnTotNghiep
            {
                MaDoAn        = maDATN,
                TenDoAn       = tenDATN,
                TenSinhVienTH = sinhvienTH,
                NamThucHien   = nambaove,
                TinhTrang     = tinhtrang,
                MaHuongNC     = mahuongNC
            };

            datnBLL.addDATN(datn);
            dlgAdd();
            this.Close();
            this.Dispose();
        }
Esempio n. 2
0
 public void deleteDATN(DoAnTotNghiep datn)
 {
     datnDAL.deleteDATN(datn);
 }
Esempio n. 3
0
 public FormEdit(DoAnTotNghiep datn)
 {
     InitializeComponent();
 }
Esempio n. 4
0
 public void addDATN(DoAnTotNghiep datn)
 {
     datnDAL.addDATN(datn);
 }