Foxtable(狐表)用户栏目专家坐堂 → 信息写入表


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

主题:信息写入表

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


加好友 发短信
等级:超级版主 帖子:110738 积分:563610 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/3/11 12:19:00 [显示全部帖子]

Case "zgxxlr.htm"
        If e.PostValues.Count = 0 Then
            wb.AddForm("","form1","zgxxlr.htm")
            With wb.AddInputGroup("form1","ipg1","教职工信息")
                .AddInput("姓名","姓名","Text") '前一个"姓名"是ID,后一个"姓名"是标题
                .AddInput("性别","性别","男|女")
                .AddInput("出生日期","出生日期","date")
                .AddInput("籍贯","籍贯","Text")
                .AddSelect("民族","民族","汉族|回族|其它")
                .AddSelect("编制","编制","农村初中|农村小学|无编制")
                .AddSelect("任教学科","任教学科","语文|数学|英语|物理|化学|生物|政治|历史|地理|体育|美术|音乐|信息技术|科学|综合实践")
                .AddInput("政治面貌","政治面貌","TEXT")
                .AddSelect("职称_职级","最高职称","副高级教师|一级教师|二级教师")
                .AddSelect("最高学历","最高学历","中专|大专|本科|硕士")
                .AddUploader("up1","照片",True) 'True表示允许上传多个文件
            End With
            With wb.AddButtonGroup("form1","btg1",True)
                .Add("btn1", "确定", "submit")
            End With
            e.WriteString(wb.Build)
        Else
            Dim nms() As String = {"姓名","性别","出生日期","籍贯","民族","编制","任教学科","政治面貌","职称_职级","最高学历"}
            Dim dr As DataRow = DataTables("职工信息总表").AddNew()
            For Each nm As String In nms
                dr(nm) = e.PostValues(nm)
            Next
            For Each key As String In e.Files.Keys
                If key = "up1" Then
                    For Each fln As String In e.Files(key)
                        e.SaveFile(key, fln, "D:\xxsjk(学校数据库)\学校档案\教师照片\" & fln)
                    Next
                    dr.Lines("照片") = e.Files(key)
                End If
            Next
            '保存并生成增加成功提示页面
            dr.save()
            With wb.AddMsgPage("","msgpage","增加成功") '生成成功提示页
                .AddButton("btn1","继续增加","zgxxlr.htm")
            End With
            e.WriteString(wb.Build)
        End If

 回到顶部