private void Tai_Thong_Tin_Tinh_Trang() { TinhTrangNhanVienBUS tinhTrangNhanVienBUS = new TinhTrangNhanVienBUS(); DataTable dsTTNV = tinhTrangNhanVienBUS.LayDanhSachTinhTrangNhanVien(); dgvTinhTrang.DataSource = dsTTNV; }
void Tai_Thong_Tin() { NhanVienBUS nhanVienBUS = new NhanVienBUS(); dsNhanVien = nhanVienBUS.LayDanhSachNhanVien(); if (LanDauDoDuLieu == 0) { TinhTrangNhanVienBUS tinhTrangNhanVienBUS = new TinhTrangNhanVienBUS(); DataTable dsTTNV = tinhTrangNhanVienBUS.LayDanhSachTinhTrangNhanVien(); DataGridViewComboBoxColumn dgvComboTinhTrangNhanVien = new DataGridViewComboBoxColumn(); dgvComboTinhTrangNhanVien.DataSource = dsTTNV; dgvComboTinhTrangNhanVien.DisplayMember = dsTTNV.Columns[1].ColumnName; dgvComboTinhTrangNhanVien.ValueMember = dsTTNV.Columns[0].ColumnName; dgvComboTinhTrangNhanVien.DataPropertyName = "MaTTNV"; dgvComboTinhTrangNhanVien.HeaderText = "Tình Trạng"; dgvComboTinhTrangNhanVien.Width = 50; dgvDanhSachNhanVien.Columns.Add(dgvComboTinhTrangNhanVien); BangCapBUS bangCapBUS = new BangCapBUS(); DataTable dsBangCap = bangCapBUS.LayDanhSachBangCap(); DataGridViewComboBoxColumn dgvComboBangCap = new DataGridViewComboBoxColumn(); dgvComboBangCap.DataSource = dsBangCap; dgvComboBangCap.DisplayMember = dsBangCap.Columns[1].ColumnName; dgvComboBangCap.ValueMember = dsBangCap.Columns[0].ColumnName; dgvComboBangCap.DataPropertyName = "MaBangCap"; dgvComboBangCap.HeaderText = "Bằng cấp"; dgvComboBangCap.Width = 50; dgvDanhSachNhanVien.Columns.Add(dgvComboBangCap); BoPhanBUS boPhanBUS = new BoPhanBUS(); DataTable dsBoPhan = boPhanBUS.LayDanhSachBoPhan(); DataGridViewComboBoxColumn dgvComboBoPhan = new DataGridViewComboBoxColumn(); dgvComboBoPhan.DataSource = dsBoPhan; dgvComboBoPhan.DisplayMember = dsBoPhan.Columns[1].ColumnName; dgvComboBoPhan.ValueMember = dsBoPhan.Columns[0].ColumnName; dgvComboBoPhan.DataPropertyName = "MaBoPhan"; dgvComboBoPhan.HeaderText = "Bộ phận"; dgvComboBoPhan.Width = 50; dgvDanhSachNhanVien.Columns.Add(dgvComboBoPhan); ChucVuBUS chucVuBUS = new ChucVuBUS(); DataTable dsChucVu = chucVuBUS.LayDanhSachChucVu(); DataGridViewComboBoxColumn dgvComboChucVu = new DataGridViewComboBoxColumn(); dgvComboChucVu.DataSource = dsChucVu; dgvComboChucVu.DisplayMember = dsChucVu.Columns[1].ColumnName; dgvComboChucVu.ValueMember = dsChucVu.Columns[0].ColumnName; dgvComboChucVu.DataPropertyName = "MaChucVu"; dgvComboChucVu.HeaderText = "Chức vụ"; dgvComboChucVu.Width = 50; dgvDanhSachNhanVien.Columns.Add(dgvComboChucVu); LanDauDoDuLieu++; } dgvDanhSachNhanVien.DataSource = dsNhanVien; }