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

📄 main_kfgl_hyjl.frm

📁 星级酒店客房管理系统一套很不错的系统
💻 FRM
📖 第 1 页 / 共 3 页
字号:
         EndProperty
         BeginProperty ListImage22 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":2D19C
            Key             =   ""
         EndProperty
         BeginProperty ListImage23 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":2ECEE
            Key             =   ""
         EndProperty
         BeginProperty ListImage24 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":30840
            Key             =   ""
         EndProperty
         BeginProperty ListImage25 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":32392
            Key             =   ""
         EndProperty
         BeginProperty ListImage26 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":33EE4
            Key             =   ""
         EndProperty
         BeginProperty ListImage27 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":35A36
            Key             =   ""
         EndProperty
         BeginProperty ListImage28 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":37588
            Key             =   ""
         EndProperty
         BeginProperty ListImage29 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":390DA
            Key             =   ""
         EndProperty
         BeginProperty ListImage30 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":3AC2C
            Key             =   ""
         EndProperty
         BeginProperty ListImage31 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":3C77E
            Key             =   ""
         EndProperty
         BeginProperty ListImage32 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":3E2D0
            Key             =   ""
         EndProperty
         BeginProperty ListImage33 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":3FE22
            Key             =   ""
         EndProperty
         BeginProperty ListImage34 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":41974
            Key             =   ""
         EndProperty
         BeginProperty ListImage35 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":434C6
            Key             =   ""
         EndProperty
         BeginProperty ListImage36 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":45018
            Key             =   ""
         EndProperty
         BeginProperty ListImage37 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":46B6A
            Key             =   ""
         EndProperty
         BeginProperty ListImage38 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":486BC
            Key             =   ""
         EndProperty
         BeginProperty ListImage39 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":4A20E
            Key             =   ""
         EndProperty
         BeginProperty ListImage40 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":4BD60
            Key             =   ""
         EndProperty
         BeginProperty ListImage41 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":4D8B2
            Key             =   ""
         EndProperty
         BeginProperty ListImage42 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":4F404
            Key             =   ""
         EndProperty
         BeginProperty ListImage43 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":50F56
            Key             =   ""
         EndProperty
         BeginProperty ListImage44 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":52AA8
            Key             =   ""
         EndProperty
         BeginProperty ListImage45 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":545FA
            Key             =   ""
         EndProperty
         BeginProperty ListImage46 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":5614C
            Key             =   ""
         EndProperty
         BeginProperty ListImage47 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":57C9E
            Key             =   ""
         EndProperty
         BeginProperty ListImage48 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":597F0
            Key             =   ""
         EndProperty
         BeginProperty ListImage49 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":5B342
            Key             =   ""
         EndProperty
         BeginProperty ListImage50 {0713E8C3-850A-101B-AFC0-4210102A8DA7} 
            Picture         =   "main_kfgl_hyjl.frx":5CE94
            Key             =   ""
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "main_kfgl_hyjl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()
Select Case Frame1.Caption
Case "增加", "复制增加"
    Adodc1.Recordset.AddNew
    Adodc1.Recordset.Fields("名称") = Me.Text1(0).Text
    Adodc1.Recordset.Fields("开始日期") = Format(Me.DTPicker1.Value, "yyyy-mm-dd")
    Adodc1.Recordset.Fields("结束日期") = Format(Me.DTPicker2.Value, "yyyy-mm-dd")
    Adodc1.Recordset.Fields("接待单位") = Me.Text1(3).Text
    Adodc1.Recordset.Fields("联系人") = Me.Text1(4).Text
    Adodc1.Recordset.Fields("联系电话") = Me.Text1(5).Text
    Adodc1.Recordset.Fields("备注") = Me.Text1(6).Text
    Adodc1.Recordset.Update
Case "查找"
Adodc1.RecordSource = "select * from " & Query_Type2 & " where 名称= '" & Trim(Text1(0).Text) & "'or 开始日期>= #" & DTPicker1.Value & "# and 结束日期<= #" & DTPicker2.Value & "# or 接待单位='" & Trim(Text1(3).Text) & "'"
Adodc1.Refresh
Me.Frame1.Visible = False
End Select
End Sub

Private Sub Command2_Click()
    Me.Frame1.Visible = False
End Sub

Private Sub Command3_Click(Index As Integer)
            Me.Text1(0).Visible = True
            Me.DTPicker1.Visible = True
            Me.DTPicker2.Visible = True
            Me.Text1(3).Visible = True
            Me.Text1(4).Visible = True
            Me.Text1(5).Visible = True
            Me.Text1(6).Visible = True
            Command1.Visible = True
            Label2.Visible = True
            Label3.Visible = True
            For i = 0 To 4
                Label1(i).Visible = True
            Next
On Error Resume Next
    Select Case Index
        Case Is = 0
            Unload Me
        Case Is = 2
            Me.Text1(0).Text = Adodc1.Recordset.Fields("名称")
            Me.DTPicker1.Value = Adodc1.Recordset.Fields("开始日期")
            Me.DTPicker2.Value = Adodc1.Recordset.Fields("结束日期")
            Me.Text1(3).Text = Adodc1.Recordset.Fields("接待单位")
            Me.Text1(4).Text = Adodc1.Recordset.Fields("联系人")
            Me.Text1(5).Text = Adodc1.Recordset.Fields("联系电话")
            Me.Text1(6).Text = Adodc1.Recordset.Fields("备注")
            Me.Frame1.Caption = "复制增加"
            Me.Frame1.Visible = True
            Command1.Caption = "保存"
            Command1.SetFocus
        Case Is = 3
            Me.Text1(0).Text = ""
            Me.DTPicker1.Value = Date
            Me.DTPicker2.Value = Date
            Me.Text1(3).Text = ""
            Me.Text1(4).Text = ""
            Me.Text1(5).Text = ""
            Me.Text1(6).Text = ""
            Me.Frame1.Caption = "增加"
            Command1.Caption = "保存"
            Me.Frame1.Visible = True
            Text1(0).SetFocus
        Case Is = 4
        If Adodc1.Recordset.RecordCount <> 0 Then
             Adodc1.Recordset.Delete
        Else
            MsgBox "没有记录可删除!", vbOKOnly, "提示"
        End If
        Case Is = 5
            Set rtpRS = Adodc1.Recordset
            rtpTitle = "[" & Query_Type2 & "] 报表"
            Call rtpExcel
        Case Is = 6
            Adodc1.RecordSource = "select * from " & Query_Type2
            Adodc1.Refresh
        Case Is = 7
            Me.Text1(0).Text = ""
            Me.DTPicker1.Value = Date - 30
            Me.DTPicker2.Value = Date
            Me.Text1(3).Text = ""
            Me.Text1(4).Visible = False
            Me.Text1(5).Visible = False
            Me.Text1(6).Visible = False
            For i = 2 To 4
                Label1(i).Visible = False
            Next
            Me.Frame1.Caption = "查找"
            Me.Command1.Caption = "查找"
            Me.Frame1.Visible = True
            Me.Text1(0).SetFocus
    End Select
End Sub

Private Sub DataGrid1_DblClick()
 Me.Text1(0).Text = Adodc1.Recordset.Fields("名称")
            Me.DTPicker1.Value = Adodc1.Recordset.Fields("开始日期")
            Me.DTPicker2.Value = Adodc1.Recordset.Fields("结束日期")
            Me.Text1(3).Text = Adodc1.Recordset.Fields("接待单位")
            Me.Text1(4).Text = Adodc1.Recordset.Fields("联系人")
            Me.Text1(5).Text = Adodc1.Recordset.Fields("联系电话")
            Me.Text1(6).Text = Adodc1.Recordset.Fields("备注")
            Command1.Visible = False
            Me.Frame1.Visible = True
End Sub

Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
StatusBar1.Panels(2).Text = "共有{" & Adodc1.Recordset.RecordCount & "}条数据"
End Sub

Private Sub Form_Activate()
Label4.Caption = "[" & Query_Type2 & "] 管理"
StatusBar1.Panels(1).Text = "当前操作: " & Me.Caption & "->" & Label4.Caption
StatusBar1.Panels(2).Text = "共有{" & Adodc1.Recordset.RecordCount & "}条数据"
DTPicker1.Value = Format(Date, "yyyy-mm-dd")
DTPicker2.Value = Format(Date, "yyyy-mm-dd")
End Sub

Private Sub Form_Load()
    Adodc1.ConnectionString = My_PROVIDER
    Adodc1.CommandType = adCmdText
    Adodc1.RecordSource = "select * from " & Query_Type2
    Adodc1.Refresh
    DataGrid1.Width = Screen.Width
    Set DataGrid1.DataSource = Adodc1
    DataGrid1.ReBind
    DataGrid1.Refresh
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
    Select Case Button.key
        Case "关闭"
            Unload Me
        Case "全部"
        Case "增加"
            Me.Frame1.Visible = True
    End Select
End Sub

Private Sub DTPicker1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then DTPicker2.SetFocus
End Sub

Private Sub DTPicker2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Text1(3).SetFocus
End Sub

Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = 13 And Index = 0 Then DTPicker1.SetFocus
If KeyAscii = 13 And Index = 3 Then Text1(4).SetFocus
If KeyAscii = 13 And Index = 4 Then Text1(5).SetFocus
If KeyAscii = 13 And Index = 5 Then Text1(6).SetFocus
If KeyAscii = 13 And Index = 6 Then Command1.SetFocus
End Sub

⌨️ 快捷键说明

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