private void btnThem_NhanVien_Click(object sender, EventArgs e) { if (txtMaNV.Text != "" && txtTenNV.Text != "" && txtGioiTinh.Text != "" && txtDiaChi.Text != "" && txtSDTNV.Text != "") { NhanVien nhanvien; nhanvien = new NhanVien(txtMaNV.Text, txtTenNV.Text, txtGioiTinh.Text, Convert.ToDateTime(dTG_NgaySinh.Value.ToString("MM/dd/yyyy")), txtDiaChi.Text, txtSDTNV.Text); if (nv.themNhanVien(nhanvien)) { dGV_NhanVien.DataSource = nv.LoadNhanVien(); MessageBox.Show("Thêm mới thành công!"); } else { MessageBox.Show("Thêm mới không thành công!"); } ClearTextBox(); } else { MessageBox.Show("Nhập thông tin trước khi thêm mới!"); } }