form7.frm
来自「一个商业软件的源码」· FRM 代码 · 共 513 行 · 第 1/2 页
FRM
513 行
EdgeColor = 16777088
BorderColor = 65535
End
Begin CurtButton多风格按钮控件.CurtButton CurtButton2
Height = 375
Left = 1200
TabIndex = 7
Top = 360
Width = 855
_ExtentX = 1508
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Picture = "Form7.frx":0396
Caption = "删除(&D)"
BackColor = 65280
EdgeColor = 16777088
BorderColor = 65535
End
Begin CurtButton多风格按钮控件.CurtButton CurtButton1
Height = 375
Left = 120
TabIndex = 8
Top = 360
Width = 855
_ExtentX = 1508
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Picture = "Form7.frx":03B2
Caption = "增加(&A)"
BackColor = 65280
EdgeColor = 16777088
BorderColor = 65535
End
Begin CurtButton多风格按钮控件.CurtButton CurtButton9
Height = 375
Left = 3360
TabIndex = 9
Top = 360
Width = 855
_ExtentX = 1508
_ExtentY = 661
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Picture = "Form7.frx":03CE
Caption = "取消(&C)"
BackColor = 65280
Enabled = 0 'False
EdgeColor = 16777088
BorderColor = 65535
End
End
Begin TabDlg.SSTab SSTab1
Height = 300
Left = 0
TabIndex = 0
Top = 0
Width = 9015
_ExtentX = 15901
_ExtentY = 529
_Version = 393216
Tabs = 8
TabsPerRow = 8
TabHeight = 520
BackColor = 16744576
TabCaption(0) = "所在区域"
TabPicture(0) = "Form7.frx":03EA
Tab(0).ControlEnabled= -1 'True
Tab(0).ControlCount= 0
TabCaption(1) = "所属行业"
TabPicture(1) = "Form7.frx":0406
Tab(1).ControlEnabled= 0 'False
Tab(1).ControlCount= 0
TabCaption(2) = "客户类型"
TabPicture(2) = "Form7.frx":0422
Tab(2).ControlEnabled= 0 'False
Tab(2).ControlCount= 0
TabCaption(3) = "性别"
TabPicture(3) = "Form7.frx":043E
Tab(3).ControlEnabled= 0 'False
Tab(3).ControlCount= 0
TabCaption(4) = "客户等级"
TabPicture(4) = "Form7.frx":045A
Tab(4).ControlEnabled= 0 'False
Tab(4).ControlCount= 0
TabCaption(5) = "报备状况"
TabPicture(5) = "Form7.frx":0476
Tab(5).ControlEnabled= 0 'False
Tab(5).ControlCount= 0
TabCaption(6) = "联系周期"
TabPicture(6) = "Form7.frx":0492
Tab(6).ControlEnabled= 0 'False
Tab(6).ControlCount= 0
TabCaption(7) = "在职情况"
TabPicture(7) = "Form7.frx":04AE
Tab(7).ControlEnabled= 0 'False
Tab(7).ControlCount= 0
End
End
Attribute VB_Name = "Form7"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim xg As Boolean
Private Sub CurtButton1_Click()
Adodc1.Recordset.AddNew
CurtButton3.Caption = "保存(&S)"
CurtButton9.Enabled = True
DataGrid1.AllowUpdate = True
CurtButton4.Enabled = True
CurtButton5.Enabled = True
CurtButton6.Enabled = True
CurtButton7.Enabled = True
CurtButton2.Enabled = True
End Sub
Private Sub CurtButton2_Click()
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.Delete
Adodc1.Recordset.UpdateBatch
xg = True
If Adodc1.Recordset.RecordCount = 0 Then
CurtButton3.Enabled = False
CurtButton4.Enabled = False
CurtButton5.Enabled = False
CurtButton6.Enabled = False
CurtButton7.Enabled = False
CurtButton2.Enabled = False
CurtButton9.Enabled = False
End If
End If
End Sub
Private Sub CurtButton3_Click()
If CurtButton3.Caption = "编辑(&E)" Then
CurtButton3.Caption = "保存(&S)"
CurtButton9.Enabled = True
DataGrid1.AllowUpdate = True
Else
CurtButton3.Caption = "编辑(&E)"
Adodc1.Recordset.UpdateBatch
CurtButton9.Enabled = False
DataGrid1.AllowAddNew = False
DataGrid1.AllowUpdate = False
xg = True
End If
End Sub
Private Sub CurtButton4_Click()
If Not Adodc1.Recordset.BOF Then
Adodc1.Recordset.MoveFirst
End If
End Sub
Private Sub CurtButton5_Click()
If Not Adodc1.Recordset.BOF Then
Adodc1.Recordset.MovePrevious
Else
Adodc1.Recordset.MoveLast
End If
End Sub
Private Sub CurtButton6_Click()
If Not Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveNext
Else
Adodc1.Recordset.MoveFirst
End If
End Sub
Private Sub CurtButton7_Click()
If Not Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveLast
End If
End Sub
Private Sub CurtButton9_Click()
Adodc1.Recordset.CancelUpdate
CurtButton9.Enabled = False
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = cnnado.ConnectionString
Adodc1.RecordSource = "select * from szqy"
Set DataGrid1.DataSource = Adodc1
xg = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
If xg = True Then
Form4.tree = False
Form4.TreeView1.Nodes.Clear
Call Form4.khgl
End If
End Sub
Private Sub SSTab1_Click(PreviousTab As Integer)
Select Case SSTab1.Tab
Case 0
Adodc1.ConnectionString = cnnado.ConnectionString
Adodc1.RecordSource = "select * from szqy"
Case 1
Adodc1.ConnectionString = cnnado.ConnectionString
Adodc1.RecordSource = "select * from sshy"
Case 2
Adodc1.ConnectionString = cnnado.ConnectionString
Adodc1.RecordSource = "select * from khlx"
Case 3
Adodc1.ConnectionString = cnnado.ConnectionString
Adodc1.RecordSource = "select * from xb"
Case 4
Adodc1.ConnectionString = cnnado.ConnectionString
Adodc1.RecordSource = "select * from khdj"
Case 5
Adodc1.ConnectionString = cnnado.ConnectionString
Adodc1.RecordSource = "select * from bbzk"
Case 6
Adodc1.ConnectionString = cnnado.ConnectionString
Adodc1.RecordSource = "select * from lxzq"
Case 7
Adodc1.ConnectionString = cnnado.ConnectionString
Adodc1.RecordSource = "select * from zzqk"
End Select
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?