void LoadChuyenMon() { DataTable dt = ChuyenMonDAO.GetChuyenMon(); cmbChuyenMon.DataSource = dt; cmbChuyenMon.DisplayMember = "TenCM"; cmbChuyenMon.ValueMember = "MaCM"; }
private void dgvNhanVien_Click(object sender, EventArgs e) { btnXoa.Enabled = true; btnSua.Enabled = true; DataGridViewRow dr = dgvNhanVien.SelectedRows[0]; txtMa.Text = dr.Cells[0].Value.ToString(); txtHoTen.Text = dr.Cells[1].Value.ToString(); dtpNgaySinh.Text = dr.Cells[2].Value.ToString(); txtDiaChi.Text = dr.Cells[3].Value.ToString(); if (dr.Cells[4].Value.ToString().ToLower() == "nam") { cmbGioiTinh.SelectedIndex = 0; } else { cmbGioiTinh.SelectedIndex = 1; } // sẽ lấy ra tên phòng ban theo mã cmbPhongBan.Text = PhongBan_BUS.GetTenPhongBanByMaPB(dr.Cells[5].Value.ToString()); cmbBacLuong.Text = dr.Cells[8].Value.ToString(); cmbChucVu.Text = ChucVuDAO.GetTenChucVuByMa(dr.Cells[6].Value.ToString()); cmbChuyenMon.Text = ChuyenMonDAO.GetTenChuyenMonByMa(dr.Cells[7].Value.ToString()); }
public static bool UpdateChuyenMon(ChuyenMonDTO cm) { return(ChuyenMonDAO.UpdateChuyenMon(cm)); }
public static bool DeleteChuyenMon(string ma) { return(ChuyenMonDAO.DeleteChuyenMon(ma)); }
public static DataTable GetChuyenMon() { return(ChuyenMonDAO.GetChuyenMon()); }
public static bool AddChuyenMon(ChuyenMonDTO cm) { return(ChuyenMonDAO.AddChuyenMon(cm)); }