?? skcx.frm
字號:
Visible = 0 'False
End
Begin VB.Menu MNU12
Caption = "打印預覽"
Visible = 0 'False
End
Begin VB.Menu MNU13
Caption = "打印 "
Shortcut = ^P
Visible = 0 'False
End
Begin VB.Menu MNU15
Caption = "-"
Visible = 0 'False
End
Begin VB.Menu MNU16
Caption = "退出(&E)"
End
End
Begin VB.Menu MNU2
Caption = "編輯(&E)"
Enabled = 0 'False
Visible = 0 'False
Begin VB.Menu MNU21
Caption = "增加 "
Shortcut = ^A
End
Begin VB.Menu MNU26
Caption = "-"
End
Begin VB.Menu MNU23
Caption = "取消"
Shortcut = ^U
End
Begin VB.Menu MNU24
Caption = "-"
End
Begin VB.Menu MNU22
Caption = "刪除 "
Shortcut = ^D
End
Begin VB.Menu MNU25
Caption = "-"
End
Begin VB.Menu MNU27
Caption = "預訂散客入住"
Shortcut = {F3}
End
End
Begin VB.Menu MNU3
Caption = "查看(&V)"
Begin VB.Menu MNU3_1
Caption = "查找"
Shortcut = ^F
End
Begin VB.Menu MNU3_2
Caption = "消費帳單"
End
End
Begin VB.Menu MNU4
Caption = "計算器(&J)"
End
Begin VB.Menu MNU5
Caption = "幫助(&H)"
Begin VB.Menu MNU51
Caption = "幫助主題"
Shortcut = {F1}
End
Begin VB.Menu MNU53
Caption = "-"
End
Begin VB.Menu MNU54
Caption = "關于紅日軟件..."
End
End
End
Attribute VB_Name = "SKCX"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim DATJDGL As Database
Dim RECHJZT As Recordset
Dim RECZJLB As Recordset
Dim RECLKLB As Recordset
Dim RECYD As Recordset
Private Sub Combo1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then SendKeys "{TAB}"
End Sub
Private Sub Combo3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then SendKeys "{TAB}"
End Sub
Private Sub Combo2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then SendKeys "{TAB}"
End Sub
Private Sub Data1_Reposition()
If IsNumeric(Text5.Text) Then Text5.Text = FormatNumber(Text5.Text, 2, vbTrue, , vbFalse)
If IsNumeric(Text5.Text) Then
If CDbl(Text5.Text) <> 0 Then
Label2(7).Caption = "<大寫>人民幣" + SUMDM(CDbl(Text5.Text))
Else
Label2(7).Caption = "<大寫>"
End If
End If
Text10.Text = Format(Text10.Text, "LONG DATE")
Text11.Text = Format(Text11.Text, "LONG DATE")
End Sub
Private Sub Data2_Reposition()
If IsNumeric(Text12(8).Text) Then Text12(8).Text = FormatCurrency(Text12(8).Text, , vbTrue, , vbFalse)
If IsNumeric(Text12(8).Text) Then
If CDbl(Text12(8).Text) <> 0 Then
Label2(18).Caption = "<大寫>人民幣" + SUMDM(CDbl(Text12(8).Text))
Else
Label2(18).Caption = "<大寫>"
End If
End If
Text12(0).Text = Format(Text12(0).Text, "LONG DATE")
End Sub
Private Sub Form_Activate()
If IsNumeric(Text5.Text) Then Text5.Text = FormatNumber(Text5.Text, 2, vbTrue, , vbFalse)
If IsNumeric(Text5.Text) Then
If CDbl(Text5.Text) <> 0 Then
Label2(7).Caption = "<大寫>人民幣" + SUMDM(CDbl(Text5.Text))
Else
Label2(7).Caption = "<大寫>"
End If
End If
Text10.Text = Format(Text10.Text, "LONG DATE")
Text11.Text = Format(Text11.Text, "LONG DATE")
If IsNumeric(Text12(8).Text) Then Text12(8).Text = FormatCurrency(Text12(8).Text, , vbTrue, , vbFalse)
If IsNumeric(Text12(8).Text) Then
If CDbl(Text12(8).Text) <> 0 Then
Label2(18).Caption = "<大寫>人民幣" + SUMDM(CDbl(Text12(8).Text))
Else
Label2(18).Caption = "<大寫>"
End If
End If
Text12(0).Text = Format(Text12(0).Text, "LONG DATE")
End Sub
Private Sub Form_Load()
Data1.DatabaseName = App.Path & "\data\jdgl.mdb"
Data1.Refresh
Data2.DatabaseName = App.Path & "\data\jdgl.mdb"
Data2.Refresh
Set DATJDGL = OpenDatabase(App.Path & "\DATA\JDGL.MDB")
Set RECHJZT = DATJDGL.OpenRecordset("房間狀態", dbOpenDynaset)
End Sub
DATJDGL.Close
End Sub
Private Sub MNU11_Click() '打印機設置
CDLTEST.flags = cdlPDDisablePrintToFile
CDLTEST.Copies = 3
CDLTEST.PrinterDefault = True
CDLTEST.ShowPrinter
End Sub
Private Sub MNU16_Click() ' 退出模塊
Unload Me
End Sub
Private Sub MNU3_1_Click()
If Data1.Recordset.RecordCount = 0 Then
MsgBox "無可查信息!", vbCritical, "提示信息"
Exit Sub
End If
Else
If Data2.Recordset.RecordCount = 0 Then
MsgBox "無可查信息!", vbCritical, "提示信息"
Exit Sub
End If
End If
Load SKRZCXWIN
If SSTab1.Tab = 0 Then
SKRZCXWIN.Caption = "住房散客登記"
Else
SKRZCXWIN.Caption = "非住房散客登記"
End If
SKRZCXWIN.Show vbModal
If SSTab1.Tab = 0 Then
If SKRZCXWIN.STRKRID <> "" Then Data1.Recordset.FindFirst ("客人ID='" & SKRZCXWIN.STRKRID & "'")
Else
If SKRZCXWIN.STRKRID <> "" Then Data2.Recordset.FindFirst ("客人ID='" & SKRZCXWIN.STRKRID & "'")
End If
End Sub
Private Sub MNU3_2_Click()
Dim STRKRID As String
If SSTab1.Tab = 0 Then
If Data1.Recordset.RecordCount = 0 Then
MsgBox "無可查信息!", vbCritical, "提示信息"
Exit Sub
End If
Else
If Data2.Recordset.RecordCount = 0 Then
MsgBox "無可查信息!", vbCritical, "提示信息"
Exit Sub
End If
End If
Load KRCXZD
If SSTab1.Tab = 0 Then
STRKRID = Text6.Text
KRCXZD.Caption = KRCXZD.Caption + "─" + STRKRID + " " + Text2.Text
Else
STRKRID = Label5.Caption
KRCXZD.Caption = KRCXZD.Caption + "─" + STRKRID + " " + Text12(1).Text
End If
KRCXZD.Data3(0).DatabaseName = App.Path & "\data\jdgl.mdb"
seleid1 = "SELECT 客人帳單.客人ID,客人帳單.日期, 客人帳單.保證金,客人帳單.房費,客人帳單.商品, 客人帳單.加床費, 客人帳單.停車, 客人帳單.電話, 客人帳單.餐費, 客人帳單.酒水, 客人帳單.商務, 客人帳單.會議, 客人帳單.酒吧, 客人帳單.舞廳, 客人帳單.旅游, 客人帳單.損失賠償, 客人帳單.其他, 客人帳單.操作員,客人帳單.班次 From 客人帳單 WHERE (((客人帳單.客人ID)='" & STRKRID & "')) AND 客人帳單.保證金=0"
KRCXZD.Data3(0).Refresh
KRCXZD.Data3(1).Recordset.FindFirst ("客人ID='" & STRKRID & "'")
KRCXZD.Show vbModal
End Sub
Private Sub MNU4_Click() ' 計算器
Dim jsq As Double
jsq = Shell("calc", vbNormalNoFocus)
End Sub
Private Sub MNU51_Click()
Shell App.Path & "\hh.exe " & App.Path & "\help.chm", vbNormalFocus
End Sub
Private Sub MNU54_Click() ' 關于對話
Load frmAbout
frmAbout.Show vbModal
End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = 13 Then SendKeys "{TAB}"
End Sub
Private Sub Text10_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then SendKeys "{TAB}"
End Sub
Private Sub Text11_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then SendKeys "{TAB}"
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text2.DataChanged = True Then
Label4.Caption = PYM(Text2.Text)
End If
SendKeys "{TAB}"
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then SendKeys "{TAB}"
End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
Dim STRVALID As String
If KeyAscii = 13 Then
If Not IsNumeric(Text5.Text) Then Text5.Text = 0
Text5.Text = FormatNumber(Text5.Text, 2, vbTrue, , vbFalse)
If IsNumeric(Text5.Text) Then
If CDbl(Text5.Text) <> 0 Then
Label2(7).Caption = "<大寫>人民幣" + SUMDM(CDbl(Text5.Text))
Else
Label2(7).Caption = "<大寫>"
End If
End If
SendKeys "{TAB}"
End If
STRVALID = "0123456789.+-"
If KeyAscii > 26 Then
If InStr(STRVALID, Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End If
End Sub
Private Sub TEXT7_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then SendKeys "{TAB}"
End Sub
Private Sub Text8_KeyPress(KeyAscii As Integer)
Dim STRVALID As String
STRVALID = "0123456789"
If KeyAscii > 26 Then
If InStr(STRVALID, Chr(KeyAscii)) = 0 Then
KeyAscii = 0
End If
End If
If KeyAscii = 13 Then
If Text8.DataChanged Then
If Not IsNumeric(Text8.Text) Then Text8.Text = 0
Text8.Text = CStr(CInt(Text8.Text))
RECHJZT.FindFirst ("房號=" & Text8.Text)
If RECHJZT.NoMatch Then
MsgBox "此房號為空號!", vbCritical, "提示信息"
Else
If RECHJZT("房態") = "空房" Then
RECHJZT.Edit
RECHJZT("房態") = "在住"
RECHJZT.Update
SendKeys "{TAB}"
Else
If RECHJZT("房態") = "在住" Then
SFOK = MsgBox("此房間已有客人入住!是否加客?", vbYesNo + vbQuestion, "提示信息")
If SFOK = vbYes Then SendKeys "{TAB}"
Else
If RECHJZT("房態") = "維修" Then
MsgBox "此房間正在維修!", vbCritical, "提示信息"
Else
If RECHJZT("房態") = "走房" Then
MsgBox "此房間客人剛走,還未清掃!", vbCritical, "提示信息"
End If
End If
End If
End If
End If
Else
SendKeys "{TAB}"
End If
End If
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case UCase(Button.Key)
Case "A" ' 打印
Case "B" ' 打印預覽
Case "I" ' 查看
MNU3_1_Click
Case "ZD"
MNU3_2_Click
Case "K" ' 計算器
MNU4_Click
Case "M" ' 幫助
MNU51_Click
Case "N" ' 退出
Unload Me
End Select
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -