If e.Form.Width> 0 AndAlso e.Form.height > 0 Then
vars("width") = e.Form.width
vars("height") = e.Form.height
End If
Tables("销售订单需求_订单明细").ShowCheckBox = True
For Each dr As DataRow In DataTables("权限设置").Select("用户名 = '" & _username & "' And 窗口名 = '" & e.form.Name & "'")
Dim c = e.form.Controls(dr("按钮权限"))
If typeof c Is winform.Table Then
c.visible = Not dr("不可见")
c.Table.allowEdit = Not dr("不可编辑")
Else
c.Visible = Not dr("不可见")
c.Enabled = Not dr("不可编辑")
End If
Next
With DataTables("销售订单需求_订单明细")
.LoadFilter = "[订单状态] = '进行中'" '一定要清除加载条件
.LoadTop = 50
.LoadPage = 0
.Load()
e.Form.Controls("TextBox1").Value = 1 &"/" & .TotalPages
End With
Dim cmb As WinForm.ComboBox = e.form.Controls("客户编码1")
cmb.ComboList = DataTables("销售订单需求").SQLGetComboListString("客户编码")
Dim cmf As WinForm.ComboBox = e.form.Controls("成品编码1")
cmf.ComboList = DataTables("销售订单需求").SQLGetComboListString("成品编码")
Dim cmc As WinForm.ComboBox = e.form.Controls("销售订单号1")
cmc.ComboList = DataTables("销售订单需求").SQLGetComboListString("销售订单号")
Dim cpm As WinForm.ComboBox = e.form.Controls("成品描述1")
cpm.ComboList = DataTables("销售订单需求").SQLGetComboListString("成品描述")
Dim jhj As WinForm.ComboBox = e.form.Controls("计划节点1")
jhj.ComboList = DataTables("销售订单需求").SQLGetComboListString("计划节点")