Form4.frm
资源名称:2005.rar [点击查看]
上传用户:salesll
上传日期:2014-07-25
资源大小:2665k
文件大小:7k
源码类别:
交通/航空行业
开发平台:
Others
- VERSION 5.00
- Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
- Begin VB.Form Form4
- BackColor = &H00FFFF80&
- Caption = "车辆维修"
- ClientHeight = 4290
- ClientLeft = 60
- ClientTop = 420
- ClientWidth = 5430
- LinkTopic = "Form4"
- ScaleHeight = 4290
- ScaleWidth = 5430
- StartUpPosition = 3 '窗口缺省
- Begin VB.CommandButton Command4
- Caption = "取消"
- Height = 495
- Left = 2760
- TabIndex = 9
- Top = 3600
- Width = 975
- End
- Begin MSAdodcLib.Adodc Adodc1
- Height = 495
- Left = 3720
- Top = 3600
- Width = 1695
- _ExtentX = 2990
- _ExtentY = 873
- ConnectMode = 0
- CursorLocation = 3
- IsolationLevel = -1
- ConnectionTimeout= 15
- CommandTimeout = 30
- CursorType = 3
- LockType = 3
- CommandType = 2
- CursorOptions = 0
- CacheSize = 50
- MaxRecords = 0
- BOFAction = 0
- EOFAction = 0
- ConnectStringType= 3
- Appearance = 1
- BackColor = 16777088
- ForeColor = -2147483640
- Orientation = 0
- Enabled = -1
- Connect = "DSN=cheliang"
- OLEDBString = ""
- OLEDBFile = ""
- DataSourceName = "cheliang"
- OtherAttributes = ""
- UserName = ""
- Password = ""
- RecordSource = "维修管理"
- Caption = "查询"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- _Version = 393216
- End
- Begin VB.CommandButton Command3
- Caption = "删除"
- Height = 495
- Left = 1800
- TabIndex = 8
- Top = 3600
- Width = 975
- End
- Begin VB.CommandButton Command2
- BackColor = &H00FFFFFF&
- Caption = "修改"
- Height = 495
- Left = 840
- TabIndex = 7
- Top = 3600
- Width = 975
- End
- Begin VB.CommandButton Command1
- Caption = "添加"
- Height = 495
- Left = 0
- TabIndex = 6
- Top = 3600
- Width = 855
- End
- Begin VB.TextBox Text3
- DataField = "维修费用"
- DataSource = "Adodc1"
- Height = 615
- Left = 1440
- TabIndex = 5
- Top = 2280
- Width = 3735
- End
- Begin VB.TextBox Text2
- DataField = "维修日期"
- DataSource = "Adodc1"
- Height = 615
- Left = 1440
- TabIndex = 3
- Top = 1200
- Width = 3735
- End
- Begin VB.TextBox Text1
- DataField = "车牌号码"
- DataSource = "Adodc1"
- Height = 615
- Left = 1440
- TabIndex = 1
- Top = 240
- Width = 3735
- End
- Begin VB.Label Label3
- BackColor = &H00FFFF80&
- Caption = "维修费用:"
- BeginProperty Font
- Name = "宋体"
- Size = 15
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 615
- Left = 120
- TabIndex = 4
- Top = 2280
- Width = 1575
- End
- Begin VB.Label Label2
- BackColor = &H00FFFF80&
- Caption = "维修时间:"
- BeginProperty Font
- Name = "宋体"
- Size = 15
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 615
- Left = 120
- TabIndex = 2
- Top = 1200
- Width = 1695
- End
- Begin VB.Label Label1
- BackColor = &H00FFFF80&
- Caption = "车牌号码:"
- BeginProperty Font
- Name = "宋体"
- Size = 15
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 615
- Left = 120
- TabIndex = 0
- Top = 240
- Width = 1695
- End
- End
- Attribute VB_Name = "Form4"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Command1_Click()
- Dim rs As ADODB.Command
- Dim str As String
- Call open_db
- str = "insert into 维修管理(车牌号码,维修日期,维修费用)"
- str = str & "Values('" & Text1 & "','" & Text2 & "','" & Text3 & "')"
- Set rs = New ADODB.Command
- Set rs.ActiveConnection = adocon
- rs.CommandText = str
- rs.Execute
- Set rs = Nothing
- adocon.Close
- Set adocon = Nothing
- Call close_db
- MsgBox "添加成功!", , vbOKOnly
- End Sub
- Private Sub Command2_Click()
- Dim rs As ADODB.Command
- Dim str As String
- Set rs = New ADODB.Command
- Call open_db
- str = "update 维修管理 set 车牌号码= '" & Text1 & "' ,维修日期='" & Text2 & "',维修费用='" & Text3 & "' where 车牌号码= '" & Text1 & "'"
- Set rs.ActiveConnection = adocon
- rs.CommandText = str
- rs.Execute
- Set rs = Nothing
- adocon.Close
- Set adocon = Nothing
- Call close_db
- MsgBox "修改成功!", , vbOKOnly
- End Sub
- Private Sub Command3_Click()
- Dim rs As ADODB.Command
- Dim str As String
- Set rs = New ADODB.Command
- Call open_db
- str = "delete from 维修管理 where 车牌号码= '" & Text1 & "'"
- Set rs.ActiveConnection = adocon
- rs.CommandText = str
- rs.Execute
- Set rs = Nothing
- docon.Close
- Set adocon = Nothing
- Call close_db
- MsgBox "删除成功!", , vbOKOnly
- End Sub
- Private Sub Command4_Click()
- Unload Me
- End Sub