public void ThemLoaiNhanVien()
        {
            Form_ThemLoaiNhanVien openForm = new Form_ThemLoaiNhanVien();

            openForm.Mode = mode;
            if (openForm.ShowDialog() == DialogResult.OK)
            {
                if (LoaiNhanVien_BUS.KiemTraMaLoai(openForm.loaiNV.MaLoaiNV) == 1 || LoaiNhanVien_BUS.KiemTraTenLoai(openForm.loaiNV.TenLoaiNV) == 1)
                {
                }
                else
                {
                    LoaiNhanVien_BUS.ThemLoaiNV(openForm.loaiNV);
                    gridLoaiNV.DataSource = LoaiNhanVien_BUS.DocLoaiNV();
                }
            }
        }
 private void btnThemLoai_Click(object sender, EventArgs e)
 {
     loaiNV.MaLoaiNV  = txtMaLoai.Text;
     loaiNV.TenLoaiNV = txtTenLoaiNV.Text;
     loaiNV.Luong     = long.Parse(txtLuong.Text);
     if (LoaiNhanVien_BUS.KiemTraMaLoai(txtMaLoai.Text) == 1)
     {
         DevExpress.XtraEditors.XtraMessageBox.Show("Mã Loại Nhân viên đã tồn tại!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else if (LoaiNhanVien_BUS.KiemTraTenLoai(txtTenLoaiNV.Text) == 1)
     {
         DevExpress.XtraEditors.XtraMessageBox.Show("Tên Mã Loại Nhân viên đã tồn tại!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         this.Close();
     }
 }