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 判断
如果表名存在 选择覆盖还是放弃