'------------------------------------------------------------------------------------------------------------------------------
wb.AddPageTitle("","pageheader","工作日志","艾迪尔国际家居")
If e.PostValues.Count = 0 Then
wb.AddForm("","form1","qyrz.htm")
With wb.AddInputGroup("form1","ipg1","")
With .AddInput("姓名","填报人","Text")
.value = name
.readonly = True
End With
With .AddInput("部门","所属部门","Text")
.value = bm
.readonly = True
End With
With .AddInput("岗位","岗位","Text")
.value = gw
.readonly = True
End With
'提取登陆数据
End With
With wb.AddInputGroup("form1","ipg2","日志内容")
With .AddInput("日期","填报日期*","date")
.Value = Date.Today
End With
.AddInput("汇报对象","汇报对象*","Text")
With wb.AddInputGroup("form1","ipg3","今日达成")
.AddTextArea("今日达成",5).Placeholder = "请输入您的今日达成的工作 * "
End With
With wb.AddInputGroup("form1","ipg31","明日计划")
.AddTextArea("明日计划",5).Placeholder = "请输入您的明日计划工作 * "
End With
.AddInput("营业收入","业绩收入","number")
.AddInput("今日支出","今日支出","number")
With wb.AddInputGroup("form1","ipg4","领导协助事项")
.AddTextArea("工作建议",5).Placeholder = "请输入您需要上级协助的事情,或是需要提醒您的上级的待办事项."
End With
'With wb.AddInputGroup("form1","ipg5","其他备注")
'.AddTextArea("其他备注",5).Placeholder = "请输入:您的支出或是收入的备注方便记忆"
'End With
With wb.AddInputGroup("form1","ipg6","重要资料请 tocasa@icwood.top 邮箱")
'.AddUploader("up1","客户资料",True) 'True表示允许上传多个文件
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定", "submit")
End With
e.WriteString(wb.Build)
End With
Else
Dim nms() As String = {"今日达成","明日计划","日期","姓名","部门","岗位","汇报对象" } '不能为空的列名数组
For Each nm As String In nms
If e.PostValues.ContainsKey(nm) = False Then '生成错误提示页
With wb.AddMsgPage("","msgpage","增加失败", nm & "列不能为空!")
.icon = "Warn" '改变图标
.AddButton("btn1","返回").Attribute = ""
End With
e.WriteString(wb.Build)
Return "" '必须返回
End If
Next
移动版
当下需要增加表到系统才能写入,我想通过sql 直接写入后台不需要增加表到当前系统
请教各位老师了
nms = New String() {"今日达成","明日计划","日期","姓名","营业收入","工作建议","今日支出" ,"部门","岗位"} '重新定义了nms数组,增加了两列.
Dim dr As DataRow = DataTables("工作日报").AddNew()
For Each nm As String In nms
If e.PostValues.ContainsKey(nm) Then
dr(nm) = e.PostValues(nm)
End If
Next
dr.save()
wb.InsertHTML("我们收到您的日志:<br/>")
For Each key As String In e.PostValues.Keys
wb.InsertHTML(key & ":" & e.PostValues(key) & "<br/>")
Next
With wb.AddMsgPage("","msgpage","提交成功", "感谢您的付出,公司的辉煌离不开您的付出") '生成成功提示页
.AddButton("btn1","查看历史","lsrz.htm")
End With
e.WriteString(wb.Build)
End If
[此贴子已经被作者于2018/3/10 19:06:05编辑过]