Foxtable(狐表)用户栏目专家坐堂 → 政治面貌 、入党时间、党龄的逻辑关系


  共有2375人关注过本帖树形打印复制链接

主题:政治面貌 、入党时间、党龄的逻辑关系

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/9/9 16:47:00 [显示全部帖子]

改成

 

Dim txt As String = e.Sender.Text
'If txt <> Nothing Then
If  txt > "" Then
     If txt.Length > 20 Then 
         e.Sender.Error = "政治面貌长度不允许超过20"
     Else
         e.Sender.Text= txt.Replace(" ","")
          If e.Form.Controls("politicalStatus").Value ="中共党员" Then
             If e.Form.Controls("partyTime").Value ="" Then
                e.Form.Controls("PartyTime").Error= "入党时间不允许为空"
             Else
                e.Form.Controls("PartyTime").Error= ""
                Dim d As Date = e.Form.Controls("partyTime").text
                Dim y As Integer = d.year
                If format(d, "MMdd") <= Format(Date.Today, "MMdd") Then
                    y = Date.Today.Year - y-1
                Else
                    y = 0
                End If

msgbox(d)
                If y < 0 Then
                     e.Form.Controls("partyStanding").Value = 0

                 End If

e.Form.Controls("partyStanding").Value = y

e.Form.Controls("partyStanding").WriteValue
             End If   
         End If
     End If
End If


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2018/9/9 22:53:00 [显示全部帖子]

实例发上来测试。

 回到顶部