以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 原始用户表移动版 注册 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=114578) |
-- 作者:yifan3429 -- 发布时间:2018/2/9 19:32:00 -- 原始用户表移动版 注册 Dim wb As New WeUI \'定义一个基于weui框架的网页生成器 Dim e As RequestEventArgs = args(0)\' wb.AddPageTitle("","pageheader","用户注册","艾迪尔国际家居") If e.PostValues.Count = 0 Then wb.AddForm("","form1","立项事件.htm") With wb.AddInputGroup("form1","ipg1","带 * 为必填项 ") .AddInput("日期","注册日期*","date") .AddInput("Name","用户姓名*","Text") .AddInput("Config","用户部门*","Text") 怎么在Config写入组 .AddInput("Config","用户岗位*","Text") 怎么 在Config写入角色 .AddInput("Config","用户密码*","Text") 怎么在 Config写入密码 .AddInput("上级","直接上级*","Text") End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "submit") End With e.WriteString(wb.Build) Else Dim nms() As String = {"日期","Name","Config"} \'不能为空的列名数组 For Each nm1 As String In nms If e.PostValues.ContainsKey(nm1) = False Then \'生成错误提示页 With wb.AddMsgPage("","msgpage","增加失败", nm1 & "列不能为空!") .icon = "Warn" \'改变图标 .AddButton("btn1","返回").Attribute = "" End With e.WriteString(wb.Build) Return "" \'必须返回 End If Next nms = New String() {"Name","Type","Config","上级","日期"} \'重新定义了nms数组,增加了两列. Dim dr As DataRow = DataTables("用户表").AddNew() For Each nm1 As String In nms If e.PostValues.ContainsKey(nm1) Then dr(nm1) = e.PostValues(nm1) 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","立即登陆","") End With e.WriteString(wb.Build) End If \'End Select
[此贴子已经被作者于2018/2/9 19:32:00编辑过]
|
-- 作者:有点蓝 -- 发布时间:2018/2/9 20:36:00 -- 参考:http://www.foxtable.com/mobilehelp/scr/0045.htm With wb.AddInputGroup("form1","ipg1","带 * 为必填项 ") .AddInput("日期","注册日期*","date") .AddInput("Name","用户姓名*","Text") With .AddInput("group","用户部门*","text") .Value = user.Group End With .AddInput("Config","用户岗位*","Text") 怎么 在Config写入角色 .AddInput("Config","用户密码*","Text") 怎么在 Config写入密码 .AddInput("上级","直接上级*","Text") End With |
-- 作者:yifan3429 -- 发布时间:2018/2/9 21:43:00 -- 老师我的表是这样的 没有group 要写入 分组 角色 密码 都要写入 Config [此贴子已经被作者于2018/2/9 21:44:09编辑过]
|
-- 作者:有点蓝 -- 发布时间:2018/2/9 22:30:00 -- 参考:http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=101356&skin=0 dr("Config") = "Group" & 获取的分组名 & "PassWord" & MD5Encrypt("获取的密码") & "Type2Role" & 获取的角色 中间的分隔符这里无法显示,自己创建一个用户,然后到数据库里复制这个特殊符号
|
-- 作者:yifan3429 -- 发布时间:2018/2/9 22:50:00 -- 复制出来就不见了 有其他的办法吗 |
-- 作者:有点蓝 -- 发布时间:2018/2/9 22:58:00 -- 参考:http://www.foxtable.com/webhelp/scr/1273.htm |
-- 作者:yifan3429 -- 发布时间:2018/2/9 23:06:00 -- 是这个么 确人还是不能复制出来 ![]() ![]() |
-- 作者:有点甜 -- 发布时间:2018/2/10 9:00:00 -- 这个字符是 chr(11)
dr("Config") = "Group " & chr(11) & 获取的分组名 & "PassWord " & MD5Encrypt("获取的密码") & "Type 2 Role " & 获取的角色 |
-- 作者:yifan3429 -- 发布时间:2018/2/10 13:42:00 -- ![]() 麻烦 老师明确下 谢谢;老师 Dim wb As New WeUI \'定义一个基于weui框架的网页生成器 Dim e As RequestEventArgs = args(0)\' wb.AddPageTitle("","pageheader","用户注册","艾迪尔国际家居") If e.PostValues.Count = 0 Then wb.AddForm("","form1","用户注册.htm") With wb.AddInputGroup("form1","ipg1","带 * 为必填项 ") With .AddInput("日期","注册日期*","date") .Value = Date.Today End With .AddInput("Name","用户姓名*","Text") With .AddInput("group","用户岗位*","text") .Value = user.Group End With .AddInput("Config","用户岗位*","Text") .AddInput("Config","用户密码*","Text") .AddInput("上级","直接上级*","Text") End With Dim dr As DataRow dr("Config") = "Group " & chr(11) & 获取的分组名 & "PassWord " & MD5Encrypt("获取的密码") & "Type 2 Role " & 获取的角色 With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "确定", "submit") End With e.WriteString(wb.Build) Else Dim nms() As String = {"日期","Name","Config"} \'不能为空的列名数组 For Each nm1 As String In nms If e.PostValues.ContainsKey(nm1) = False Then \'生成错误提示页 With wb.AddMsgPage("","msgpage","增加失败", nm1 & "列不能为空!") .icon = "Warn" \'改变图标 .AddButton("btn1","返回").Attribute = "" End With e.WriteString(wb.Build) Return "" \'必须返回 End If Next If DataTables("用户表").Find("Name=\'" & e.PostValues("Name") & "\'") IsNot Nothing Then With wb.AddMsgPage("","msgpage2","您已经注册!", "请联系管理员重置密码......") .icon = "Warn" \'改变图标 .AddButton("btn2","返回").Attribute = "" End With e.WriteString(wb.Build) Return" " \'必须返回 End If nms = New String() {"Name","Type","Config","上级","日期"} \'重新定义了nms数组,增加了两列. Dim dr As DataRow = DataTables("用户表").AddNew() For Each nm1 As String In nms If e.PostValues.ContainsKey(nm1) Then dr(nm1) = e.PostValues(nm1) 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","立即登陆","logon.htm") End With e.WriteString(wb.Build) End If
|
-- 作者:有点甜 -- 发布时间:2018/2/10 16:15:00 -- Else \'提交表单后
Dim name As String = e.values("name")
Dim group As String = e.values("group")
Dim password as string =
Dim role as string =
Dim ndr As DataRow = DataTables("用户表").AddNew
ndr("config") = "Group" & chr(11) & group & chr(11) & "PassWord" & chr(11) & MD5Encrypt(password) & chr(11) & "Type" & chr(11) & "2" & chr(11) & "Role" & chr(11) & role
End If
[此贴子已经被作者于2018/2/10 16:17:46编辑过]
|