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

📄 frmreaderinfo.frm

📁 是有关于音像制品的管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "msflxgrd.ocx"
Begin VB.Form readerInfolist 
   BackColor       =   &H00FFFFC0&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "会员信息"
   ClientHeight    =   4290
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   9015
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "frmreaderInfo.frx":0000
   ScaleHeight     =   4290
   ScaleWidth      =   9015
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox curSelRdNo 
      Height          =   375
      Left            =   2280
      TabIndex        =   6
      Top             =   3720
      Width           =   1935
   End
   Begin VB.CommandButton exit 
      Caption         =   "返 回"
      Height          =   375
      Left            =   7680
      TabIndex        =   4
      Top             =   3720
      Width           =   1095
   End
   Begin VB.CommandButton readerDel 
      Caption         =   "删 除"
      Height          =   375
      Left            =   6360
      TabIndex        =   3
      Top             =   3720
      Width           =   975
   End
   Begin VB.CommandButton readerModify 
      Caption         =   "修 改"
      Height          =   375
      Left            =   4920
      TabIndex        =   2
      Top             =   3720
      Width           =   1095
   End
   Begin MSFlexGridLib.MSFlexGrid readerInfoGrid 
      Height          =   2655
      Left            =   0
      TabIndex        =   1
      Top             =   840
      Width           =   9015
      _ExtentX        =   15901
      _ExtentY        =   4683
      _Version        =   393216
      Rows            =   10
      Cols            =   11
      FixedCols       =   0
      BackColorBkg    =   14737632
      SelectionMode   =   1
      AllowUserResizing=   2
   End
   Begin VB.Label Label2 
      BackColor       =   &H00C0E0FF&
      BackStyle       =   0  'Transparent
      Caption         =   "当前选定会员编号:"
      Height          =   375
      Left            =   240
      TabIndex        =   5
      Top             =   3840
      Width           =   1815
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFFFC0&
      BackStyle       =   0  'Transparent
      Caption         =   "会员信息管理"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   24
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   495
      Left            =   2880
      TabIndex        =   0
      Top             =   120
      Width           =   2895
   End
End
Attribute VB_Name = "readerInfolist"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Function readerInfo_update()
   Dim rs As New ADODB.Recordset
   Dim sql As String
   sql = "select * from readers"
    
    Dim i As Integer
    Set rs = TransactSQL(sql)
      With readerInfoGrid
        .Rows = 1
        While Not rs.EOF
        .Rows = .Rows + 1
        .TextMatrix(.Rows - 1, 0) = rs(0)
        .TextMatrix(.Rows - 1, 1) = rs(1)
        .TextMatrix(.Rows - 1, 2) = rs(2)
        .TextMatrix(.Rows - 1, 3) = rs(3)
         rs.MoveNext
        Wend
      End With
End Function
Private Sub exit_Click()
    Unload Me
End Sub

Private Sub Form_Activate()
    Call readerInfo_update
End Sub

Private Sub Form_Load()
   With readerInfoGrid
         .TextMatrix(0, 0) = "会员编号"
         .TextMatrix(0, 1) = "会员姓名"
         .TextMatrix(0, 2) = "会员密码"
         .TextMatrix(0, 3) = "联系电话"
         .ColWidth(4) = 1500
         .ColWidth(5) = 1800
         .ColWidth(6) = 1500
         .ColWidth(10) = 2000
         .BackColorFixed = RGB(247, 214, 157)
    End With
   Call readerInfo_update
End Sub

Private Sub readerDel_Click()
    Dim resMsg As String
    Dim rs As New ADODB.Recordset
    Dim sql As String
    Dim sql2 As String
    sql = "select readerno from readers where readerno = '" & curSelRdNo.Text & "'"
    sql2 = "delete from readers where readerno = '" & curSelRdNo.Text & "'"
    If Trim(curSelRdNo.Text) = "" Then
       MsgBox "请选择或输入要删除的会员的编号!", vbOKOnly
    Else
       Set rs = TransactSQL(sql)
       If rs.EOF = True Then
           MsgBox "没有该编号的会员信息!", vbOKOnly
           rs.Close
       Else
          resMsg = MsgBox("真的要删除该编号的会员信息吗?", vbOKCancel, "警告")
          If resMsg = vbOK Then
             TransactSQL (sql2)
             MsgBox "该编号的会员者信息已经删除!", vbOKOnly
             Call readerInfo_update
          End If
       End If
    End If
End Sub

Private Sub readerInfoGrid_Click()
    Dim i As Integer
    '首先获得选定的行号
    i = readerInfoGrid.Row
    '将选定行的内容在文本框中显示
    curSelRdNo.Text = readerInfoGrid.TextMatrix(i, 0)
End Sub

Private Sub readerModify_Click()
    Dim rs As New ADODB.Recordset
    Dim sql As String
    sql = "select * from readers where readerNO ='" & curSelRdNo.Text & "'"
    If Trim(curSelRdNo.Text) = "" Then
       MsgBox "请输入或在列表中选定要修改的会员编号!", vbOKOnly
       Else
       Set rs = TransactSQL(sql)
       If rs.EOF = True Then
          MsgBox "没有该编号的会员信息!", vbOKOnly
       Else
          ModifyRdFlag1 = curSelRdNo.Text
          ModifyRdFlag2 = True
          readerRewrite.Show
       End If
    End If
End Sub

⌨️ 快捷键说明

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