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

📄 huiyuanguanli.frm

📁 会员管理系统 功能自己扩展把! 如果有改进给我发一份quweijie8@126.com 这个比较适合初学者``` Q:151693707 msn:quweijie8@hotmail.com
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{9A226D6F-2658-4445-8D35-5C19D42676FE}#1.0#0"; "xp.ocx"
Begin VB.Form Form3 
   BackColor       =   &H00E7F7FF&
   Caption         =   "会员管理"
   ClientHeight    =   9405
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   15240
   ClipControls    =   0   'False
   ControlBox      =   0   'False
   LinkTopic       =   "Form3"
   MDIChild        =   -1  'True
   ScaleHeight     =   9405
   ScaleWidth      =   15240
   WindowState     =   2  'Maximized
   Begin MSComctlLib.ListView ListView1 
      Height          =   7695
      Left            =   2010
      TabIndex        =   11
      Top             =   1470
      Width           =   13275
      _ExtentX        =   23416
      _ExtentY        =   13573
      View            =   3
      LabelEdit       =   1
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      Appearance      =   1
      NumItems        =   0
   End
   Begin VB.CommandButton Command8 
      Caption         =   "其他操作"
      Height          =   375
      Left            =   9600
      TabIndex        =   10
      Top             =   1080
      Width           =   1275
   End
   Begin VB.CommandButton Command7 
      Caption         =   "会员续费(F5)"
      Height          =   375
      Left            =   7920
      TabIndex        =   9
      Top             =   1080
      Width           =   1275
   End
   Begin VB.CommandButton Command6 
      Caption         =   "删除会员(F4)"
      Height          =   375
      Left            =   6240
      TabIndex        =   8
      Top             =   1080
      Width           =   1275
   End
   Begin VB.CommandButton Command5 
      Caption         =   "修改信息(F3)"
      Height          =   375
      Left            =   4560
      TabIndex        =   7
      Top             =   1080
      Width           =   1275
   End
   Begin VB.CommandButton Command4 
      Caption         =   "添加会员(F2)"
      Height          =   375
      Left            =   2880
      TabIndex        =   6
      Top             =   1080
      Width           =   1275
   End
   Begin BSE_Engine.BSE BSE1 
      Left            =   3180
      Top             =   6960
      _ExtentX        =   6588
      _ExtentY        =   1085
   End
   Begin VB.CommandButton Command3 
      Caption         =   "会员查询"
      Height          =   495
      Left            =   300
      TabIndex        =   4
      Top             =   1620
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "会员管理"
      Height          =   495
      Left            =   300
      TabIndex        =   3
      Top             =   780
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "查询(&Q)"
      Height          =   375
      Left            =   7140
      TabIndex        =   2
      Top             =   420
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Height          =   315
      Left            =   4260
      TabIndex        =   1
      Top             =   480
      Width           =   2535
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Label8"
      Height          =   180
      Left            =   14100
      TabIndex        =   17
      Top             =   1200
      Width           =   540
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "总额:"
      Height          =   180
      Left            =   13560
      TabIndex        =   16
      Top             =   1200
      Width           =   540
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "Label6"
      Height          =   180
      Left            =   240
      TabIndex        =   15
      Top             =   5520
      Visible         =   0   'False
      Width           =   540
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      BackColor       =   &H005ADBC6&
      BackStyle       =   0  'Transparent
      Height          =   180
      Left            =   12120
      TabIndex        =   14
      Top             =   1200
      Width           =   90
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Height          =   180
      Left            =   12060
      TabIndex        =   13
      Top             =   1200
      Width           =   90
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "当前共有:"
      Height          =   180
      Left            =   11220
      TabIndex        =   12
      Top             =   1200
      Width           =   900
   End
   Begin VB.Line Line2 
      BorderColor     =   &H80000003&
      X1              =   0
      X2              =   15240
      Y1              =   9240
      Y2              =   9240
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackColor       =   &H005ADBC6&
      Caption         =   "  "
      Height          =   480
      Left            =   2010
      TabIndex        =   5
      Top             =   1020
      Width           =   13260
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "输入会员卡号或姓名:"
      Height          =   180
      Left            =   2520
      TabIndex        =   0
      Top             =   540
      Width           =   1710
   End
   Begin VB.Line Line1 
      BorderColor     =   &H80000010&
      X1              =   1980
      X2              =   1980
      Y1              =   9900
      Y2              =   0
   End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public PubID As String
Private Sub Command1_Click()
query
End Sub

Private Sub Command2_Click()
'Form3.Visible = False
'Form2.Show
listlogin
End Sub

Private Sub Command3_Click()
query
End Sub

Private Sub Command4_Click()
Form8.Show
End Sub

Private Sub Command5_Click()
Form13.Label5.caption = ListView1.SelectedItem.Text
Form13.Label6.caption = ListView1.SelectedItem.SubItems(1)
Form13.Show
End Sub

Private Sub Command6_Click()
'如果当前没有选择的客户,则不执行任何操作
    If ListView1.SelectedItem Is Nothing Then Exit Sub
    '删除确认
    If MsgBox("确认要删除会员为  " & ListView1.SelectedItem.Text & "  吗?", vbYesNo + vbQuestion, "删除客户") = vbNo Then Exit Sub
    
    If RunSQL("DELETE FROM hyxx WHERE id = " & ListView1.SelectedItem.Tag) = True Then
        '如果删除成功,则从LISTVIEW控件中也删除对应的节点,以保持与数据库的同步
        ListView1.ListItems.Remove (ListView1.SelectedItem.Key)
    End If
End Sub

Private Sub Command7_Click()
Form14.Label3.caption = ListView1.SelectedItem.Text
Form14.Label4.caption = ListView1.SelectedItem.SubItems(1)
Form14.Label8.caption = ListView1.SelectedItem.SubItems(16)
Form14.Tag = ListView1.SelectedItem.Tag
Form14.Show
End Sub

Private Sub Form_Load()
ListView1.ColumnHeaders.Add , , "会员卡号", 1700
ListView1.ColumnHeaders.Add , , "姓名", 1000
ListView1.ColumnHeaders.Add , , "性别", 800
ListView1.ColumnHeaders.Add , , "出生日期", 1200
ListView1.ColumnHeaders.Add , , "单位职业", 1700
ListView1.ColumnHeaders.Add , , "用户手机", 2000
ListView1.ColumnHeaders.Add , , "用户电话", 1700
ListView1.ColumnHeaders.Add , , "电子邮件", 1700
ListView1.ColumnHeaders.Add , , "证件类型", 900
ListView1.ColumnHeaders.Add , , "证件号码", 1700
ListView1.ColumnHeaders.Add , , "联系地址", 1700
ListView1.ColumnHeaders.Add , , "其他信息", 2000
ListView1.ColumnHeaders.Add , , "会员卡类型", 2000
ListView1.ColumnHeaders.Add , , "卡的级别", 1700
ListView1.ColumnHeaders.Add , , "会员积分", 1000
ListView1.ColumnHeaders.Add , , "加入日期", 1700
ListView1.ColumnHeaders.Add , , "卡内余额", 1700
ListView1.ColumnHeaders.Add , , , 0
listlogin
BSE1.SchemeStyle = 0
BSE1.EndSubClassing
BSE1.InitSubClassing

End Sub

Private Sub ListView1_DblClick()
 '如果当前没有选择的客户,则不执行任何操作
 If ListView1.SelectedItem Is Nothing Then Exit Sub
Form13.Label5.caption = ListView1.SelectedItem.Text
Form13.Label6.caption = ListView1.SelectedItem.SubItems(1)
Form13.Show
End Sub
Sub listlogin()
On Error GoTo SysInfoErr
Dim strSQL As String
Dim intindex As Long
Dim lstitem As ListItem
Dim count As String
Dim counts As Integer
    strSQL = "select * from hyxx"
    ListView1.ListItems.Clear
    If RunSQL(strSQL) = True Then 'And Not rctrecordset.EOF Then
        ListView1.ListItems.Clear
        rctrecordset.MoveFirst
        count = 0
        counts = 0
        Do While Not rctrecordset.EOF       '循环读取... ...
             Set lstitem = ListView1.ListItems.Add(, "K_" & CStr(rctrecordset.Fields("id").Value), rctrecordset.Fields("会员卡号").Value)
            'SubItems的集合元素下标从1开始
            lstitem.SubItems(1) = rctrecordset.Fields("会员姓名").Value
            lstitem.SubItems(2) = rctrecordset.Fields("性别").Value
            lstitem.SubItems(3) = rctrecordset.Fields("出生日期").Value
            lstitem.SubItems(4) = rctrecordset.Fields("单位职业").Value
            lstitem.SubItems(5) = rctrecordset.Fields("用户手机").Value
            lstitem.SubItems(6) = rctrecordset.Fields("用户电话").Value
            lstitem.SubItems(7) = rctrecordset.Fields("电子邮件").Value
            lstitem.SubItems(8) = rctrecordset.Fields("证件类型").Value
            lstitem.SubItems(9) = rctrecordset.Fields("证件号码").Value
            lstitem.SubItems(10) = rctrecordset.Fields("联系地址").Value
            lstitem.SubItems(11) = rctrecordset.Fields("其他信息").Value
            lstitem.SubItems(12) = rctrecordset.Fields("会员卡类型").Value
            lstitem.SubItems(13) = rctrecordset.Fields("卡的级别").Value
            lstitem.SubItems(14) = rctrecordset.Fields("会员积分").Value
            lstitem.SubItems(15) = rctrecordset.Fields("加入日期").Value
            lstitem.SubItems(16) = rctrecordset.Fields("卡内金额").Value
            lstitem.SubItems(17) = rctrecordset.Fields("卡号密码").Value
            'Tag值保存主键值
            lstitem.Tag = CStr(rctrecordset.Fields("id").Value)
            rctrecordset.MoveNext
            count = count + 1
            counts = counts + lstitem.SubItems(16)
            Label5.caption = count + " 位会员"
            Label8.caption = counts
        Loop
    End If
SysInfoErr:
End Sub
Sub query()
On Error GoTo SysInfoErr
Dim strSQL As String
Dim intindex As Long
Dim lstitem As ListItem
Dim count As String
Dim counts As Integer
If Not Text1.Text = "" Then
        strSQL = "select * from hyxx where 会员卡号='" & Text1.Text & "'"
        ListView1.ListItems.Clear
        If RunSQL(strSQL) = True Then 'And Not rctrecordset.EOF Then

        ListView1.ListItems.Clear
        '没有任何客户信息的情况
        'If rctrecordset.EOF And rctrecordset.BOF Then Exit Function
        rctrecordset.MoveFirst
        count = 0
        counts = 0
        Do While Not rctrecordset.EOF       '循环读取... ...
             Set lstitem = ListView1.ListItems.Add(, "K_" & CStr(rctrecordset.Fields("id").Value), rctrecordset.Fields("会员卡号").Value)
            'SubItems的集合元素下标从1开始
            lstitem.SubItems(1) = rctrecordset.Fields("会员姓名").Value
            lstitem.SubItems(2) = rctrecordset.Fields("性别").Value
            lstitem.SubItems(3) = rctrecordset.Fields("出生日期").Value
            lstitem.SubItems(4) = rctrecordset.Fields("单位职业").Value
            lstitem.SubItems(5) = rctrecordset.Fields("用户手机").Value
            lstitem.SubItems(6) = rctrecordset.Fields("用户电话").Value
            lstitem.SubItems(7) = rctrecordset.Fields("电子邮件").Value
            lstitem.SubItems(8) = rctrecordset.Fields("证件类型").Value
            lstitem.SubItems(9) = rctrecordset.Fields("证件号码").Value
            lstitem.SubItems(10) = rctrecordset.Fields("联系地址").Value
            lstitem.SubItems(11) = rctrecordset.Fields("其他信息").Value
            lstitem.SubItems(12) = rctrecordset.Fields("会员卡类型").Value
            lstitem.SubItems(13) = rctrecordset.Fields("卡的级别").Value
            lstitem.SubItems(14) = rctrecordset.Fields("会员积分").Value
            lstitem.SubItems(15) = rctrecordset.Fields("加入日期").Value
            lstitem.SubItems(16) = rctrecordset.Fields("卡内金额").Value
            'Tag值保存主键值
            lstitem.Tag = CStr(rctrecordset.Fields("id").Value)
                    rctrecordset.MoveNext
            count = count + 1
            counts = counts + lstitem.SubItems(16)
            Label5.caption = count + " " + "位会员"
            Label8.caption = counts
        Loop
    End If
        Else
        'MsgBox "输入错误不能为空", , "系统提示"
 End If
SysInfoErr:
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii >= 48 And KeyAscii <= 57 Then
ElseIf KeyAscii = 8 Then
    KeyAscii = 8
Else
      KeyAscii = 0
End If
End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
query
End Sub

Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
End Sub

⌨️ 快捷键说明

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