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

📄 data_list.frm

📁 小型客户管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Begin VB.Form Data_list 
   Caption         =   "客户信息"
   ClientHeight    =   6810
   ClientLeft      =   3165
   ClientTop       =   2940
   ClientWidth     =   10440
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   6810
   ScaleWidth      =   10440
   WindowState     =   2  'Maximized
   Begin VB.CommandButton cmdQuery 
      Caption         =   "查询"
      Height          =   375
      Left            =   8280
      TabIndex        =   6
      Top             =   4440
      Width           =   1000
   End
   Begin VB.CommandButton cmdRefresh 
      Caption         =   "刷新"
      Height          =   375
      Left            =   7200
      TabIndex        =   5
      Top             =   4440
      Width           =   1000
   End
   Begin VB.CommandButton cmdDelete 
      Caption         =   "删除"
      Height          =   375
      Left            =   6120
      TabIndex        =   4
      Top             =   4440
      Width           =   1000
   End
   Begin VB.CommandButton cmdModify 
      Caption         =   "修改"
      Height          =   375
      Left            =   5040
      TabIndex        =   3
      Top             =   4440
      Width           =   1000
   End
   Begin VB.CommandButton cmdAdd 
      Caption         =   "新增"
      Height          =   375
      Left            =   3960
      TabIndex        =   2
      Top             =   4440
      Width           =   1000
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "Data_list.frx":0000
      Height          =   735
      Left            =   120
      TabIndex        =   1
      Top             =   480
      Width           =   1575
      _ExtentX        =   2778
      _ExtentY        =   1296
      _Version        =   393216
      AllowUpdate     =   0   'False
      HeadLines       =   1
      RowHeight       =   15
      TabAction       =   2
      WrapCellPointer =   -1  'True
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   120
      Top             =   4440
      Width           =   3735
      _ExtentX        =   6588
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   0
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin TabDlg.SSTab SSTab1 
      Height          =   3735
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   7485
      _ExtentX        =   13203
      _ExtentY        =   6588
      _Version        =   393216
      Tabs            =   6
      TabsPerRow      =   6
      TabHeight       =   520
      TabCaption(0)   =   "基本信息"
      TabPicture(0)   =   "Data_list.frx":0015
      Tab(0).ControlEnabled=   -1  'True
      Tab(0).ControlCount=   0
      TabCaption(1)   =   "联系人信息"
      TabPicture(1)   =   "Data_list.frx":0031
      Tab(1).ControlEnabled=   0   'False
      Tab(1).ControlCount=   0
      TabCaption(2)   =   "联系信息"
      TabPicture(2)   =   "Data_list.frx":004D
      Tab(2).ControlEnabled=   0   'False
      Tab(2).ControlCount=   0
      TabCaption(3)   =   "销售数据"
      TabPicture(3)   =   "Data_list.frx":0069
      Tab(3).ControlEnabled=   0   'False
      Tab(3).ControlCount=   0
      TabCaption(4)   =   "文档信息"
      TabPicture(4)   =   "Data_list.frx":0085
      Tab(4).ControlEnabled=   0   'False
      Tab(4).ControlCount=   0
      TabCaption(5)   =   "变更信息"
      TabPicture(5)   =   "Data_list.frx":00A1
      Tab(5).ControlEnabled=   0   'False
      Tab(5).ControlCount=   0
   End
End
Attribute VB_Name = "Data_list"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Adodc1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
If MainRS.RecordCount = 0 Then
   Adodc1.Caption = "第0条,共0条"
Else
   Adodc1.Caption = "第" & MainRS.AbsolutePosition & "条,共" & MainRS.RecordCount & "条"
End If

If OperateCode = 0 Then
   If Not MainRS.BOF And Not MainRS.EOF Then
      ClientCode = MainRS!客户编号
      ClientName = MainRS!客户名称
   End If
End If

End Sub

Private Sub cmdAdd_Click()
OperateState = "add"
MDIForm1.Enabled = False
Call Transfer_Windows
End Sub

Private Sub cmdDelete_Click()
If MainRS.RecordCount > 0 Then
   If MsgBox("确认删除", vbYesNo, "确认信息") = vbYes Then
      MainRS.Delete
      Set MainRS = Nothing
      MainRS.Open MainSQL, MainDB, adOpenStatic, adLockOptimistic
      Set Adodc1.Recordset = MainRS
   End If
Else
   MsgBox "数据库已为空", vbExclamation, "警告"
End If
End Sub

Private Sub cmdModify_Click()
If MainRS.RecordCount > 0 Then
   OperateState = "modify"
   MDIForm1.Enabled = False
   Call Transfer_Windows
Else
   MsgBox "数据库已为空", vbExclamation, "警告"
End If
End Sub

Private Sub cmdQuery_Click()
If MainRS.RecordCount > 0 Then
   MDIForm1.Enabled = False
   Client_Query.Show
Else
   MsgBox "数据库已为空", vbExclamation, "警告"
End If
End Sub

Private Sub cmdRefresh_Click()
Set MainRS = Nothing
MainRS.Open MainSQL, MainDB, adOpenStatic, adLockOptimistic
Set Adodc1.Recordset = MainRS
End Sub

Private Sub Form_Load()
Set MainRS = Nothing
MainSQL = "select * from Client_BASE where 所属人员='" & UserName & "'"
MainRS.Open MainSQL, MainDB, adOpenStatic, adLockOptimistic
Set Adodc1.Recordset = MainRS
OperateDB = "Client_BASE"
MDIForm1.StatusBar1.Panels(2).Text = "基本信息"
DataGrid1.Columns(0).Locked = True
End Sub

Private Sub Form_Resize()
SSTab1.Width = Me.Width - 120
SSTab1.Height = Me.Height * 0.8
 
Adodc1.Top = Me.Height * 0.8 + 300
cmdAdd.Top = Me.Height * 0.8 + 300
cmdModify.Top = Me.Height * 0.8 + 300
cmdDelete.Top = Me.Height * 0.8 + 300
cmdRefresh.Top = Me.Height * 0.8 + 300
cmdQuery.Top = Me.Height * 0.8 + 300

DataGrid1.Width = SSTab1.Width
DataGrid1.Left = SSTab1.Left
DataGrid1.Width = SSTab1.Width
If Me.Height * 0.8 > 800 Then
   DataGrid1.Height = Me.Height * 0.8 - 800
Else
   DataGrid1.Height = Me.Height * 0.8
End If
End Sub

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

Private Sub SSTab1_Click(PreviousTab As Integer)
Set MainRS = Nothing
Select Case SSTab1.Tab
       Case 0
          MainSQL = "select * from Client_BASE where 所属人员='" & UserName & "'"
          MainRS.Open MainSQL, MainDB, adOpenStatic, adLockOptimistic
          OperateCode = 0
          OperateDB = "Client_BASE"
          MDIForm1.StatusBar1.Panels(2).Text = "基本信息"
          cmdAdd.Enabled = True
          cmdModify.Enabled = True
          cmdDelete.Enabled = True
          cmdQuery.Enabled = True
       Case 1
          MainSQL = "select * from Linkman_DATA where 客户编号=" & ClientCode
          MainRS.Open MainSQL, MainDB, adOpenStatic, adLockOptimistic
          OperateCode = 1
          OperateDB = "Linkman_DATA"
          MDIForm1.StatusBar1.Panels(2).Text = "联系人信息"
          cmdAdd.Enabled = True
          cmdModify.Enabled = True
          cmdDelete.Enabled = True
          cmdQuery.Enabled = False
       Case 2
          MainSQL = "select * from Contact_DATA where 客户编号=" & ClientCode
          MainRS.Open MainSQL, MainDB, adOpenStatic, adLockOptimistic
          OperateCode = 2
          OperateDB = "Contact_DATA"
          MDIForm1.StatusBar1.Panels(2).Text = "联系信息"
          cmdAdd.Enabled = True
          cmdModify.Enabled = True
          cmdDelete.Enabled = True
          cmdQuery.Enabled = False
       Case 3
          MainSQL = "select * from Sales_DATA where 客户编号=" & ClientCode
          MainRS.Open MainSQL, MainDB, adOpenStatic, adLockOptimistic
          OperateCode = 3
          OperateDB = "Sales_DATA"
          MDIForm1.StatusBar1.Panels(2).Text = "销售信息"
          cmdAdd.Enabled = True
          cmdModify.Enabled = True
          cmdDelete.Enabled = True
          cmdQuery.Enabled = False
       Case 4
          MainSQL = "select * from Files_DATA where 客户编号=" & ClientCode
          MainRS.Open MainSQL, MainDB, adOpenStatic, adLockOptimistic
          OperateCode = 4
          OperateDB = "Files_DATA"
          MDIForm1.StatusBar1.Panels(2).Text = "文档信息"
          cmdAdd.Enabled = True
          cmdModify.Enabled = True
          cmdDelete.Enabled = True
          cmdQuery.Enabled = False
       Case 5
          MainSQL = "select * from Principal_Change where 客户编号=" & ClientCode
          MainRS.Open MainSQL, MainDB, adOpenStatic, adLockOptimistic
          OperateCode = 5
          OperateDB = "Principal_Change"
          MDIForm1.StatusBar1.Panels(2).Text = "变更信息"
          cmdAdd.Enabled = False
          cmdModify.Enabled = False
          cmdDelete.Enabled = False
          cmdQuery.Enabled = False
End Select

Set Adodc1.Recordset = MainRS
DataGrid1.Columns(0).Locked = True
End Sub

Private Sub Transfer_Windows()
Select Case OperateCode
       Case 0
          Client_input.Show
       Case 1
          If MainRS.RecordCount > 0 Then
             DataCode = MainRS!数据编号
          End If
          Linkman_input.Show
       Case 2
          If MainRS.RecordCount > 0 Then
             DataCode = MainRS!数据编号
          End If
          Contact_input.Show
       Case 3
          MsgBox "待建", vbInformation, "信息提示"
          MDIForm1.Enabled = True
       Case 4
          If MainRS.RecordCount > 0 Then
             DataCode = MainRS!数据编号
          End If
          Files_input.Show
       Case 5
          MsgBox "待建", vbInformation, "信息提示"
End Select
End Sub

⌨️ 快捷键说明

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