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

📄 frmdeleteemployee.frm

📁 一个功能完善,界面比较精美的酒店管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Left            =   480
      TabIndex        =   23
      Top             =   5040
      Width           =   1290
   End
   Begin VB.Label lblqualification 
      AutoSize        =   -1  'True
      Caption         =   "Edu. Qualification"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   480
      TabIndex        =   22
      Top             =   3960
      Width           =   1740
   End
   Begin VB.Label lblDepartment 
      AutoSize        =   -1  'True
      Caption         =   "Department"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   480
      TabIndex        =   21
      Top             =   5400
      Width           =   1170
   End
   Begin VB.Label lblExp 
      AutoSize        =   -1  'True
      Caption         =   "Experience Summary"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   480
      TabIndex        =   20
      Top             =   5760
      Width           =   2100
   End
   Begin VB.Label lblemployeename 
      AutoSize        =   -1  'True
      Caption         =   "Name"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   480
      TabIndex        =   19
      Top             =   1800
      Width           =   570
   End
   Begin VB.Label lbladdress 
      AutoSize        =   -1  'True
      Caption         =   "Address"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   480
      TabIndex        =   18
      Top             =   2160
      Width           =   795
   End
   Begin VB.Label lblcity 
      AutoSize        =   -1  'True
      Caption         =   "City"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   480
      TabIndex        =   17
      Top             =   2520
      Width           =   390
   End
   Begin VB.Label lblstate 
      AutoSize        =   -1  'True
      Caption         =   "State"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   480
      TabIndex        =   16
      Top             =   2880
      Width           =   525
   End
   Begin VB.Label lblPhone 
      AutoSize        =   -1  'True
      Caption         =   "Phone/Mobile"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   480
      TabIndex        =   15
      Top             =   3600
      Width           =   1380
   End
   Begin VB.Label lblemployeeNo 
      AutoSize        =   -1  'True
      Caption         =   "Employee No."
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   480
      TabIndex        =   14
      Top             =   1080
      Width           =   1350
   End
   Begin VB.Label lblpin 
      AutoSize        =   -1  'True
      Caption         =   "Pin Code"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   210
      Left            =   480
      TabIndex        =   13
      Top             =   3240
      Width           =   870
   End
End
Attribute VB_Name = "frmDeleteEmployee"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'Variable Declaration
Dim i, J As Integer

Public Sub LCK()
 txtemployeename.Locked = True
 txtaddress.Locked = True
 txtcity.Locked = True
 txtState.Locked = True
 txtpin.Locked = True
 txtphone.Locked = True
 txteduqualification.Locked = True
 txtdesignation.Locked = True
 txtDepartment.Locked = True
 txtExp.Locked = True
 txtDOJ.Locked = True
End Sub

Private Sub cboID_Click()
  With RS_Delete
    .MoveLast
    .MoveFirst
    While .EOF = False
     If cboID.List(cboID.ListIndex) = .Fields(0) Then
      txtemployeename.Text = .Fields(1)
      txtaddress.Text = .Fields(2)
      txtcity.Text = .Fields(3)
      txtState.Text = .Fields(4)
      txtpin.Text = .Fields(5)
      txtphone.Text = .Fields(6)
      txtDOJ.Text = .Fields(7)
      txteduqualification.Text = .Fields(8)
      txtdesignation.Text = .Fields(9)
      txtDepartment.Text = .Fields(10)
      txtExp.Text = .Fields(11)
      .MoveNext
     Else
      .MoveNext
     End If
    Wend
  End With
  cmdDelete.Enabled = True
End Sub

Private Sub cmdCancel_Click()
Unload Me
Me.Visible = False
End Sub

Private Sub cmdDelete_Click()

 With RS_Enter
    .AddNew
     .Fields(0) = cboID.List(cboID.ListIndex)
     .Fields(1) = txtemployeename.Text
     .Fields(2) = txtaddress.Text
     .Fields(3) = txtcity.Text
     .Fields(4) = txtState.Text
     .Fields(5) = txtpin.Text
     .Fields(6) = txtphone.Text
     .Fields(7) = txteduqualification.Text
     .Fields(8) = txtdesignation.Text
     .Fields(9) = txtDepartment.Text
     .Fields(10) = txtExp.Text
     .Fields(11) = txtDOJ.Text
     .Fields(12) = lblDate.Caption
     .Update
 End With
 
 txtemployeename.Text = ""
 txtaddress.Text = ""
 txtcity.Text = ""
 txtState.Text = ""
 txtpin.Text = ""
 txtphone.Text = ""
 txteduqualification.Text = ""
 txtdesignation.Text = ""
 txtDepartment.Text = ""
 txtExp.Text = ""
 txtDOJ.Text = ""
 
 With RS_Delete
  .MoveLast
  .MoveFirst
  While Not .EOF
    If cboID.List(cboID.ListIndex) = .Fields(0) Then
     .Delete
     cboID.RemoveItem cboID.ListIndex
     MsgBox "Record Is Deleted"
     cmdDelete.Enabled = False
     cboID.SetFocus
     Exit Sub
    Else
     .MoveNext
     End If
   Wend
   End With
 End Sub


Private Sub Form_Load()

Me.Top = 3000
Me.Left = 3000

lblDate.Caption = Date

Call Connect


cmdDelete.Enabled = False
LCK
With RS_Delete
 If .RecordCount = 0 Then
  MsgBox "There are no records"
 ' Unload Me
  Exit Sub
 Else
  .MoveLast
  i = .RecordCount
   .MoveFirst
 For J = 1 To i
  cboID.AddItem .Fields(0)
  .MoveNext
  Next
 End If
 End With
End Sub


⌨️ 快捷键说明

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