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(); }
public void deleteDATN(DoAnTotNghiep datn) { datnDAL.deleteDATN(datn); }
public FormEdit(DoAnTotNghiep datn) { InitializeComponent(); }
public void addDATN(DoAnTotNghiep datn) { datnDAL.addDATN(datn); }