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

📄 frmreadermodifyinfo.frm

📁 图书简明管理系统源代码(VB),可作为软件工程课程设计用,也可以作为学习用。
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Left            =   4920
         TabIndex        =   38
         Top             =   1980
         Width           =   90
      End
      Begin VB.Label Label20 
         BackStyle       =   0  'Transparent
         Caption         =   "*"
         Height          =   180
         Index           =   1
         Left            =   4920
         TabIndex        =   37
         Top             =   1500
         Width           =   90
      End
      Begin VB.Label Label20 
         BackStyle       =   0  'Transparent
         Caption         =   "*"
         Height          =   180
         Index           =   0
         Left            =   4920
         TabIndex        =   35
         Top             =   1020
         Width           =   90
      End
      Begin VB.Label Label19 
         BackStyle       =   0  'Transparent
         Caption         =   "*"
         Height          =   180
         Left            =   4920
         TabIndex        =   34
         Top             =   540
         Width           =   90
      End
      Begin VB.Label Label15 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "联系电话:"
         Height          =   180
         Left            =   -74640
         TabIndex        =   33
         Top             =   1639
         Width           =   900
      End
      Begin VB.Label Label18 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "备    注:"
         Height          =   180
         Left            =   -74640
         TabIndex        =   32
         Top             =   3000
         Width           =   900
      End
      Begin VB.Label Label17 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "电子邮件:"
         Height          =   180
         Left            =   -74640
         TabIndex        =   31
         Top             =   2604
         Width           =   900
      End
      Begin VB.Label Label16 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "联系地址:"
         Height          =   180
         Left            =   -74640
         TabIndex        =   30
         Top             =   2160
         Width           =   900
      End
      Begin VB.Label Label14 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "读者部门:"
         Height          =   180
         Left            =   -74640
         TabIndex        =   29
         Top             =   1080
         Width           =   900
      End
      Begin VB.Label Label13 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "读者单位:"
         Height          =   180
         Left            =   -74640
         TabIndex        =   28
         Top             =   570
         Width           =   900
      End
      Begin VB.Label Label9 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "证件号码:"
         Height          =   180
         Left            =   360
         TabIndex        =   27
         Top             =   4410
         Width           =   900
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "证件名称:"
         Height          =   180
         Left            =   360
         TabIndex        =   26
         Top             =   3930
         Width           =   900
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "读者状态:"
         Height          =   180
         Left            =   360
         TabIndex        =   25
         Top             =   3450
         Width           =   900
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "办证日期:"
         Height          =   180
         Left            =   360
         TabIndex        =   24
         Top             =   2970
         Width           =   900
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "出生日期:"
         Height          =   180
         Left            =   360
         TabIndex        =   23
         Top             =   2490
         Width           =   900
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "读者类别:"
         Height          =   180
         Left            =   360
         TabIndex        =   22
         Top             =   2010
         Width           =   900
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "读者性别:"
         Height          =   180
         Left            =   360
         TabIndex        =   21
         Top             =   1530
         Width           =   900
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "读者姓名:"
         Height          =   180
         Left            =   360
         TabIndex        =   20
         Top             =   1050
         Width           =   900
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "读者编号:"
         Height          =   180
         Left            =   360
         TabIndex        =   19
         Top             =   577
         Width           =   900
      End
   End
   Begin VB.PictureBox Picbg1 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      AutoSize        =   -1  'True
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   1440
      Left            =   5760
      Picture         =   "frmreadermodifyinfo.frx":198D3
      ScaleHeight     =   1440
      ScaleWidth      =   1440
      TabIndex        =   36
      Top             =   600
      Width           =   1440
   End
End
Attribute VB_Name = "frmreadermodifyinfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmdexit_Click()
Unload Me
End Sub

Private Sub cmdsave_Click()
    Dim sql As String
    sql = "select * from dzxxb,jsxxb where jsxxb.读者编号='" & Trim(txt读者编号.Text) & "' and dzxxb.读者状态 = '正常' "
    
    If Trim(txt读者姓名.Text) = "" Then
         MsgBox "读者姓名不能为空!", vbOKOnly
    ElseIf Trim(combox读者性别.Text) = "" Then
        MsgBox "读者性别不能为空!", vbOKOnly
    ElseIf Trim(combox读者类别.Text) = "" Then
        MsgBox "读者类别不能为空!", vbOKOnly
    ElseIf Trim(combox读者状态.Text) = "" Then
        MsgBox "读者状态不能为空!", vbOKOnly
    ElseIf Trim(combox读者状态.Text) <> "正常" And Not TransactSQL(sql).EOF Then
         MsgBox "该读者还有书未还,不能改变他的状态!", vbCritical + vbOKOnly
    Else
         sql = "update dzxxb set 读者姓名='" & Trim(txt读者姓名.Text) & "',读者性别='" & _
                 Trim(combox读者性别.Text) & "',读者类别='" & Trim(combox读者类别.Text) & "',出生日期='" & _
                 DTP出生日期.Value & "',办证日期='" & DTP办证日期.Value & "',读者状态='" & _
                 Trim(combox读者状态.Text) & "',证件名称='" & Trim(txt证件名称.Text) & "',证件号码='" & _
                 Trim(txt证件号码.Text) & "',读者单位='" & Trim(txt读者单位.Text) & "',读者部门='" & _
                 Trim(txt读者部门.Text) & "',联系电话='" & Trim(txt联系电话.Text) & "',联系地址='" & _
                 Trim(txt联系地址.Text) & "',电子邮件='" & Trim(txt电子邮件.Text) & "',备注='" & _
                 Trim(txt备注.Text) & "',操作员='" & user & "' where 读者编号='" & Trim(txt读者编号.Text) & "'"
        TransactSQL (sql) '修改数据库中的纪录
        If Trim(txt读者姓名.Text) <> Trim(frmreadermanage.readerGrid.TextMatrix(frmreadermanage.readerGrid.Row, 1)) Then
            TransactSQL ("update  jsxxb set 读者姓名 = '" & Trim(txt读者姓名.Text) & "' where 读者编号 ='" & txt读者编号.Text & "'")
            TransactSQL ("update  fkxxb set 读者姓名 = '" & Trim(txt读者姓名.Text) & "' where 读者编号 ='" & txt读者编号.Text & "'")
            TransactSQL ("update  hsxxb set 读者姓名 = '" & Trim(txt读者姓名.Text) & "' where 读者编号 ='" & txt读者编号.Text & "'")
            TransactSQL ("update  zxxxb set 读者姓名 = '" & Trim(txt读者姓名.Text) & "' where 读者编号 ='" & txt读者编号.Text & "'")
        End If
       'MsgBox "编号为" & txt读者编号.Text & "的读者信息修改成功!", vbOKOnly
        Call frmreadermanage.readerone_update(Trim(txt读者编号.Text), False)   '更新frmreadermanage中readerGrid的记录
        Unload Me
    End If
End Sub

Private Sub Form_Load()
Call fullpic(Me, Picbg1) '背景图

Me.Left = (frmmain.ScaleWidth - Me.Width) / 2
Me.Top = (frmmain.ScaleHeight - Me.Height) / 2

'读者类别加入到cmbo类别编号组合框中
  Dim rs As New ADODB.Recordset
  Dim sqlType As String
  sqlType = "select 读者类别 from dzlbb order by 读者类别"
  Set rs = TransactSQL(sqlType)
  If rs.EOF Then
    MsgBox "请先添加读者类别信息!"
    frmreaderstyle.Show
    Unload Me
  Else
      While Not rs.EOF
          combox读者类别.AddItem rs(0)
          rs.MoveNext
      Wend
  End If

DTP出生日期.Value = Trim(Year(Now)) & "-" & Trim(Month(Now)) & "-" & Trim(day(Now))
DTP办证日期.Value = Trim(Year(Now)) & "-" & Trim(Month(Now)) & "-" & Trim(day(Now))

With frmreadermanage.readerGrid
    txt读者编号.Text = .TextMatrix(.Row, 0)
    txt读者姓名.Text = .TextMatrix(.Row, 1)
    combox读者性别.Text = .TextMatrix(.Row, 2)
    combox读者类别.Text = .TextMatrix(.Row, 3)
     DTP出生日期.Value = .TextMatrix(.Row, 4)
     DTP办证日期.Value = .TextMatrix(.Row, 5)
    combox读者状态.Text = .TextMatrix(.Row, 6)
    'txt已借书数.Text = .TextMatrix(.Row, 7)
    txt证件名称.Text = .TextMatrix(.Row, 8)
    txt证件号码.Text = .TextMatrix(.Row, 9)
    txt读者单位.Text = .TextMatrix(.Row, 10)
    txt读者部门.Text = .TextMatrix(.Row, 11)
    txt联系电话.Text = .TextMatrix(.Row, 12)
    txt联系地址.Text = .TextMatrix(.Row, 13)
    txt电子邮件.Text = .TextMatrix(.Row, 14)
    txt备注.Text = .TextMatrix(.Row, 15)
End With

End Sub

Private Sub Form_Unload(Cancel As Integer)
frmreadermanage.Show
frmreadermanage.SetFocus
End Sub

⌨️ 快捷键说明

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