Dim t1 As WinForm.TextBox = e.Form.Controls("TextBox1")
Dim t2 As WinForm.TextBox = e.Form.Controls("TextBox2")
Dim t3 As WinForm.TextBox = e.Form.Controls("TextBox3")
Dim t4 As WinForm.TextBox = e.Form.Controls("TextBox4")
Dim t5 As WinForm.RadioButton = e.Form.Controls("RadioButton1")
Dim t6 As WinForm.RadioButton = e.Form.Controls("RadioButton2")
Dim t7 As WinForm.RadioButton = e.Form.Controls("RadioButton3")
Dim t8 As WinForm.RadioButton = e.Form.Controls("RadioButton4")
Dim t9 As WinForm.RadioButton = e.Form.Controls("RadioButton5")
Dim t10 As WinForm.RadioButton = e.Form.Controls("RadioButton6")
Dim t11 As WinForm.RadioButton = e.Form.Controls("RadioButton7")
Dim t12 As WinForm.RadioButton = e.Form.Controls("RadioButton8")
Dim t13 As WinForm.RadioButton = e.Form.Controls("RadioButton9")
Dim t14 As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim t15 As WinForm.ComboBox = e.Form.Controls("ComboBox2")
Dim t16 As WinForm.RadioButton = e.Form.Controls("工业账")
Dim t17 As WinForm.RadioButton = e.Form.Controls("商业账")
Dim t18 As WinForm.CheckBox = e.Form.Controls("CheckBox1")
Case "取消确定"
Dim sr() As String = {"库存数据源", "出纳数据记账源", "财务数据源"}
For Each s As String In sr
For Each c As DataCol In DataTables(s).DataCols
For Each dr As DataRow In DataTables(s).DataRows
If dr IsNot Nothing Then
If dr.IsNull(c) = False Then
Return
ElseIf DataTables(s).DataRows.Count = 0 OrElse (DataTables(s).DataRows.Count > 0 And dr.IsNull(c)) Then
For Each tb As DataTable In DataTables
If tb.name = "企业资料" Then
DataTables("企业资料").AllowEdit = True
t1.ReadOnly = BooleanEnum.False
t2.ReadOnly = BooleanEnum.False
t3.ReadOnly = BooleanEnum.False
t4.ReadOnly = BooleanEnum.False
t5.ReadOnly = BooleanEnum.False
t6.ReadOnly = BooleanEnum.False
t7.ReadOnly = BooleanEnum.False
t8.ReadOnly = BooleanEnum.False
t9.ReadOnly = BooleanEnum.False
t10.ReadOnly = BooleanEnum.False
t11.ReadOnly = BooleanEnum.False
t12.ReadOnly = BooleanEnum.False
t13.ReadOnly = BooleanEnum.False
t14.ReadOnly = BooleanEnum.False
t15.ReadOnly = BooleanEnum.False
t16.ReadOnly = BooleanEnum.False
t17.ReadOnly = BooleanEnum.False
t18.ReadOnly = BooleanEnum.False
Else
DataTables(tb.name).AllowEdit = False
End If
Next
End If
End If
Next
Next
Next
End Select