Dim timeC As Date =Date.Today( )
Dim timeD As Date = e.Form.Controls("报送时间").Value
Dim timeE As Date = e.Form.Controls("审核时间").Value
Dim timeF As Date = TimeC.AddDays(7) '加上7天
Dim timeBB As TimeSpan = timeE – timeD
IF timeD < timeC then
MessageBox.Show("上报时间不能小于当前时间!!!", "提示", MessageBoxButtons.OK,MessageBoxIcon.Information)
Return '终止代码的执行
Else
If timeD > timeF then
MessageBox.Show("上报时间过于延后!!!", "提示", MessageBoxButtons.OK,MessageBoxIcon.Information)
Return '终止代码的执行
Else
If timeE < timeD then
MessageBox.Show("审核时间不能小于上报时间!!!", "提示", MessageBoxButtons.OK,MessageBoxIcon.Information)
Return '终止代码的执行
Else
If timeBB.Days > 18 then
MessageBox.Show("审核时间与上报时间间隔过长!!!", "提示", MessageBoxButtons.OK,MessageBoxIcon.Information)
Return '终止代码的执行
End if
End if
End if
End if