Dim xkc As WinForm.CheckBox = e.Form.Controls("去除现库存")
Dim cks As List(Of DataRow)
Dim csbj As List(Of DataRow)
Dim drkcs As List(Of DataRow)
Dim drhhs As List(Of DataRow)
Dim zz As List(Of DataRow)
cks=DataTables("仓库部分表").Select("仓库<>'总部仓库'")
csbj=DataTables("库存表").Select("仓库='总部仓库'")
For Each ck As DataRow In cks
If xkc.Checked Then
drkcs=DataTables("库存表").Select("仓库='"& ck("仓库") &"'")
For Each qb As DataRow In csbj
qb("标志")="1"
Next
For Each drkc1 As DataRow In drkcs
drhhs = DataTables("库存表").Select("款号='"& drkc1("款号") &"'and 花色='"& drkc1("花色") &"'and 尺码='"& drkc1("尺码") &"'and 标志='1'")
For Each drhh As DataRow In drhhs
drhh("标志")=""
Next
Next
zz.AddRange(DataTables("库存表").Select("标志='1'"))
For Each zz1 As DataRow In zz
zz1("仓库")=ck("仓库")
Next
End If
Next