?? frm_khxxwh_hjzx.frm
字號:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form Frm_Khxxwh_Hjzx
Caption = "客戶呼叫中心"
ClientHeight = 3870
ClientLeft = 60
ClientTop = 345
ClientWidth = 5940
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
ScaleHeight = 3870
ScaleWidth = 5940
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame3
Height = 630
Left = 30
TabIndex = 4
Top = 3195
Width = 5835
Begin VB.CommandButton Cmd_Exit
Caption = "退出"
Height = 350
Left = 4395
TabIndex = 8
Top = 180
Width = 1335
End
Begin VB.CommandButton Cmd_Lxr
Caption = "聯(lián)系人信息"
Height = 345
Left = 2955
TabIndex = 7
Top = 180
Width = 1300
End
Begin VB.CommandButton Cmd_Kh
Caption = "客戶詳細(xì)信息"
Height = 350
Left = 1530
TabIndex = 6
Top = 180
Width = 1300
End
Begin VB.CommandButton Cmd_Hj
Caption = "開始呼叫"
Height = 350
Left = 120
TabIndex = 5
Top = 180
Width = 1300
End
End
Begin VB.Frame Frame2
Caption = "客戶簡單信息"
Height = 2625
Left = 15
TabIndex = 3
Top = 570
Width = 5835
Begin MSCommLib.MSComm MSComm1
Left = 1020
Top = 1920
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = -1 'True
End
Begin VB.TextBox Text1
Height = 330
Index = 9
Left = 3675
TabIndex = 28
Top = 2175
Width = 2025
End
Begin VB.TextBox Text1
Height = 330
Index = 8
Left = 990
TabIndex = 27
Top = 2190
Width = 1680
End
Begin VB.TextBox Text1
Height = 330
Index = 7
Left = 3675
TabIndex = 26
Top = 1785
Width = 2040
End
Begin VB.TextBox Text1
Height = 330
Index = 6
Left = 990
TabIndex = 25
Top = 1800
Width = 1680
End
Begin VB.TextBox Text1
Height = 330
Index = 5
Left = 990
TabIndex = 24
Top = 1410
Width = 4725
End
Begin VB.TextBox Text1
Height = 330
Index = 4
Left = 3675
TabIndex = 23
Top = 1005
Width = 2040
End
Begin VB.TextBox Text1
Height = 330
Index = 3
Left = 990
TabIndex = 22
Top = 1005
Width = 1695
End
Begin VB.TextBox Text1
Height = 330
Index = 2
Left = 990
TabIndex = 21
Top = 615
Width = 4725
End
Begin VB.TextBox Text1
Height = 330
Index = 1
Left = 3675
TabIndex = 20
Top = 225
Width = 2055
End
Begin VB.TextBox Text1
Height = 330
Index = 0
Left = 990
TabIndex = 10
Top = 240
Width = 1710
End
Begin VB.Label Label2
Caption = "聯(lián)系人電話"
Height = 165
Index = 9
Left = 2730
TabIndex = 19
Top = 2235
Width = 1200
End
Begin VB.Label Label2
Caption = "聯(lián)系人"
Height = 165
Index = 8
Left = 135
TabIndex = 18
Top = 2250
Width = 1140
End
Begin VB.Label Label2
Caption = "客戶IC卡號"
Height = 210
Index = 7
Left = 2730
TabIndex = 17
Top = 1845
Width = 1035
End
Begin VB.Label Label2
Caption = "納稅號"
Height = 165
Index = 6
Left = 135
TabIndex = 16
Top = 1845
Width = 840
End
Begin VB.Label Label2
Caption = "銀行帳號"
Height = 165
Index = 5
Left = 135
TabIndex = 15
Top = 1440
Width = 840
End
Begin VB.Label Label2
Caption = "開戶銀行"
Height = 165
Index = 4
Left = 2745
TabIndex = 14
Top = 1095
Width = 840
End
Begin VB.Label Label2
Caption = "法人代表"
Height = 165
Index = 3
Left = 150
TabIndex = 13
Top = 1050
Width = 840
End
Begin VB.Label Label2
Caption = "企業(yè)地址"
Height = 195
Index = 2
Left = 150
TabIndex = 12
Top = 660
Width = 840
End
Begin VB.Label Label2
Caption = "客戶名稱"
Height = 165
Index = 1
Left = 2775
TabIndex = 11
Top = 315
Width = 840
End
Begin VB.Label Label2
Caption = "客戶編號"
Height = 165
Index = 0
Left = 165
TabIndex = 9
Top = 330
Width = 840
End
End
Begin VB.Frame Frame1
Height = 570
Left = 15
TabIndex = 0
Top = -15
Width = 5835
Begin VB.ComboBox Cbx_Khdh
Height = 300
ItemData = "Frm_Khxxwh_Hjzx.frx":0000
Left = 2775
List = "Frm_Khxxwh_Hjzx.frx":0002
TabIndex = 2
Text = "Cbx_Khdh"
Top = 180
Width = 2910
End
Begin VB.Label Label1
Caption = "請輸入或選擇客戶公司電話:"
Height = 240
Left = 120
TabIndex = 1
Top = 240
Width = 2280
End
End
End
Attribute VB_Name = "Frm_Khxxwh_Hjzx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer
Private Sub Cbx_Khdh_Click()
Dim rs2 As New ADODB.Recordset
rs2.Open "select * from tb_khxx where khxx_gsdh ='" + Cbx_Khdh.Text + "'", cnn, adOpenKeyset
If rs2.RecordCount > 0 Then
Text1(0).Text = rs2.Fields("khxx_id")
Text1(1).Text = rs2.Fields("khxx_mc")
Text1(2).Text = rs2.Fields("khxx_qydz")
Text1(3).Text = rs2.Fields("khxx_frdb")
Text1(4).Text = rs2.Fields("khxx_khyh")
Text1(5).Text = rs2.Fields("khxx_yhzh")
Text1(6).Text = rs2.Fields("khxx_nsh")
Text1(7).Text = rs2.Fields("khxx_ICcard")
Text1(8).Text = rs2.Fields("khxx_lxr")
Text1(9).Text = rs2.Fields("khxx_lxrdh")
End If
rs2.Close
End Sub
Private Sub Cbx_Khdh_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Dim rs2 As New ADODB.Recordset
rs2.Open "select * from tb_khxx where khxx_gsdh ='" + Cbx_Khdh.Text + "'", cnn, adOpenKeyset
If rs2.RecordCount > 0 Then
Text1(0).Text = rs2.Fields("khxx_id")
Text1(1).Text = rs2.Fields("khxx_mc")
Text1(2).Text = rs2.Fields("khxx_qydz")
Text1(3).Text = rs2.Fields("khxx_frdb")
Text1(4).Text = rs2.Fields("khxx_khyh")
Text1(5).Text = rs2.Fields("khxx_yhzh")
Text1(6).Text = rs2.Fields("khxx_nsh")
Text1(7).Text = rs2.Fields("khxx_ICcard")
Text1(8).Text = rs2.Fields("khxx_lxr")
Text1(9).Text = rs2.Fields("khxx_lxrdh")
End If
rs2.Close
End If
End Sub
Private Sub Cmd_Exit_Click() '退出
Unload Me
End Sub
Private Sub Cmd_Hj_Click() '開始呼叫
If Cbx_Khdh.Text = "" Then '如果組合框為空
MsgBox "請您輸入電話號碼!", vbInformation, "客戶管理系統(tǒng)"
Cbx_Khdh.SetFocus '將焦點設(shè)置在組合框上
Else '否則
MSComm1.CommPort = 1 '設(shè)置通信端口號
MSComm1.Settings = "4800,N,8,1" '設(shè)置波特率、奇偶校驗位、數(shù)據(jù)位和停止位參數(shù)
MSComm1.PortOpen = True
MSComm1.Output = "ATDT" & Cbx_Khdh.Text & vbCr
MsgBox "請聽電話!", vbpuestion, "客戶管理系統(tǒng)"
MSComm1.PortOpen = False
End If
End Sub
Private Sub Cmd_Kh_Click() '調(diào)用客戶詳細(xì)信息
Dim rs3 As New ADODB.Recordset '定義數(shù)據(jù)集變量
'打開數(shù)據(jù)對象
rs3.Open "select * from tb_khxx where khxx_gsdh='" + Cbx_Khdh.Text + "'", cnn, adOpenKeyset
If rs3.RecordCount > 0 Then '如果數(shù)據(jù)記錄大于零
'將SQL語句賦給sql字符變量
sql = "select * from tb_khxx where khxx_gsdh='" + Cbx_Khdh.Text + "'"
'調(diào)用客戶信息窗體
Load Frm_Khxxwh_kh
Frm_Khxxwh_kh.Show 1
End If
End Sub
Private Sub Cmd_Lxr_Click() '調(diào)用聯(lián)系人詳細(xì)信息
Dim rs4 As New ADODB.Recordset
rs4.Open "select * from tb_Client_lxrxx where lxrxx_qymc='" + Text1(1).Text + "'", cnn, adOpenKeyset
If rs4.RecordCount > 0 Then
sql = "select * from tb_Client_lxrxx where lxrxx_qymc ='" + Text1(1).Text + "'"
Load Frm_Khxxwh_Lxr
Frm_Khxxwh_Lxr.Show 1
Else
MsgBox "沒有該公司聯(lián)系人的相關(guān)信息!", , "信息提示"
End If
End Sub
Private Sub Form_Load()
Dim rs1 As New ADODB.Recordset '定義數(shù)據(jù)集對象
rs1.Open "select * from tb_khxx ", cnn, adOpenKeyset '打開數(shù)據(jù)連接
If rs1.RecordCount > 0 Then '如果記錄數(shù)大于零
For i = 0 To rs1.RecordCount - 1 '從零開始到記錄數(shù)減1作循環(huán)
'向Cbx_Khdb組合框中添加數(shù)據(jù)項目
Cbx_Khdh.AddItem Trim(rs1.Fields("khxx_gsdh"))
rs1.MoveNext '數(shù)據(jù)對象向下移動一條記錄
Next i '循環(huán)加一
If Cbx_Khdh.ListCount > 0 Then '如果Cbx_Khdh中的數(shù)據(jù)項目數(shù)不為零
Cbx_Khdh.ListIndex = 0 '在Cbx_Khdh中顯示第一條數(shù)據(jù)項
Else '否則
Cbx_Khdh.Text = "請選擇" '顯示“請選擇”信息
End If
End If
rs1.Close '關(guān)閉數(shù)據(jù)集對象
'設(shè)置控件狀態(tài)
For i = 0 To Text1.UBound
Text1(i).Enabled = False
Next i
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
sql = "" '清空sql變量
End Sub
Private Sub Form_Unload(Cancel As Integer)
Frm_Main.Enabled = True
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -