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

📄 scgl_ldkr.frm

📁 一个简单的酒店管理系统 用VB.net+SQL2000实现
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            AutoSize        =   -1  'True
            Caption         =   "原房号:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   210
            Left            =   240
            TabIndex        =   23
            Top             =   360
            Width           =   735
         End
         Begin VB.Label Label7 
            AutoSize        =   -1  'True
            Caption         =   "客人国籍:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   210
            Left            =   240
            TabIndex        =   22
            Top             =   2880
            Width           =   945
         End
         Begin VB.Label Label6 
            AutoSize        =   -1  'True
            Caption         =   "离店日期:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   210
            Left            =   240
            TabIndex        =   21
            Top             =   4200
            Width           =   945
         End
         Begin VB.Label Label5 
            AutoSize        =   -1  'True
            Caption         =   "来店日期:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   210
            Left            =   240
            TabIndex        =   20
            Top             =   3600
            Width           =   945
         End
         Begin VB.Label Label4 
            AutoSize        =   -1  'True
            Caption         =   "消费总额:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   210
            Left            =   240
            TabIndex        =   18
            Top             =   4920
            Width           =   945
         End
         Begin VB.Label Label3 
            AutoSize        =   -1  'True
            Caption         =   "客人姓:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   210
            Left            =   240
            TabIndex        =   17
            Top             =   960
            Width           =   735
         End
      End
      Begin VB.CommandButton Cmd2 
         Caption         =   "打印(F5)"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   555
         Index           =   0
         Left            =   1920
         Picture         =   "scgl_ldkr.frx":0000
         TabIndex        =   1
         Top             =   7080
         Width           =   1575
      End
      Begin VB.Timer Timer1 
         Interval        =   1000
         Left            =   240
         Top             =   2400
      End
      Begin MSFlexGridLib.MSFlexGrid FLEX1 
         Height          =   5895
         Left            =   120
         TabIndex        =   0
         Top             =   960
         Width           =   6615
         _ExtentX        =   11668
         _ExtentY        =   10398
         _Version        =   327680
         Rows            =   3
         Cols            =   10
         FixedCols       =   0
         BackColor       =   -2147483624
         FocusRect       =   0
         SelectionMode   =   1
         AllowUserResizing=   3
      End
      Begin VB.Label name1 
         AutoSize        =   -1  'True
         Caption         =   "列表说明:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   210
         Left            =   600
         TabIndex        =   6
         Top             =   360
         Width           =   1035
      End
      Begin VB.Label rec_no 
         AutoSize        =   -1  'True
         Caption         =   "当前记录数:"
         Height          =   180
         Left            =   4200
         TabIndex        =   5
         Top             =   360
         Width           =   990
      End
   End
   Begin VB.Label Label1 
      BackColor       =   &H00C0C0C0&
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   0
      TabIndex        =   8
      Top             =   0
      Width           =   11775
   End
   Begin VB.Label frm_msg 
      BackColor       =   &H8000000A&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   735
      Left            =   5400
      TabIndex        =   7
      Top             =   0
      Width           =   6375
   End
End
Attribute VB_Name = "scgl_ldkr"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim t_bt As String
Dim t_fields As Variant
Dim rec As Recordset
Dim t_nam As String
Private Sub Form_Load()
    KeyPreview = True
    CENTER Me
    name1.Caption = "离店客人一览表"
    t_nam = "KR" & year(Format(Date, "yyyy-mm-dd"))
    t_bt = "    原房号|^     客人姓|^    客人名|^    性别|^      客人国籍|^  来店日期|^  离店日期|^  消费总额|^  备注"
    t_fields = Array(0, 1, 2, 3, 4, 5, 6, 7, 8)
    Set rec = PUB_data.OpenRecordset("SELECT ZH,KR_X,KR_M,KR_XBMC,GJMC,RZRQ,LDRQ,ZXFE,BZ FROM " & t_nam & " WHERE CSTR(LDRQ)='" & scgl_ldkr_ldrq.rq & "'and LD_FT='1'", 4)
    If Not rec.BOF Then
        rec.MoveLast
    End If
    Call pub_memo.Flex_full(FLEX1, t_bt, rec, t_fields, 8, Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
    rec_no.Caption = "记录数:" & CStr(FLEX1.Rows - 1)
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
    Case vbKeyF5
        Call Cmd2_Click(0)
    Case vbKeyF9
        Call Cmd2_Click(2)
    Case vbKeyEscape
        Call Cmd2_Click(1)
    End Select
End Sub

Sub MAIN(t_gnmc As String)
   Label1.Caption = t_gnmc
End Sub
    
Private Sub Cmd2_Click(Index As Integer)
    Select Case Index
    Case 0  '打印
        Set rec = PUB_data.OpenRecordset("SELECT ZH,KR_X,KR_M,KR_XBMC,GJMC,RZRQ,BZ,ZXFE FROM " & t_nam & " WHERE CSTR(LDRQ)='" & scgl_ldkr_ldrq.rq & "'and LD_FT='1'", 4)
        If Not rec.BOF Then
            rec.MoveLast
            Call print_tabler(rec, scgl_ldkr_ldrq.rq & "离店客人清单", Array("原房号", "客人姓", "客人名", "性别", "国籍", "来店日期", "备注", "消费总额"), Array(8, 15, 15, 8, 16, 12, 20, 12), 20, Array(11, 11, 11, 11, 11, 11, 11, 21))
        End If
    Case 1  '退出
        Unload Me
        'yx_main.Show (1)
    Case 2  '刷新
        Set rec = PUB_data.OpenRecordset("SELECT ZH,KR_X,KR_M,KR_XBMC,GJMC,RZRQ,LDRQ,ZXFE,BZ FROM " & t_nam & " WHERE CSTR(LDRQ)='" & scgl_ldkr_ldrq.rq & "'and LD_FT='1'", 4)
        If Not rec.BOF Then
            rec.MoveLast
        End If
        Call pub_memo.Flex_full(FLEX1, t_bt, rec, t_fields, 9, Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
        rec_no.Caption = "记录数:" & CStr(FLEX1.Rows - 1)
    End Select
End Sub

Private Sub FLEX1_Click()
    Cmd2(0).SetFocus
End Sub

Private Sub FLEX1_GotFocus()
    On Error GoTo error1:
        m_zh.Text = Trim(FLEX1.TextArray(FLEX1.Row * 9))
        m_kr_x.Text = IIf(Trim(FLEX1.TextArray(FLEX1.Row * 9 + 1)) = "*", "", Trim(FLEX1.TextArray(FLEX1.Row * 9 + 1)))
        m_kr_m.Text = IIf(Trim(FLEX1.TextArray(FLEX1.Row * 9 + 2)) = "*", "", Trim(FLEX1.TextArray(FLEX1.Row * 9 + 2)))
        If Trim(FLEX1.TextArray(FLEX1.Row * 9 + 3)) = "男" Then
            xb(0).Value = True
        Else
            If Trim(FLEX1.TextArray(FLEX1.Row * 9 + 3)) = "女" Then
                xb(1).Value = True
            Else
                xb(2).Value = True
            End If
        End If
        m_gjmc.Text = IIf(Trim(FLEX1.TextArray(FLEX1.Row * 9 + 4)) = "*", "", Trim(FLEX1.TextArray(FLEX1.Row * 9 + 4)))
        m_rzrq.Text = IIf(Trim(FLEX1.TextArray(FLEX1.Row * 9 + 5)) = "", "    -  -  ", Format(FLEX1.TextArray(FLEX1.Row * 9 + 5), "yyyy-mm-dd"))
        m_ldrq.Text = IIf(Trim(FLEX1.TextArray(FLEX1.Row * 9 + 6)) = "", "    -  -  ", Format(FLEX1.TextArray(FLEX1.Row * 9 + 6), "yyyy-mm-dd"))
        m_zxfe.Text = Trim(FLEX1.TextArray(FLEX1.Row * 9 + 7))
        m_bz.Text = IIf(Trim(FLEX1.TextArray(FLEX1.Row * 9 + 8)) = "*", "", Trim(FLEX1.TextArray(FLEX1.Row * 9 + 8)))
        Exit Sub
error1:
        If Err() = 383 Then
            Resume Next
        End If
End Sub

Private Sub FLEX1_RowColChange()
    On Error GoTo error1:
        m_zh.Text = Trim(FLEX1.TextArray(FLEX1.Row * 9))
        m_kr_x.Text = IIf(Trim(FLEX1.TextArray(FLEX1.Row * 9 + 1)) = "*", "", Trim(FLEX1.TextArray(FLEX1.Row * 9 + 1)))
        m_kr_m.Text = IIf(Trim(FLEX1.TextArray(FLEX1.Row * 9 + 2)) = "*", "", Trim(FLEX1.TextArray(FLEX1.Row * 9 + 2)))
        If Trim(FLEX1.TextArray(FLEX1.Row * 9 + 3)) = "男" Then
            xb(0).Value = True
        Else
            If Trim(FLEX1.TextArray(FLEX1.Row * 9 + 3)) = "女" Then
                xb(1).Value = True
            Else
                xb(2).Value = True
            End If
        End If
        m_gjmc.Text = IIf(Trim(FLEX1.TextArray(FLEX1.Row * 9 + 4)) = "*", "", Trim(FLEX1.TextArray(FLEX1.Row * 9 + 4)))
        m_rzrq.Text = IIf(Trim(FLEX1.TextArray(FLEX1.Row * 9 + 5)) = "", "    -  -  ", Format(FLEX1.TextArray(FLEX1.Row * 9 + 5), "yyyy-mm-dd"))
        m_ldrq.Text = IIf(Trim(FLEX1.TextArray(FLEX1.Row * 9 + 6)) = "", "    -  -  ", Format(FLEX1.TextArray(FLEX1.Row * 9 + 6), "yyyy-mm-dd"))
        m_zxfe.Text = Trim(FLEX1.TextArray(FLEX1.Row * 9 + 7))
        m_bz.Text = IIf(Trim(FLEX1.TextArray(FLEX1.Row * 9 + 8)) = "*", "", Trim(FLEX1.TextArray(FLEX1.Row * 9 + 8)))
        Exit Sub
error1:
        If Err() = 383 Then
            Resume Next
        End If
End Sub


⌨️ 快捷键说明

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