Foxtable(狐表)用户栏目专家坐堂 → 如何及时更新时间


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

主题:如何及时更新时间

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


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

 这样改一下

Dim a As WinForm.ComboBox = e.Form.Controls("ComboBox3")
Dim b As WinForm.DateTimePicker = e.Form.Controls("DateTimePicker1")
If a.text ="现金" Then
    b.Value = Date.Today
End If
If a.text = "月结" Then
    Dim y As Integer = Date.Today.Year
    Dim m As Integer = Date.Today.Month
    Dim dt2 As New Date(y, m, Date.DaysInMonth(y, m)) '获取本月的最后一天
    b.Value = dt2
    
End If
If a.text = "月结30天" Then
    Dim y As Integer = Date.Today.Year
    Dim m As Integer = Date.Today.Month
    Dim dt3 As New Date(y, m+1, Date.DaysInMonth(y, m+1)) '获取本月的最后一天
    b.Value = dt3
    
End If

 回到顶部