Foxtable(狐表)用户栏目专家坐堂 → 数据 保存时做选择


  共有2032人关注过本帖平板打印复制链接

主题:数据 保存时做选择

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


加好友 发短信
等级:九尾狐 帖子:2464 积分:22751 威望:0 精华:0 注册:2011/3/29 17:14:00
数据 保存时做选择  发帖心情 Post By:2019/7/23 12:22:00 [只看该作者]

Dim str As String = e.form.Name
If InputValue(str, "保存", "请输入窗体名字") Then
    Dim t As Table = Tables("窗体设置")
    Dim t1 As Table = e.Form.controls("table1").Table
    Dim nr As Row = t.AddNew
    nr("窗体名称") = str
    nr("数据源") = e.Form.Controls("ComboBox数据源").Text
    nr("表名") = e.Form.Controls("ComboBox表").Text
    nr("数据列") = e.Form.Controls("CheckedComboBox数据列").Text
    nr("用户") = User.Name
    nr("日期") = Date.Today()
    nr("目录树") = e.Form.Controls("CheckedComboBox数据列").Text.replace(",","|")
    Dim s As String = e.Form.Controls("CheckedComboBox数据列").Text
    Dim i As Integer = s.IndexOf(",")
    If i = -2 Then
        s = s & " desc"
    Else
        s = s.Insert(i ," desc")
    End If
    nr("筛选条件") = s
    'Output.Show(s)
End If
DataTables("窗体设置").Save()



上面的代码我想在保存时做选择  
根据 nr("表名") = e.Form.Controls("ComboBox表").Text  判断

如果表名存在  选择覆盖还是放弃




 回到顶部