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

📄 xgzyxx.frm

📁 关于图书销售管理
💻 FRM
字号:
VERSION 5.00
Begin VB.Form xgzyxx 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "修改职员信息"
   ClientHeight    =   4380
   ClientLeft      =   2835
   ClientTop       =   3000
   ClientWidth     =   4155
   Icon            =   "xgzyxx.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   4380
   ScaleWidth      =   4155
   Begin VB.CommandButton Command3 
      Caption         =   "返回(&B)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2400
      TabIndex        =   15
      Top             =   3840
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "保存(&S)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   840
      TabIndex        =   14
      Top             =   3840
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Height          =   3735
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   4095
      Begin VB.Data Data1 
         Caption         =   "Data1"
         Connect         =   "Access"
         DatabaseName    =   ""
         DefaultCursorType=   0  '缺省游标
         DefaultType     =   2  '使用 ODBC
         Exclusive       =   0   'False
         Height          =   285
         Left            =   120
         Options         =   0
         ReadOnly        =   0   'False
         RecordsetType   =   1  'Dynaset
         RecordSource    =   ""
         Top             =   2760
         Visible         =   0   'False
         Width           =   1065
      End
      Begin VB.TextBox Text5 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000006&
         Height          =   375
         Left            =   1560
         TabIndex        =   13
         Top             =   240
         Width           =   2055
      End
      Begin VB.TextBox Text4 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1560
         TabIndex        =   12
         Top             =   840
         Width           =   2055
      End
      Begin VB.OptionButton Option2 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   255
         Left            =   2760
         TabIndex        =   11
         Top             =   1440
         Width           =   255
      End
      Begin VB.OptionButton Option1 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   1680
         TabIndex        =   10
         Top             =   1440
         Value           =   -1  'True
         Width           =   255
      End
      Begin VB.TextBox Text3 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1560
         TabIndex        =   9
         Top             =   1920
         Width           =   2055
      End
      Begin VB.TextBox Text2 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1560
         TabIndex        =   8
         Top             =   2400
         Width           =   2055
      End
      Begin VB.TextBox Text1 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   615
         Left            =   1560
         MultiLine       =   -1  'True
         TabIndex        =   7
         Top             =   3000
         Width           =   2175
      End
      Begin VB.Image Image3 
         Height          =   480
         Left            =   3120
         Picture         =   "xgzyxx.frx":0442
         Top             =   1320
         Width           =   480
      End
      Begin VB.Image Image2 
         Height          =   480
         Left            =   1920
         Picture         =   "xgzyxx.frx":05E7
         Top             =   1320
         Width           =   480
      End
      Begin VB.Label Label6 
         Caption         =   "性别"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   600
         TabIndex        =   6
         Top             =   1440
         Width           =   615
      End
      Begin VB.Label Label5 
         Caption         =   "备注:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   480
         TabIndex        =   5
         Top             =   3120
         Width           =   735
      End
      Begin VB.Label Label4 
         Caption         =   "所在部门"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   360
         TabIndex        =   4
         Top             =   2400
         Width           =   975
      End
      Begin VB.Label Label3 
         Caption         =   "联系方式"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   360
         TabIndex        =   3
         Top             =   1920
         Width           =   1095
      End
      Begin VB.Label Label2 
         Caption         =   "姓名"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   600
         TabIndex        =   2
         Top             =   840
         Width           =   615
      End
      Begin VB.Label Label1 
         Caption         =   "职员编号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   360
         TabIndex        =   1
         Top             =   360
         Width           =   1095
      End
   End
End
Attribute VB_Name = "xgzyxx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public bc As Boolean

Private Sub Command1_Click()
'czrygl.Data1.Recordset.MoveLast
'bc = True
 xgzyxx.Data1.Recordset.FindFirst "zybh = " & "'" & Text5.Text & "'"
If Text4.Text = "" Then
    MsgBox "姓名不能为空。", vbCritical, "警告"
    Text4.SetFocus
    Exit Sub
End If

If Len(Text1.Text) > 50 Then
    MsgBox "备注不要多于25个字", vbCritical, "警告"
    Text1.SetFocus
    Exit Sub
End If

xgzyxx.Data1.Recordset.Edit
xgzyxx.Data1.Recordset("zybh") = Trim(Text5.Text)
xgzyxx.Data1.Recordset("xm") = Trim(Text4.Text)
If Option1.Value = True Then
     xgzyxx.Data1.Recordset("xb") = "男"
   Else
      xgzyxx.Data1.Recordset("xb") = "女"
End If
xgzyxx.Data1.Recordset("lxfs") = Trim(Text3.Text)
xgzyxx.Data1.Recordset("szbm") = Trim(Text2.Text)
xgzyxx.Data1.Recordset("bz") = Trim(Text1.Text)
xgzyxx.Data1.Recordset.Update
'Call Form_Activate
xgzyxx.Data1.Refresh
Unload Me
zyxx.Show

End Sub

Private Sub Command2_Click()
  '自动生成编号
 ' If bc = False Then
  '    MsgBox "请先将当前记录保存。", vbInformation, "提示"
   '   Exit Sub
  'End If
  
  'Data1.Recordset.MoveLast
  'If (Val(Data1.Recordset("zybh")) + 1) < 10 Then Text5.Text = "000" & (Val(Data1.Recordset("zybh")) + 1)
  'If (Val(Data1.Recordset("zybh")) + 1) >= 10 And (Val(Data1.Recordset("zybh")) + 1) < 100 Then
   '          Text5.Text = "00" & (Val(Data1.Recordset("zybh")) + 1)
' End If
' If (Val(Data1.Recordset("zybh")) + 1) >= 100 Then
 '            Text5.Text = "0" + (Val(Data1.Recordset("zybh")) + 1)
 'End If
'Text4.Text = ""
'Text3.Text = ""
'Text2.Text = ""
'Text1.Text = ""
'bc = False
End Sub

Private Sub Command3_Click()
zyxx.Show
Unload Me
End Sub

Private Sub Form_Activate()
  '载入当前职员信息

       
        
xgzyxx.Text5.Text = zyxx.Data1.Recordset("zybh")
xgzyxx.Text4.Text = zyxx.Data1.Recordset("xm")
If zyxx.Data1.Recordset("xb") = "男" Then
            Option1.Value = True
       Else
            Option2.Value = True
End If
xgzyxx.Text3.Text = zyxx.Data1.Recordset("lxfs")
xgzyxx.Text2.Text = zyxx.Data1.Recordset("szbm")
xgzyxx.Text1.Text = zyxx.Data1.Recordset("bz")
  'Data1.Recordset.MoveLast
  'If (Val(Data1.Recordset("zybh")) + 1) < 10 Then Text5.Text = "000" & (Val(Data1.Recordset("zybh")) + 1)
  'If (Val(Data1.Recordset("zybh")) + 1) >= 10 And (Val(Data1.Recordset("zybh")) + 1) < 100 Then
  '           Text5.Text = "00" & (Val(Data1.Recordset("zybh")) + 1)
 'End If
 'If (Val(Data1.Recordset("zybh")) + 1) > 100 Then
  '           Text5.Text = "0" + (Val(Data1.Recordset("zybh")) + 1)
 'End If
 ' Text4.SetFocus
End Sub

Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\db1.mdb"
Data1.RecordSource = "select * from zyzl"
End Sub

Private Sub Text5_Click()
' MsgBox "系统管理员不可删除", vbCritical, "警告"
End Sub

⌨️ 快捷键说明

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