BKI_DichVuMatDat.NghiepVu.f364_quan_ly_cac_nhan_vien_co_luong_cung_de.kiem_tra_thoi_gian_hop_le_voi_lns_Insert C# (CSharp) Method

kiem_tra_thoi_gian_hop_le_voi_lns_Insert() private method

private kiem_tra_thoi_gian_hop_le_voi_lns_Insert ( ) : bool
return bool
        private bool kiem_tra_thoi_gian_hop_le_voi_lns_Insert()
        {
            US_GD_LUONG_CUNG v_us = new US_GD_LUONG_CUNG();
            var v_dat_tu_ngay = m_dat_ngay_bat_dau.DateTime.Date;
            var v_dat_den_ngay = m_dat_ngay_ket_thuc.EditValue == null ? new DateTime(2100, 1, 1).Date : m_dat_ngay_ket_thuc.DateTime.Date;
            if(!v_us.KiemTraThoiGianVoiHeSoLNSForInsert(Convert.ToDecimal(m_sle_chon_nhan_vien.EditValue), v_dat_tu_ngay, v_dat_den_ngay))
            {
                XtraMessageBox.Show("Không thêm lương cứng được vì nhân viên đã có hệ số LNS có hiệu lực trong khoảng thời gian này rồi!","THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return false;
            }
            return true;
        }