Foxtable(狐表)用户栏目专家坐堂 → TimerTick


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

主题:TimerTick

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


加好友 发短信
等级:幼狐 帖子:55 积分:460 威望:0 精华:0 注册:2015/6/7 19:52:00
TimerTick  发帖心情 Post By:2021/10/15 11:51:00 [只看该作者]

老师怎么样才能点击Table_3.Table_7的时候才会显示他的剩余时间,不然就显示table_3的剩余时间

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


加好友 发短信
等级:幼狐 帖子:55 积分:460 威望:0 精华:0 注册:2015/6/7 19:52:00
  发帖心情 Post By:2021/10/15 11:52:00 [只看该作者]

Dim dr As Row = Tables("Table_3").Current
If dr Is Nothing Then Return
If dr("状态")="跟进中"
Dim d As Date = cdate(dr("记录日期")).adddays(val(e.Form.Controls("TextBox6").text)) 
Dim dt As Date =  format(d,"yyyy-MM-dd 23:59:59")
Dim t As TimeSpan = dt - Date.Today     '计算现在离今天的24时整还差多少时间
e.Form.Controls("Label29").Text = "剩余" & t.Days & "天" & t.Hours & "小时" & t.Minutes & "分" & t.Seconds & "秒"

Dim Lbl As WinForm.Label = e.Form.Controls("Label29")
If Lbl.ForeColor = Color.Red Then
    Lbl.ForeColor = Color.Black
Else
    Lbl.ForeColor = Color.Red
End If
Else
e.Form.Controls("Label29").text =""
End If
Dim Lb2 As WinForm.Label = e.Form.Controls("Label33")      
If Lb2.ForeColor = Color.Red Then
    Lb2.ForeColor = Color.Black
Else
    Lb2.ForeColor = Color.Red
End If
If CurrentTable.Name = "Table_3.Table_7"  AndAlso Forms("录入窗口").Opened Then
Dim dr1 As Row = Tables("Table_3.Table_7").Current
If dr1 Is Nothing Then Return
If dr1("状态")="跟进中"
Dim d1 As Date = cdate(dr1("记录时间")).adddays(val(e.Form.Controls("TextBox6").text)) 
Dim dt1 As Date =  format(d1,"yyyy-MM-dd 23:59:59")
Dim t1 As TimeSpan = dt1 - Date.Today     '计算现在离今天的24时整还差多少时间
e.Form.Controls("Label29").Text = "剩余" & t1.Days & "天" & t1.Hours & "小时" & t1.Minutes & "分" & t1.Seconds & "秒"   

Dim Lb3 As WinForm.Label = e.Form.Controls("Label29")
If Lb3.ForeColor = Color.Red Then
    Lb3.ForeColor = Color.Black
Else
    Lb3.ForeColor = Color.Red
End If
Else
e.Form.Controls("Label29").text =""
End If
            
End If

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


加好友 发短信
等级:幼狐 帖子:55 积分:460 威望:0 精华:0 注册:2015/6/7 19:52:00
  发帖心情 Post By:2021/10/15 11:53:00 [只看该作者]

我现在点返回table_3 他的数据还是返回的是table_3.table_7

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


加好友 发短信
等级:超级版主 帖子:106665 积分:542508 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/10/15 11:58:00 [只看该作者]

不建议做这种控制。可以添加2个标签,分别显示2个表格的时间

 回到顶部