以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 当天的不显示 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=124307) |
-- 作者:YDS -- 发布时间:2018/9/4 11:22:00 -- 当天的不显示 If dj.DayOfWeek > 0 Then If Format(Date.now, "HHmm") <= Functions.Execute("Get","设置",0) Then .AddSwitch(dj & ":" & "c2","中餐",dr4("c2")).Value = "True" .AddSwitch(dj & ":" & "c3","晚餐",dr4("c3")).Value = "True" Else If Format(Date.now, "HHmm") <= Functions.Execute("Get","设置",1) Then Dim bc2 As String = Functions.Execute("bc",uid,"bc2") With .AddInput("zc1","中餐","text") If bc2 > "" Then .Value = bc2 Else .Value = "没有相关数据" End If .Readonly= True End With .AddHiddenValue(dj & ":" & "c2",dr4("c2")) .AddSwitch(dj & ":" & "c3","晚餐",dr4("c3")).Value = "True" Else .AddHiddenValue(dj & ":" & "c2",dr4("c2")) .AddHiddenValue(dj & ":" & "c3",dr4("c3")) Dim bc2 As String = Functions.Execute("bc",uid,"bc2") With .AddInput("zc2","中餐","text") If bc2 > "" Then .Value = bc2 Else .Value = "没有相关数据" End If .Readonly= True End With Dim bc3 As String = Functions.Execute("bc",uid,"bc3") With .AddInput("wc1","晚餐","text") If bc2 > "" Then .Value = bc3 Else .Value = "没有相关数据" End If .Readonly= True End With End If End If Else .AddHiddenValue(dj & ":" & "c2",dr4("c2")) .AddHiddenValue(dj & ":" & "c3",dr4("c3")) With .AddInput("zc2","中餐","text") .Value = "今天休息" .Readonly= True End With With .AddInput("wc1","晚餐","text") .Value = "周末愉快" .Readonly= True End With End If |
-- 作者:YDS -- 发布时间:2018/9/4 11:24:00 -- 全部代码 Dim e As RequestEventArgs = args(0) Dim wb As New weui Dim name As String Dim balance As String Dim dj As Date = Date.Today Dim dr,dr1,dr2,dr3,dr4,dr5 As DataRow Dim uid As String = Functions.Execute("GetUserID",args(0)) If uid > "" AndAlso Functions.Execute("fwsq",args(0),uid) Then dr = DataTables("Users").Find("userid = \'" & uid & "\'") If dr IsNot Nothing Then name = dr("name") Else wb.InsertHTML("<meta http-equiv=\'Refresh\' c>") \'直接跳转到首页 e.WriteString(wb.Build) \'生成网页 Return "" End If dr1 = DataTables("pos").SQLFind("user_name = \'" & name & "\'","pos_time Desc",0) If dr1 IsNot Nothing Then balance = dr1("balance") Else balance = "无查询结果" End If If e.PostValues.Count = 0 Then wb.AddForm("","form1","index.htm") wb.AddPreview("form1","pv1",name,balance) With wb.AddInputGroup("form1","ipg0",dj & " " & "星期" & "日一二三四五六".Chars(dj.DayOfWeek)) dr4 = DataTables("dc").SQLFind("name = \'" & name & "\' And Date = # " & dj & " # ") If dr4 IsNot Nothing Then 上页代码 End If End With Dim count As Integer count = Functions.Execute("Get","设置",6) - 1 For i As Integer = 1 To count If dj.AddDays(i).DayOfWeek = 0 Then count = count + 1 Continue For Else With wb.AddInputGroup("form1","ipg_" & i,dj.AddDays(i) & " " & "星期" & "日一二三四五六".Chars(dj.AddDays(i).DayOfWeek)) dr4 = DataTables("dc").SQLFind("userid = \'" & uid & "\' And Date = \'" & dj.AddDays(i) & " \'") If dr4 IsNot Nothing Then .AddSwitch(dj.AddDays(i) & ":" & "c2","中餐",dr4("c2")).Value = "True" .AddSwitch(dj.AddDays(i) & ":" & "c3","晚餐",dr4("c3")).Value = "True" End If End With End If Next With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "submit") End With count = Functions.Execute("Get","设置",6) - 1 If count < 3 Then With wb.AddPageFooter("","pf1","Copyright © " & Date.Today.Year & " " & Functions.Execute("Get","公司信息",3).split(".")(Functions.Execute("Get","公司信息",3).split(".").Length - 2) & "." & Functions.Execute("Get","公司信息",3).split(".")(Functions.Execute("Get","公司信息",3).split(".").Length - 1)) .AddLink(Functions.Execute("Get","公司信息",0),Functions.Execute("Get","公司信息",3)) End With End If Else Dim sb As New StringBuilder Dim count As Integer = Functions.Execute("Get","设置",6) - 1 For i As Integer = 0 To count Dim ft As String = "userid = \'" & uid & "\' And Date = \' " & dj.AddDays(i) & " \'" dr5 = DataTables("dc").SQLFind(ft) If dr5 IsNot Nothing Then If e.PostValues.ContainsKey(dj.AddDays(i) & ":c2") Then DataTables("dc").SQLReplaceFor("c2",1,ft) Else DataTables("dc").SQLReplaceFor("c2",0,ft) End If If e.PostValues.ContainsKey(dj.AddDays(i) & ":c3") Then DataTables("dc").SQLReplaceFor("c3",1,ft) Else DataTables("dc").SQLReplaceFor("c3",0,ft) End If End If Next With wb.AddMsgPage("","msgpage","报餐成功", "世界是我们的,粮食是世界的!") \'报餐成功提示页 .AddButton("btn1","返回首页","index.htm") End With With wb.AddPageFooter("","pf1","Copyright © " & Date.Today.Year & " " & Functions.Execute("Get","公司信息",3).split(".")(Functions.Execute("Get","公司信息",3).split(".").Length - 2) & "." & Functions.Execute("Get","公司信息",3).split(".")(Functions.Execute("Get","公司信息",3).split(".").Length - 1)) .AddLink(Functions.Execute("Get","公司信息",0),Functions.Execute("Get","公司信息",3)) End With End If e.WriteString(wb.Build) \'生成网页 Else wb.InsertHTML("<meta http-equiv=\'Refresh\' c>") \'直接跳转到首页 e.WriteString(wb.Build) \'生成网页 End If |
-- 作者:YDS -- 发布时间:2018/9/4 11:28:00 -- 发现问题了 晕了 内部表转到sql以后日期#忘记换‘了 |