以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  如何设置发布项目的失效日期?  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=66100)

--  作者:czy66ds
--  发布时间:2015/3/30 11:24:00
--  如何设置发布项目的失效日期?
如题
--  作者:有点甜
--  发布时间:2015/3/30 11:26:00
--  

 类似的,参考 http://www.foxtable.com/help/topics/1545.htm

 


--  作者:Bin
--  发布时间:2015/3/30 11:26:00
--  

BeforeOpenProject事件



Dim url As String = "http://foxtable.sinaapp.com/time/"
Dim rqst As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
Dim rsps As System.Net.HttpWebResponse = rqst.GetResponse
Dim stm As System.IO.Stream = rsps.GetResponseStream()
Dim reader As New System.IO.StreamReader(stm)
Dim str As String = reader.ReadToEnd
stm.Dispose()
Dim dt As Date = str
Dim ddd As Date = "2015-04-19"
If dt > ddd Then
    MessageBox.show("试用期已到")
    e.Cancel = True
End If