【文章內(nèi)容簡介】
countText yhmale Trim txtmanshuliangText yhfemale Trim txtwomenshuliangText yhshoes Trim txtshoecodeText yhstart Trim txtruzhutimeText yhwillleave Trim txtleavetimeText yhhousesum Trim txtroomcountText yhdeposit Trim txtyajinText yhconfirmpeople Trim txtpizhunrenText yhalreadypaid Trim txtyijingkuanText yhremark Trim txtspecialText yhinputer Trim txtcaozuoyuanText yhwarning Trim CompointText yhcardid Trim txtcikacodeText yhforother Trim txtdairenfuText yhforwhose Trim txtdaiwhofuText If Trim txtbillText Then sMeg 帳單號碼 sMeg sMeg 不能為空 MsgBox sMeg vbOKOnly vbExclamation 警告 txtbillSetFocus Exit Sub End If If Len txtbillText 6 Then sMeg 你的帳單號碼大于六位了請重新輸入 MsgBox sMeg vbOKOnly vbExclamation 警告 txtbillSetFocus txtbillText Exit Sub End If If Trim txtnameText Then sMeg 主客姓名 sMeg sMeg 不能為空 MsgBox sMeg vbOKOnly vbExclamation 警告 txtnameSetFocus Exit Sub End If With DbCommand CommandType adCmdText CommandText insert into bill billmastersexcertificatecertify_codebirthdayphoneaddressunitmastercodeguesttyperebateguestsummalefemaleshoesstartwillleavehousesumdepositconfirmpeoplealreadypaidremarkinputerwarningcardidforotherforwhose Set DbTempSet Execute sMeg 你的輸入信息已經(jīng)保存成功 MsgBox sMeg vbOKOnly vbExclamation 提示 End With Errp MsgBox ErrDescription vbOKOnly AppTitle End Sub Private Sub Form_Load On Error GoTo Errp frmdengjiTop 1400 frmdengjiLeft 2021 ComzhenjianAddItem 身份證 ComzhenjianAddItem 工作證 ComzhenjianAddItem 學(xué)生證 ComzhenjianAddItem 警官證 ComzhenjianAddItem 駕駛證 ComzhenjianAddItem 居住證 ComzhiyeAddItem 公務(wù)員 ComzhiyeAddItem 學(xué) 生 ComzhiyeAddItem 工 人 ComzhiyeAddItem 教 師 ComzhiyeAddItem 農(nóng) 民 ComzhiyeAddItem 軍 人 ComzhiyeAddItem 警 察 ComleixingAddItem 團(tuán)體 ComleixingAddItem 個人 ComsexAddItem 男 ComsexAddItem 女 CompointAddItem 是 CompointAddItem 否 Errp MsgBox ErrDescription vbOKOnly AppTitle End Sub 打開主界面的客房管理選擇客房信息查詢目的就是對房間的編號房間的類型樓層預(yù)定情況就行查詢選中房間編號單擊查詢界面會出現(xiàn)相關(guān)的數(shù)據(jù)依次類推最后單擊退出按鈕回到主界面 《客房信息查詢》代碼如下 Private Sub Commandfresh_Click Call Commandquery_Click End Sub Private Sub Commandquery_Click Dim StrSql As String Dim StrCon As String Dim i As Integer Dim bianhao As String Dim loucheng As String Dim roomleixing As String Dim ordercondition As String On Error GoTo Errp XsheetClear XsheetRefresh Call BuildTitle If roombianhaoValue True Then bianhao Trim PosCboText StrSql select roomcoderoomtypefloorphoneroomstutusreservedreservetimefreetimeremarkselectedcleaned FROM roomstate where roomcode bianhao End If If CheckfloorValue True Then loucheng Mid Trim CombofloorText 1 1 StrSql select roomcoderoomtypefloorphoneroomstutusreservedreservetimefreetimeremarkselectedcleane FROM roomstate where floor loucheng End If If checkroomstatusValue True Then roomleixing Trim PrintCboText StrSql select roomcoderoomtypefloorphoneroomstutusreservedreservetimefreetimeremarkselectedcleane FROM roomstate where roomtype roomleixing End If If checkorderValue True Then ordercondition Trim ComboorderText StrSql select roomcoderoomtypefloorphoneroomstutusreservedreservetimefreetimeremarkselectedcleane FROM roomstate where reserved ordercondition End If With DbCommand CommandText StrSql Set DbTempSet Execute End With With Xsheet Rows 1 Do While Not DbTempSetEOF Rows Rows 1 For i 1 To DbTemt TextMatrix Rows 1 i 1 DbTempSetFields i 1 Next i DbTempSetMoveNext Loop End With Exit Sub Errp MsgBox ErrDescription vbOKOnly AppTitle End Sub Private Sub Commandexit_Click Unload Me End Sub Private Sub Form_Load On Error GoTo Errp Call BuildTitle 建立表頭 With DbCommand CommandType adCmdText CommandText Select roomcode from roomstate Set DbTempSet Execute End With If Not DbTempSetEOF And DbTempSetBOF Then PosCboClear With DbTempSet MoveFirst While Not EOF With PosCbo AddItem LTrim RTrim DbTempSetroomcode End With MoveNext Wend End With PosCboListIndex 0 Else MsgBox 沒有按此編號的客房 vbOKOnly AppTitle End If With DbCommand CommandText Select roomtype from roomstate Set DbTempSet Execute End With If Not DbTempSetEOF And DbTempSetBOF Then PrintCboClear DbTempSetMoveFirst While Not DbTempSetEOF PrintCboAddItem LTrim RTrim DbTempSetroomtype DbTempSetMoveNext Wend PrintCboListIndex 0 Else MsgBox 沒有此種客房類型 vbOKOnly AppTitle End If Wit