老师,你好!
是我的表达不够清晰,我的意思是当我执行编辑窗口中的撤销修改命令后仅仅对除了项目分配和项目查询以外的修改进行撤销,项目分配和项目查询的修改内容不能撤销。
撤销修改控件的命令:
Dim Result As DialogResult
Result = MessageBox.Show("确定要撤销修改吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Result = DialogResult.Yes Then
Tables("经营总表").Current.Reject() '撤销编辑
Tables("经营总表").Current("编辑者") = Nothing
Tables("经营总表").Current.Save()
e.Form.Close()
Else
Return
End If
StatusBar.Message2 = ""
项目分配控件的命令:
If DataTables.Contains("图纸放行台帐") = False Then
DataTables.Load("图纸放行台帐")
End If
Tables("图纸放行台帐").Filter = "[_Identify] Is Null"
'Dim n As Integer = 1
Dim num1 As Integer
Dim num2 As Integer
Dim cjzyval As String = e.Form.Controls("CheckedComboBox1").value '参加专业
Dim cjryval As String = e.Form.Controls("TextBox10").value '参加人员
Dim cdrq As String = e.Form.Controls("DateTimePicker6").value '计划要求_存档日期
Dim nms() As String = cjzyval.Split(",")
Dim nmsry() As String = cjryval.Split(",")
If cjzyval Is Nothing Then
num1 = 1
Else
num1 = nms.Count
End If
If num1 >= 0 Then
For i As Integer = 0 To num1 - 1
Dim drnew As Row = Tables("图纸放行台帐").AddNew()
drnew("总项目名称") = e.Form.Controls("TextBox4").value
drnew("档案号") = e.Form.Controls("TextBox9").value
drnew("专业") = nms(i)
drnew("设计人") = nmsry(i)
drnew("项目经理") = e.Form.Controls("ComboBox7").value
drnew("计划要求_存档日期") = cdrq
Next
End If
Forms("项目分配").Open
'--------------------
'If chk26.Checked = True Then
'e.Form.Controls("项目分配").Enabled = False
''MessageBox.Show("该项目已分配了!新增专业可点击项目查询.","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
'Else
'e.Form.Controls("项目分配").Enabled = True
'End If
'drnew("") = e.Form.Controls("TextBox").value
'DataTables("图纸放行台帐").LoadFilter = "[_Identify] Is Null"
'DataTables("图纸放行台帐").Load()
'If cjryval Is Nothing Then
'num2 = 0
'Else
'num2 = nmsry.Count
'End If
项目查询 控件的命令:
If DataTables.Contains("图纸放行台帐") = False Then
DataTables.Load("图纸放行台帐")
End If
Tables("图纸放行台帐").Filter = "[_Identify] Is Null"
Dim dah As String = e.Form.Controls("TextBox9").value '档案号不重复
Dim fl As String
If dah Is Nothing Then
MessageBox.Show("""项目文件号:""" &" 不能为空!")
Return
Else
fl = "档案号 Like '" & dah & "%'"
DataTables("图纸放行台帐").LoadFilter = fl
DataTables("图纸放行台帐").Load()
Forms("项目查询").Open
End If
'MainTable = Tables("图纸放行台帐")