【VB开源代码栏目提醒】:网学会员在VB开源代码频道为大家收集整理了FRMDZGL.FRM提供大家参考,希望对大家有所帮助!
VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmdzgl
BorderStyle = 3 'Fixed Dialog
Caption = "图书读者管理"
ClientHeight = 5760
ClientLeft = 45
ClientTop = 330
ClientWidth = 9195
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5760
ScaleWidth = 9195
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin MSAdodcLib.Adodc Adodc1
Height = 495
Left = 7080
Top = 480
Visible = 0 'False
Width = 1575
_ExtentX = 2778
_ExtentY = 873
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=BOOK;Data Source=MRSX05"
OLEDBString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=BOOK;Data Source=MRSX05"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Pass
word = ""
RecordSource = "select * from dzxxtb"
Caption = "Adodc1"
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.Frame Frame3
Height = 975
Left = 120
TabIndex = 11
Top = 4560
Width = 8895
Begin VB.CommandButton Command6
Caption = "退 出"
Height = 375
Left = 6960
TabIndex = 7
Top = 360
Width = 1215
End
Begin VB.CommandButton Command5
Caption = "查 询"
Height = 375
Left = 5280
TabIndex = 6
Top = 360
Width = 1215
End
Begin VB.CommandButton Command4
Caption = "删 除"
Height = 375
Left = 3600
TabIndex = 5
Top = 360
Width = 1215
End
Begin VB.CommandButton Command3
Caption = "修 改"
Height = 375
Left = 1920
TabIndex = 4
Top = 360
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "新 增"
Height = 375
Left = 240
TabIndex = 3
Top = 360
Width = 1215
End
End
Begin
VB.Frame Frame2
Height = 3375
Left = 120
TabIndex = 9
Top = 1200
Width = 8895
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "frmdzgl.frx":0000
Height = 2895
Left = 120
TabIndex = 10
Top = 240
Width = 8655
_ExtentX = 15266
_ExtentY = 5106
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
End
Begin VB.Frame Frame1
Height = 1095
Left = 120
TabIndex = 0
Top = 120
Width = 8895
Begin VB.CommandButton Command1
Caption = "查 询"
Height = 375
Left = 5160
TabIndex = 2
Top = 360
Width = 1335
End
Begin VB.TextBox Text1
Height = 375
Left = 2520
TabIndex = 1
Top = 360
Width = 1935
End
Begin VB.Label Label1
Caption = "读者编号:"
Height = 255
Left = 1200
TabIndex = 8
Top = 480
Width = 975
End
End
End
Attribute VB_Name = "frmdzgl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.RecordSource = "select * from dzxxtb where 读者编号='" & Text1.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
DataGrid1.Refresh
End If
End Sub
Private Sub Command2_Click()
frmdzxxgl.Show 1
End Sub
Private Sub Command3_Click()
frmdzupdate.Show 1
End Sub
Private Sub Command4_Click()
Dim i As String
i = MsgBox("是否删除此条记录!", vbYesNo + vbOKOnly, "提示")
If i = vbYes Then
Adodc1.Recordset.Delete
DataGrid1.Refresh
Adodc1.Refresh
MsgBox "成功删除此条记录!", vbOKOnly
Else
Adodc1.Records