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

📄 frmemployeeadd.frm

📁 一个功能完善,界面比较精美的酒店管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         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             =   2520
      Width           =   390
   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        =   20
      Top             =   2160
      Width           =   795
   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 lblID 
      AutoSize        =   -1  'True
      Caption         =   "ID"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   240
      Left            =   2640
      TabIndex        =   18
      Top             =   1200
      Width           =   240
   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        =   17
      Top             =   5280
      Width           =   2100
   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        =   16
      Top             =   4920
      Width           =   1170
   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        =   15
      Top             =   3960
      Width           =   1740
   End
   Begin VB.Label lbldesignation 
      AutoSize        =   -1  'True
      Caption         =   "Appointed As"
      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             =   4560
      Width           =   1290
   End
   Begin VB.Line Line1 
      X1              =   0
      X2              =   8400
      Y1              =   840
      Y2              =   840
   End
   Begin VB.Label lblDate 
      AutoSize        =   -1  'True
      Caption         =   "Date"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   240
      Left            =   4800
      TabIndex        =   13
      Top             =   1200
      Width           =   510
   End
   Begin VB.Label lblTitle 
      AutoSize        =   -1  'True
      Caption         =   "ADD EMPLOYEE RECORD"
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   270
      Left            =   1800
      TabIndex        =   12
      Top             =   240
      Width           =   3300
   End
End
Attribute VB_Name = "frmEmployeeAdd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'Variable Declaration
Dim str As String
Dim strMonth, result As String
Dim num, i As Integer

Public Sub Blank()
    txtemployeename.Text = ""
    txtaddress.Text = ""
    txtcity.Text = ""
    txtState.Text = ""
    txtpin.Text = ""
    txtphone.Text = ""
    txteduqualification.Text = ""
    txtdesignation.Text = ""
    txtExp.Text = ""
    cboDepartment.ListIndex = -1
End Sub



Private Sub cmdAdd_Click()

If txtemployeename.Text = "" Or txtaddress.Text = "" Or _
   txtcity.Text = "" Or txtState.Text = "" Or _
   txtpin.Text = "" Or txtphone.Text = "" Or _
   txteduqualification.Text = "" Or txtExp.Text = "" Then
   MsgBox "Fill Complete Information", vbInformation, "Information"
   txtemployeename.SetFocus
   Exit Sub
ElseIf cboDepartment.ListIndex = -1 Then
   MsgBox "Select the department", vbInformation, "Information"
   cboDepartment.SetFocus
   Exit Sub
Else
   With rs
     .AddNew
     .Fields(0) = lblID.Caption
     .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) = lblDate.Caption
     .Fields(8) = txteduqualification.Text
     .Fields(9) = txtdesignation.Text
     .Fields(10) = cboDepartment.List(cboDepartment.ListIndex)
     .Fields(11) = txtExp.Text
     .Update
     
     MsgBox "Record Entered Successfully"
     Blank
     If .RecordCount = 0 Then
        lblID.Caption = str & strMonth & "-" & num
     Else
        .MoveLast
        i = .RecordCount
        num = num + i
        lblID.Caption = str & strMonth & "-" & num
     End If
   End With
End If
   
   

End Sub

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

Private Sub Form_Load()
Me.Top = 3000
Me.Left = 3000

num = 100
str = "EmpID"
strMonth = Month(Date)
lblDate.Caption = Date

cboDepartment.AddItem "Front Office"
cboDepartment.AddItem "House Keeping"
cboDepartment.AddItem "Food & Beverage"
cboDepartment.AddItem "Security"
cboDepartment.AddItem "Maintenance"
cboDepartment.AddItem "Purchase & Stores"
cboDepartment.AddItem "Sales & Marketing"

Connect
         

Blank

With rs
   If .RecordCount = 0 Then
    lblID.Caption = str & strMonth & "-" & num
   Else
    .MoveLast
    i = .RecordCount
    num = num + i
  lblID.Caption = str & strMonth & "-" & num
   End If
End With
End Sub

⌨️ 快捷键说明

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