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

📄 frm_xqyggl.frm

📁 一个详细的VB做的小区物业管理系统
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            Top             =   690
            Width           =   720
         End
         Begin VB.Label Label7 
            AutoSize        =   -1  'True
            Caption         =   "员工性别"
            Height          =   180
            Index           =   0
            Left            =   2655
            TabIndex        =   34
            Top             =   255
            Width           =   720
         End
         Begin VB.Label Label6 
            AutoSize        =   -1  'True
            Caption         =   "备  注"
            Height          =   180
            Index           =   0
            Left            =   120
            TabIndex        =   33
            Top             =   1755
            Width           =   540
         End
         Begin VB.Label Label5 
            AutoSize        =   -1  'True
            Caption         =   "家庭住址"
            Height          =   180
            Index           =   0
            Left            =   120
            TabIndex        =   32
            Top             =   1425
            Width           =   720
         End
         Begin VB.Label Label4 
            AutoSize        =   -1  'True
            Caption         =   "联系电话"
            Height          =   180
            Index           =   0
            Left            =   120
            TabIndex        =   31
            Top             =   1050
            Width           =   720
         End
         Begin VB.Label Label3 
            AutoSize        =   -1  'True
            Caption         =   "员工姓名"
            Height          =   180
            Index           =   0
            Left            =   135
            TabIndex        =   30
            Top             =   675
            Width           =   720
         End
         Begin VB.Label Label2 
            AutoSize        =   -1  'True
            Caption         =   "员工编号"
            Height          =   180
            Index           =   0
            Left            =   135
            TabIndex        =   29
            Top             =   255
            Width           =   720
         End
      End
      Begin MSDataGridLib.DataGrid DataGrid1 
         Bindings        =   "Frm_xqyggl.frx":00C7
         Height          =   2085
         Left            =   -74775
         TabIndex        =   18
         Top             =   420
         Width           =   4845
         _ExtentX        =   8546
         _ExtentY        =   3678
         _Version        =   393216
         HeadLines       =   1
         RowHeight       =   15
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
   End
   Begin VB.Label Label12 
      Caption         =   "Label12"
      DataField       =   "部门名称"
      DataSource      =   "Adodc3"
      Height          =   345
      Left            =   4605
      TabIndex        =   58
      Top             =   5040
      Width           =   885
   End
   Begin VB.Label Label11 
      Caption         =   "Label11"
      DataField       =   "员工种类"
      DataSource      =   "Adodc2"
      Height          =   285
      Left            =   2325
      TabIndex        =   57
      Top             =   4995
      Width           =   840
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "请输入查询条件:"
      ForeColor       =   &H00FF0000&
      Height          =   180
      Left            =   90
      TabIndex        =   1
      Top             =   210
      Width           =   1440
   End
End
Attribute VB_Name = "Frm_xqyggl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim j As String
Private Sub Combo2_Click()
If Combo2.Text = "=" Then
j = 1
ElseIf Combo2.Text = ">" Then
j = 2
ElseIf Combo2.Text = "<" Then
j = 3
ElseIf Combo2.Text = "<>" Then
j = 4
ElseIf Combo2.Text = "like" Then
j = 5
Else
End If
End Sub
Private Sub Command1_Click()
  If Combo2.Text = "like" Then
     Adodc1.RecordSource = "select * from tab_yginfo where " & Combo1.Text & " like +'%" & Text1.Text & "%'"
     Adodc1.Refresh
  Else
     Adodc1.RecordSource = "select * from tab_yginfo where " & Combo1.Text & " " & Combo2.Text & " '" & Text1.Text & "'"
     Adodc1.Refresh
  End If
End Sub
Private Sub Command10_Click()
Dim myval As String
Adodc1.RecordSource = "select * from tab_yginfo"
If Adodc1.Recordset.RecordCount > 0 Then
myval = MsgBox("确定删除吗?", vbYesNo, "员工管理系统")
If myval = vbYes Then
Adodc1.Recordset.Delete
Else
End If
Else
MsgBox "数据库中没有记录要删除"
End If
End Sub
Private Sub Command11_Click()
Unload Me
Me.Hide
Frm_main.Show
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.MoveFirst
End Sub
Private Sub Command3_Click()
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF Then Adodc1.Recordset.MoveFirst
End Sub
Private Sub Command4_Click()
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast
End Sub
Private Sub Command5_Click()
Adodc1.Recordset.MoveLast
End Sub
Private Sub Command6_Click()
Frame3(0).Visible = True
Frame3(1).Visible = False
Command6.Visible = False
Command7.Visible = True
Text3(0).Text = ""
Text4(0).Text = ""
Text5(0).Text = ""
Text6(0).Text = ""
Adodc1.RecordSource = "select * from tab_yginfo order by 员工编号"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
If Adodc1.Recordset.EOF = False Then
Adodc1.Recordset.MoveLast
Text2(0).Text = "yg" + Trim(Mid(Adodc1.Recordset.Fields("员工编号"), 3, 2) + 1)
Else
Text2(0).Text = "yg" + Trim(Mid(Adodc1.Recordset.Fields("员工编号"), 3, 2) + 1)
End If
Else
Text2(0).Text = "yg1"
End If
End Sub
Private Sub Command7_Click()
If Text2(0).Text = "" Or Text3(0).Text = "" Or Text4(0).Text = "" Or Text5(0).Text = "" Or Text6(0).Text = "" Then
MsgBox "不允许为空", 48, "提示"
Exit Sub
Else

Set adors = cn.Execute("insert into tab_yginfo values('" & Text2(0) & "','" & Text3(0) & "','" & Combo3(0) & "','" & DTPicker1(0) & "','" & Combo4(0) & "','" & Text4(0) & "','" & Text5(0) & "','" & Combo5(0) & "','" & Text6(0) & "')")
MsgBox "数据保存成功", 78, "员工管理系统"
Adodc1.Refresh
Command6.Visible = True
Command7.Visible = False
cn.Close
End If
End Sub
Private Sub Command8_Click()
Text2(0).Text = ""
Text3(0).Text = ""
Text4(0).Text = ""
Text5(0).Text = ""
Text6(0).Text = ""
Combo3(0).Text = ""
Combo4(0).Text = ""
Combo5(0).Text = ""
End Sub

Private Sub Command9_Click()
Adodc1.Recordset.UpdateBatch
MsgBox "修改成功"
Adodc1.Refresh
End Sub

Private Sub Form_Load()
Adodc2.Refresh
Adodc2.Recordset.MoveFirst
Do While Adodc2.Recordset.EOF = False
Combo4(0).AddItem Label11.Caption
Adodc2.Recordset.MoveNext
Loop

Adodc3.Refresh
Adodc3.Recordset.MoveFirst
Do While Adodc3.Recordset.EOF = False
Combo5(0).AddItem Label12.Caption
Adodc3.Recordset.MoveNext
Loop
cn.Close
End Sub

Private Sub SSTab1_Click(PreviousTab As Integer)
If SSTab1.Tab = 1 Then
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = False
Command9.Enabled = False
Command10.Enabled = False
Command11.Enabled = False
 Else
If SSTab1.Tab = 0 Then
Command2.Enabled = True
Command3.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Command7.Enabled = True
Command8.Enabled = True
Command9.Enabled = True
Command10.Enabled = True
Command11.Enabled = True
End If
End If
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Command1.SetFocus
End If
End Sub

⌨️ 快捷键说明

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