Пример #1
0
        void LoadChuyenMon()
        {
            DataTable dt = ChuyenMonDAO.GetChuyenMon();

            cmbChuyenMon.DataSource    = dt;
            cmbChuyenMon.DisplayMember = "TenCM";
            cmbChuyenMon.ValueMember   = "MaCM";
        }
Пример #2
0
        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());
        }
Пример #3
0
 public static bool UpdateChuyenMon(ChuyenMonDTO cm)
 {
     return(ChuyenMonDAO.UpdateChuyenMon(cm));
 }
Пример #4
0
 public static bool DeleteChuyenMon(string ma)
 {
     return(ChuyenMonDAO.DeleteChuyenMon(ma));
 }
Пример #5
0
 public static DataTable GetChuyenMon()
 {
     return(ChuyenMonDAO.GetChuyenMon());
 }
Пример #6
0
 public static bool AddChuyenMon(ChuyenMonDTO cm)
 {
     return(ChuyenMonDAO.AddChuyenMon(cm));
 }