扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:黎宇 来源:yesky 2007年10月15日
关键字:
tChange表 |
tSub表 |
Public WithEvents Label2 As System.Windows.Forms.Label Public WithEvents txt4 As System.Windows.Forms.ComboBox … |
Public Shared gCls As New CData() Public gIsUpdate as Boolean |
Public Shadows Sub FrmModel_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load gCls.DB.ConnOracle("GDZC", "liyu", "123") gCls.FillGrid(Me.DataGrid1) End Sub |
Private Sub DataGrid1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.CurrentCellChanged Dim RowIndex As Int16 RowIndex = DataGrid1.CurrentRowIndex gCls.DataGridToText(Me) gCls.SystemID = DataGrid1.Item(RowIndex, 0) gIsUpdate = True End Sub |
Private Sub ToolBar1_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick Select Case e.Button.Text Case "增加" gIsUpdate = False Case "保存" WriteDateToArray() If gIsUpdate Then gCls.Update() Exit Select Else gCls.Insert() End If Case "删除" If MsgBox ("真的删除该数据吗?(Y/N)") = 7 Then Return End If gCls.Delete() Case "退出" Me.Close() Exit Sub End Select gCls.FillGrid(DataGrid1) End Sub '把输入的数据用对象数组保存起来 Public Overridable Sub WriteDateToArray() Dim i As Int16 Dim obj As Control For i = 1 To gCls.FieldCount - 1 For Each obj In Me.Controls If obj.TabIndex = i Then gCls.ObjFields(i) = obj.Text Exit For End If Next Next gCls.ObjFields(0) = gCls.DB.GetMaxID(gCls.UpdateTable, "FSYSTEMID") + 1 End Sub |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者