Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
我的流程是这样:
数据 全部来源 SQL 包括 库存表,生产价格表。生产价格表 输入的时候产品来源于 库存表。
库存数据是和管家婆公用的,库存表里面没有该产品的时候是从管家新增新产品的。
如图 库存表(数据源是SQL的)
foxtable的生产价格表(数据源是SQL的)
管家婆 新增产品界面 (数据源是SQL的)已经确定“高压黑折边育苗袋”“13*15*0.03”“个” 该产品
已经添加到库存表中。
如图所示 管家婆已经 确定把 产品名称 “高压黑折边育苗袋”“13*15*0.03”“个” 添加到 仓库表中了。
可是如图 110.jpg 所示:该窗口的数据 来源于 SQL 仓库表,但是搜索的时候却没有出来。
只有关闭掉foxtable ,让他重新加载数据库,才会显示出该产品。
应该是 sql中的数据已经从后台更新了,但是foxtable 的数据没有能够及时更新引起的。这样的问题如何解决?
不容易掌握呀。
比如 textchanged 的语句 是这样的 如何改成动态加载呢?
table 类型是Normal 副本是TRUE
Dim txt As String = e.Form.Controls("TextBox1").Text
Dim tbl As Table = Tables("窗口4_Table1")
If txt = "" Then
tbl.Filter =" leveal=2 and deleted=0 and isstop=0"
tbl.Sort = "pfullname desc,Standard desc,Unit1 desc"
Else
txt = "'*" & txt & "*'"
tbl.filter = "(pfullname Like " & txt & " Or Standard Like " & txt & " Or Unit1 Like " & txt & ") and (leveal=2 and deleted=0 and isstop=0)"
tbl.Sort = "pfullname desc,Standard desc,Unit1 desc"
End If
两种方法
用追载:
Dim txt As String = e.Form.Controls("TextBox1").Text
Dim tbl As Table = Tables("窗口4_Table1")
tbl.DataTable.AppendLoad("条件")
If txt = "" Then
tbl.Filter =" leveal=2 and deleted=0 and isstop=0"
tbl.Sort = "pfullname desc,Standard desc,Unit1 desc"
Else
txt = "'*" & txt & "*'"
tbl.filter = "(pfullname Like " & txt & " Or Standard Like " & txt & " Or Unit1 Like " & txt & ") and (leveal=2 and deleted=0 and isstop=0)"
tbl.Sort = "pfullname desc,Standard desc,Unit1 desc"
End If
用加载:
Dim txt As String = e.Form.Controls("TextBox1").Text
Dim tbl As Table = Tables("窗口4_Table1")
Dim Filter As string
Dim Sort AS string
If txt = "" Then
Filter =" leveal=2 and deleted=0 and isstop=0"
Sort = "pfullname desc,Standard desc,Unit1 desc"
Else
txt = "'%" & txt & "%'" '这里用%,不是*
filter = "(pfullname Like " & txt & " Or Standard Like " & txt & " Or Unit1 Like " & txt & ") and (leveal=2 and deleted=0 and isstop=0)"
Sort = "pfullname desc,Standard desc,Unit1 desc"
End If
tbl.DataTable.LoadFilter = Filter
tbl.DataTable.Load
tbl.sort = sort