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

📄 frmclientinfo.frm

📁 来电显示客户管理系统 TAPI 应用MSComm控件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmClientInfo 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "客户信息"
   ClientHeight    =   3930
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   7320
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3930
   ScaleWidth      =   7320
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  'CenterOwner
   Begin VB.TextBox TxtDetail 
      Height          =   1215
      Left            =   1320
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   19
      Top             =   2040
      Width           =   5895
   End
   Begin VB.ComboBox CmbClientGroup 
      Height          =   315
      Left            =   4440
      TabIndex        =   18
      Text            =   "CmbClientGroup"
      Top             =   240
      Width           =   2655
   End
   Begin VB.TextBox TxtPhone 
      Height          =   285
      Left            =   5280
      TabIndex        =   15
      Text            =   "TxtPhone"
      Top             =   1680
      Width           =   1935
   End
   Begin VB.TextBox TxtMobile 
      Height          =   285
      Left            =   1320
      TabIndex        =   14
      Text            =   "TxtMobile"
      Top             =   1680
      Width           =   2415
   End
   Begin VB.TextBox TxtDuty 
      Height          =   285
      Left            =   6000
      TabIndex        =   13
      Text            =   "TxtDuty"
      Top             =   1200
      Width           =   1095
   End
   Begin VB.TextBox TxtCompany 
      Height          =   285
      Left            =   1680
      TabIndex        =   12
      Text            =   "TxtCompany"
      Top             =   1200
      Width           =   3495
   End
   Begin VB.TextBox TxtCall 
      Height          =   285
      Left            =   4440
      TabIndex        =   11
      Text            =   "TxtCall"
      Top             =   720
      Width           =   2655
   End
   Begin VB.TextBox TxtName 
      Height          =   285
      Left            =   1320
      TabIndex        =   10
      Text            =   "TxtName"
      Top             =   720
      Width           =   1455
   End
   Begin VB.Image Image4 
      Height          =   300
      Left            =   4080
      Picture         =   "FrmClientInfo.frx":0000
      Top             =   3480
      Width           =   300
   End
   Begin VB.Label LblCancel 
      BackStyle       =   0  'Transparent
      Caption         =   "取 消"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   4680
      MouseIcon       =   "FrmClientInfo.frx":041C
      MousePointer    =   99  'Custom
      TabIndex        =   17
      Top             =   3480
      Width           =   855
   End
   Begin VB.Image Image3 
      Height          =   300
      Left            =   2040
      Picture         =   "FrmClientInfo.frx":0726
      Top             =   3480
      Width           =   300
   End
   Begin VB.Label LblOK 
      BackStyle       =   0  'Transparent
      Caption         =   "确 定"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   2640
      MouseIcon       =   "FrmClientInfo.frx":0B42
      MousePointer    =   99  'Custom
      TabIndex        =   16
      Top             =   3480
      Width           =   735
   End
   Begin VB.Label LblID 
      AutoSize        =   -1  'True
      Caption         =   "LblID"
      Height          =   195
      Left            =   1440
      TabIndex        =   9
      Top             =   240
      Width           =   375
   End
   Begin VB.Label Label9 
      AutoSize        =   -1  'True
      Caption         =   "备注:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   480
      TabIndex        =   8
      Top             =   2160
      Width           =   765
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      Caption         =   "单位电话:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   3960
      TabIndex        =   7
      Top             =   1680
      Width           =   1275
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      Caption         =   "单位名称:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   480
      TabIndex        =   6
      Top             =   1200
      Width           =   1275
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "职务:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   5280
      TabIndex        =   5
      Top             =   1200
      Width           =   765
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "称呼:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   3480
      TabIndex        =   4
      Top             =   720
      Width           =   765
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "手机:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   480
      TabIndex        =   3
      Top             =   1680
      Width           =   765
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "姓名:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   480
      TabIndex        =   2
      Top             =   720
      Width           =   765
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "客户组:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   3360
      TabIndex        =   1
      Top             =   240
      Width           =   1020
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "序号:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   480
      TabIndex        =   0
      Top             =   240
      Width           =   765
   End
End
Attribute VB_Name = "FrmClientInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean

Private Sub Form_Load()

'载入气瓶型号供选择
  Dim i As Long
  Erase Arr_Item
  ReDim Arr_Item(0)
  
  '连接数据库
  MyDB.openDB
  
  '设置SQL语句
  SqlStmt = "SELECT * FROM Department "
  
  Dim RS As ADODB.Recordset
  '执行SQL语句
  Isexe = MyDB.exeSql(SqlStmt, RS, True)
    i = 0
  Do Until RS.EOF = True
    ReDim Preserve Arr_Item(i + 1)
    Arr_Item(i) = Trim(RS.Fields("Dep_name"))
    i = i + 1
    RS.MoveNext
  Loop
  
  If RS.RecordCount = 0 Then
  
  CmbClientGroup.AddItem "当前客户组可供选择"
  CmbClientGroup.ListIndex = 0
  Else
    CmbClientGroup.AddItem "请选择客户组"
  i = 0
  Do While Arr_Item(i) <> ""
    CmbClientGroup.AddItem Arr_Item(i)
  i = i + 1
  Loop

  CmbClientGroup.ListIndex = 0
  End If
  
 MyDB.closeDB







If Modify = False Then
LblID.Caption = ""
CmbClientGroup.ListIndex = 0
TxtName.Text = ""
TxtCall.Text = ""
TxtCompany.Text = ""
TxtDuty.Text = ""
TxtMobile.Text = ""
TxtPhone.Text = ""
TxtDetail.Text = ""
  Else
    With CurClient
    If .GetInfo(.Id) Then
    LblID.Caption = .Id
    CmbClientGroup.ListIndex = .ClientGroup
    TxtName.Text = .Name
    TxtCall.Text = .Caller
    TxtCompany.Text = .Company
    TxtDuty.Text = .Duty
    TxtMobile.Text = .Mobile
    TxtPhone.Text = .Phone
    TxtDetail.Text = .Detail
  
  End If
    End With
  End If
End Sub

Private Sub LblCancel_Click()
Unload Me
End Sub

Private Sub LblOK_Click()
With MyClient
  .Id = LblID.Caption
  .ClientGroup = CmbClientGroup.ListIndex
  .Name = Trim(TxtName.Text)
  .Caller = Trim(TxtCall.Text)
  .Company = Trim(TxtCompany.Text)
  .Duty = Trim(TxtDuty.Text)
  .Mobile = Trim(TxtMobile.Text)
  .Phone = Trim(TxtPhone.Text)
  .Detail = Trim(TxtDetail.Text)

If Modify = False Then
    .Insert
  Else
    .Update (CurClient.Id)
  End If
  
  End With
  
  Unload Me
End Sub

























⌨️ 快捷键说明

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