private bool check_client()
{
if(m_sle_chon_nhan_vien.EditValue == null)
{
string v_str_error = "Bạn chưa chọn nhân viên!";
XtraMessageBox.Show(v_str_error, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if(m_sle_loai_hop_dong.EditValue == null)
{
string v_str_error = "Bạn chưa chọn loại hợp đồng!";
XtraMessageBox.Show(v_str_error, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
//if(m_txt_ma_hd.Text.Trim() == "")
//{
// string v_str_error = "Bạn chưa nhập mã hợp đồng!";
// XtraMessageBox.Show(v_str_error, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
// return false;
//}
if(m_sle_loai_lao_dong.EditValue == null)
{
string v_str_error = "Bạn chưa chọn loại lao động!";
XtraMessageBox.Show(v_str_error, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if(m_dat_ngay_bat_dau.EditValue == null)
{
string v_str_error = "Bạn chưa nhập ngày bắt đầu!";
XtraMessageBox.Show(v_str_error, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if(m_sle_don_vi.EditValue == null)
{
string v_str_error = "Bạn chưa chọn đơn vị!";
XtraMessageBox.Show(v_str_error, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
if(m_sle_chuc_vu.EditValue == null)
{
string v_str_error = "Bạn chưa chọn chức vụ!";
XtraMessageBox.Show(v_str_error, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
//if(m_txt_so_tien_lcd.EditValue == null)
//{
// string v_str_error = "Bạn chưa nhập số tiền LCĐ!";
// XtraMessageBox.Show(v_str_error, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
// return false;
//}
if(m_dat_ngay_ket_thuc.DateTime.Date != DateTime.MinValue.Date && m_dat_ngay_bat_dau.DateTime.Date >= m_dat_ngay_ket_thuc.DateTime.Date)
{
string v_str_error = "Ngày bắt đầu phải nhỏ hơn ngày kết thúc";
XtraMessageBox.Show(v_str_error, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
return false;
}
return true;
}