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

📄 linkman_input.frm

📁 小型客户管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Linkman_input 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "客户联系人信息"
   ClientHeight    =   5160
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   8535
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5160
   ScaleWidth      =   8535
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   495
      Left            =   7080
      TabIndex        =   33
      Top             =   4560
      Width           =   1215
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确认"
      Height          =   495
      Left            =   5880
      TabIndex        =   32
      Top             =   4560
      Width           =   1215
   End
   Begin VB.CheckBox Zlxr 
      Caption         =   "主联系人"
      Height          =   375
      Left            =   6840
      TabIndex        =   30
      Top             =   2760
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      Caption         =   "客户联系人信息"
      Height          =   4335
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   8295
      Begin VB.TextBox Bz 
         Height          =   1000
         Left            =   1200
         MultiLine       =   -1  'True
         TabIndex        =   31
         Top             =   3120
         Width           =   6800
      End
      Begin VB.TextBox Jtdz 
         Height          =   375
         Left            =   1200
         TabIndex        =   29
         Top             =   2640
         Width           =   5295
      End
      Begin VB.TextBox Dzyj 
         Height          =   375
         Left            =   3720
         TabIndex        =   28
         Top             =   2160
         Width           =   2775
      End
      Begin VB.TextBox Qq 
         Height          =   375
         Left            =   1200
         TabIndex        =   27
         Top             =   2160
         Width           =   1500
      End
      Begin VB.TextBox Msn 
         Height          =   375
         Left            =   6480
         TabIndex        =   26
         Top             =   1680
         Width           =   1500
      End
      Begin VB.TextBox Sj 
         Height          =   375
         Left            =   3720
         TabIndex        =   25
         Top             =   1680
         Width           =   1500
      End
      Begin VB.TextBox Jtdh 
         Height          =   375
         Left            =   1200
         TabIndex        =   24
         Top             =   1680
         Width           =   1500
      End
      Begin VB.TextBox Bgdh 
         Height          =   375
         Left            =   6480
         TabIndex        =   23
         Top             =   1200
         Width           =   1500
      End
      Begin VB.TextBox Zw 
         Height          =   375
         Left            =   3720
         TabIndex        =   22
         Top             =   1200
         Width           =   1500
      End
      Begin VB.TextBox Bm 
         Height          =   390
         Left            =   1200
         TabIndex        =   13
         Top             =   1200
         Width           =   1500
      End
      Begin VB.TextBox Csny 
         Height          =   375
         Left            =   6480
         TabIndex        =   12
         Text            =   "1900-01-01"
         Top             =   720
         Width           =   1500
      End
      Begin VB.ComboBox Xb 
         Height          =   300
         Left            =   3720
         Style           =   2  'Dropdown List
         TabIndex        =   11
         Top             =   720
         Width           =   1500
      End
      Begin VB.TextBox Xm 
         Height          =   375
         Left            =   1200
         TabIndex        =   1
         Top             =   720
         Width           =   1500
      End
      Begin VB.Label Label15 
         Caption         =   "备注"
         Height          =   255
         Left            =   240
         TabIndex        =   21
         Top             =   3120
         Width           =   795
      End
      Begin VB.Label Label14 
         Caption         =   "家庭地址"
         Height          =   255
         Left            =   240
         TabIndex        =   20
         Top             =   2670
         Width           =   795
      End
      Begin VB.Label Label13 
         Caption         =   "QQ"
         Height          =   255
         Left            =   240
         TabIndex        =   19
         Top             =   2190
         Width           =   795
      End
      Begin VB.Label Label12 
         Caption         =   "MSN"
         Height          =   255
         Left            =   5400
         TabIndex        =   18
         Top             =   1710
         Width           =   795
      End
      Begin VB.Label Label11 
         Caption         =   "电子邮件"
         Height          =   255
         Left            =   2760
         TabIndex        =   17
         Top             =   2190
         Width           =   795
      End
      Begin VB.Label Label10 
         Caption         =   "手机"
         Height          =   255
         Left            =   2760
         TabIndex        =   16
         Top             =   1710
         Width           =   795
      End
      Begin VB.Label Label9 
         Caption         =   "家庭电话"
         Height          =   255
         Left            =   240
         TabIndex        =   15
         Top             =   1710
         Width           =   795
      End
      Begin VB.Label Label8 
         Caption         =   "办公电话"
         Height          =   255
         Left            =   5400
         TabIndex        =   14
         Top             =   1230
         Width           =   795
      End
      Begin VB.Label Label1 
         Caption         =   "客户编号"
         Height          =   255
         Left            =   240
         TabIndex        =   10
         Top             =   360
         Width           =   800
      End
      Begin VB.Label Label2 
         Caption         =   "客户名称"
         Height          =   255
         Left            =   2520
         TabIndex        =   9
         Top             =   360
         Width           =   795
      End
      Begin VB.Label Label3 
         Caption         =   "姓名"
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   750
         Width           =   795
      End
      Begin VB.Label Label4 
         Caption         =   "部门"
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   1230
         Width           =   795
      End
      Begin VB.Label Label5 
         Caption         =   "职务"
         Height          =   255
         Left            =   2760
         TabIndex        =   6
         Top             =   1230
         Width           =   795
      End
      Begin VB.Label Label6 
         Caption         =   "性别"
         Height          =   255
         Left            =   2760
         TabIndex        =   5
         Top             =   750
         Width           =   795
      End
      Begin VB.Label Label7 
         Caption         =   "出生年月"
         Height          =   255
         Left            =   5400
         TabIndex        =   4
         Top             =   750
         Width           =   795
      End
      Begin VB.Label khbh 
         Caption         =   "客户编号"
         Height          =   255
         Left            =   1200
         TabIndex        =   3
         Top             =   360
         Width           =   975
      End
      Begin VB.Label khmc 
         Caption         =   "客户名称"
         Height          =   255
         Left            =   3480
         TabIndex        =   2
         Top             =   360
         Width           =   4500
      End
   End
End
Attribute VB_Name = "Linkman_input"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
Unload Me
End Sub

Private Sub cmdOK_Click()
Dim Sqlstring As String
Sqlstring = ""

Select Case OperateState
       Case "add"
            Sqlstring = "insert into Linkman_DATA (客户编号,姓名,性别,出生年月,部门,职务,办公电话,家庭电话,手机,MSN,QQ,电子邮件,家庭地址,备注,主联系人) values(" _
                      & ClientCode & ",'" & Xm.Text & "','" & Xb.Text & "','" & Csny.Text & "','" & Bm.Text & "','" & Zw.Text & "','" & Bgdh.Text & "','" _
                      & Jtdh.Text & "','" & Sj.Text & "','" & Msn.Text & "','" & Qq.Text & "','" & Dzyj.Text & "','" _
                      & Jtdz.Text & "','" & Bz.Text & "'," & Zlxr.Value & ")"
            'Sqlstring = "insert into Client_BASE (客户名称) values('aaa')"
            If Xm.Text <> "" Then
               MainDB.Execute (Sqlstring)
               Unload Me
            Else
               MsgBox "请输入联系人姓名", vbExclamation, "警告"
            End If
       Case "modify"
            Sqlstring = "update Linkman_DATA set " _
                                                  & "姓名='" & Xm.Text & "'," _
                                                  & "性别='" & Xb.Text & "'," _
                                                  & "出生年月='" & Csny.Text & "'," _
                                                  & "部门='" & Bm.Text & "'," _
                                                  & "职务='" & Zw.Text & "'," _
                                                  & "办公电话='" & Bgdh.Text & "'," _
                                                  & "家庭电话='" & Jtdh.Text & "'," _
                                                  & "手机='" & Sj.Text & "'," _
                                                  & "MSN='" & Msn.Text & "'," _
                                                  & "QQ='" & Qq.Text & "'," _
                                                  & "电子邮件='" & Dzyj.Text & "'," _
                                                  & "家庭地址='" & Jtdz.Text & "'," _
                                                  & "备注='" & Bz.Text & "'," _
                                                  & "主联系人=" & Zlxr.Value _
                         & " where 客户编号=" & ClientCode & " and 数据编号=" & DataCode
            If ClientCode > 0 Then
               MainDB.Execute (Sqlstring)
               Unload Me
            End If
End Select

Set MainRS = Nothing
MainRS.Open "select * from " & OperateDB & " where 客户编号=" & ClientCode, MainDB, adOpenStatic, adLockOptimistic
Set Data_list.Adodc1.Recordset = MainRS

End Sub

Private Sub Form_Load()
Xb.AddItem "男"
Xb.AddItem "女"

khbh.Caption = ClientCode
Khmc.Caption = ClientName

If OperateState = "modify" Then
   Call Read_Data
End If

End Sub

Private Sub Form_Unload(Cancel As Integer)
MDIForm1.Enabled = True
End Sub

'读取修改数据
Private Sub Read_Data()
Dim I As Integer

Xm.Text = MainRS!姓名

If MainRS!性别 <> "" Then
For I = 0 To Xb.ListCount
    Xb.ListIndex = I
    If MainRS!性别 = Xb.Text Then
       Exit For
    End If
Next I
End If

Csny.Text = MainRS!出生年月
Bm.Text = MainRS!部门
Zw.Text = MainRS!职务
Bgdh.Text = MainRS!办公电话
Jtdh.Text = MainRS!家庭电话
Sj.Text = MainRS!手机
Msn.Text = MainRS!Msn
Qq.Text = MainRS!Qq
Dzyj.Text = MainRS!电子邮件
Bz.Text = MainRS!备注
If MainRS!主联系人 Then
   Zlxr.Value = 1
Else
   Zlxr.Value = 0
End If
End Sub

⌨️ 快捷键说明

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