⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frm_khxxwh_hjzx.frm

📁 本系统为客户管理系统 (1)本系统的数据库为SQL Server 2000
💻 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         =   "联系人信息"
         Height          =   345
         Left            =   2955
         TabIndex        =   7
         Top             =   180
         Width           =   1300
      End
      Begin VB.CommandButton Cmd_Kh 
         Caption         =   "客户详细信息"
         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         =   "联系人电话"
         Height          =   165
         Index           =   9
         Left            =   2730
         TabIndex        =   19
         Top             =   2235
         Width           =   1200
      End
      Begin VB.Label Label2 
         Caption         =   "联系人"
         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         =   "企业地址"
         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, "客户管理系统"
Cbx_Khdh.SetFocus   '将焦点设置在组合框上
Else    '否则
MSComm1.CommPort = 1 '设置通信端口号
MSComm1.Settings = "4800,N,8,1" '设置波特率、奇偶校验位、数据位和停止位参数
MSComm1.PortOpen = True
MSComm1.Output = "ATDT" & Cbx_Khdh.Text & vbCr
MsgBox "请听电话!", vbpuestion, "客户管理系统"
MSComm1.PortOpen = False
End If
End Sub

Private Sub Cmd_Kh_Click()  '调用客户详细信息
Dim rs3 As New ADODB.Recordset   '定义数据集变量
'打开数据对象
rs3.Open "select * from tb_khxx where khxx_gsdh='" + Cbx_Khdh.Text + "'", cnn, adOpenKeyset
If rs3.RecordCount > 0 Then   '如果数据记录大于零
  '将SQL语句赋给sql字符变量
  sql = "select * from tb_khxx where khxx_gsdh='" + Cbx_Khdh.Text + "'"
  '调用客户信息窗体
  Load Frm_Khxxwh_kh
  Frm_Khxxwh_kh.Show 1
End If
End Sub

Private Sub Cmd_Lxr_Click()  '调用联系人详细信息
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 "没有该公司联系人的相关信息!", , "信息提示"
End If
End Sub

Private Sub Form_Load()
Dim rs1 As New ADODB.Recordset    '定义数据集对象
rs1.Open "select * from tb_khxx ", cnn, adOpenKeyset   '打开数据连接
If rs1.RecordCount > 0 Then    '如果记录数大于零
   For i = 0 To rs1.RecordCount - 1   '从零开始到记录数减1作循环
      '向Cbx_Khdb组合框中添加数据项目
      Cbx_Khdh.AddItem Trim(rs1.Fields("khxx_gsdh"))
      rs1.MoveNext    '数据对象向下移动一条记录
   Next i   '循环加一
   If Cbx_Khdh.ListCount > 0 Then   '如果Cbx_Khdh中的数据项目数不为零
       Cbx_Khdh.ListIndex = 0   '在Cbx_Khdh中显示第一条数据项
   Else      '否则
       Cbx_Khdh.Text = "请选择"    '显示“请选择”信息
   End If
End If
rs1.Close   '关闭数据集对象
'设置控件状态
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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -