private void btThemNhanVien_Click(object sender, EventArgs e) { if ((cbNhanVien.SelectedIndex < 0)) { return; } CTDoan ctDoan = new CTDoan() { MaDoan = curDoanDL.Id, MaNguoiThamGia = nv[cbNhanVien.SelectedIndex].Id, ChucVuTrongDoan = txVitriNhanVien.Text }; ctDoan.Save(); curDoanDL.GetCTDoanByDoan(); listNhanVien.Add(nv[cbNhanVien.SelectedIndex]); nv.RemoveAt(cbNhanVien.SelectedIndex); DataCombobox(); loadNhanVien_Doan(); }
private void button1_Click(object sender, EventArgs e) { if ((cbKhach.SelectedIndex < 0)) { return; } CTDoan ctDoan = new CTDoan() { MaDoan = curDoanDL.Id, MaNguoiThamGia = khachs[cbKhach.SelectedIndex].Id, ChucVuTrongDoan = "Khách" }; ctDoan.Save(); listKhach.Add(khachs[cbKhach.SelectedIndex]); //Console.WriteLine(listKhach.Count); khachs.RemoveAt(cbKhach.SelectedIndex); DataCombobox(); dgvKhach.DataSource = null; loadKhach_Doan(); }