【VB开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了VB开源代码-FMCancelDestine.frm的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form FMCancelDestine
Caption = "取消预定"
ClientHeight = 5100
ClientLeft = 60
ClientTop = 345
ClientWidth = 6330
LinkTopic = "Form1"
ScaleHeight = 5100
ScaleWidth = 6330
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Height = 4095
Left = 0
TabIndex = 2
Top = 360
Width = 6255
Begin VB.TextBox TextClientName
Height = 375
Left = 1680
TabIndex = 13
Top = 360
Width = 1335
End
Begin VB.ComboBox CombRoomID
Height = 300
Left = 4560
TabIndex = 12
Top = 360
Width = 1335
End
Begin VB.ComboBox CombRoomType
Height = 300
ItemData = "FMCancelDestine.frx":0000
Left = 1680
List = "FMCancelDestine.frx":0010
TabIndex = 11
Top = 948
Width = 1335
End
Begin VB.ComboBox CombRoomPrice
Height = 300
ItemData = "FMCancelDestine.frx":002D
Left = 4560
List = "FMCancelDestine.frx":003D
TabIndex = 10
Top = 960
Width = 1335
End
Begin VB.TextBox TextClientTel
Height = 375
Left = 1680
TabIndex = 9
Top = 1461
Width = 1335
End
Begin VB.TextBox TextCount
Height = 375
Left = 4560
TabIndex = 8
Top = 1440
Width = 1335
End
Begin VB.ComboBox CombWaitor
Height = 300
Left = 1680
TabIndex = 7
Top = 2640
Width = 1335
End
Begin VB.TextBox TextPrepay
Height = 375
Left = 4560
TabIndex = 6
Top = 2640
Width = 1335
End
Begin VB.TextBox TextRemake
Height = 615
Left = 1680
TabIndex = 5
Top = 3240
Width = 4215
End
Begin VB.TextBox TextORTime
Height = 375
Left = 4560
TabIndex = 3
Top = 2040
Width = 1335
End
Begin MSComCtl2.DTPicker DTPicker1
Height = 375
Left = 1680
TabIndex = 4
Top = 2040
Width = 1335
_ExtentX = 2355
_ExtentY = 661
_Version = 393216
Format = 154927105
CurrentDate = 39045
End
Begin VB.Label Label3
Caption = "客户:"
Height = 375
Left = 600
TabIndex = 24
Top = 360
Width = 855
End
Begin VB.Label Label4
Caption = "房间编号:"
Height = 375
Left = 3360
TabIndex = 23
Top = 360
Width = 855
End
Begin VB.Label Label5
Caption = "房间类型:"
Height = 255
Left = 600
TabIndex = 22
Top = 1008
Width = 855
End
Begin
VB.Label Label6
Caption = "房价价格:"
Height = 255
Left = 3360
TabIndex = 21
Top = 960
Width = 855
End
Begin VB.Label Label7
Caption = "客户电话:"
Height = 345
Left = 600
TabIndex = 20
Top = 1530
Width = 855
End
Begin VB.Label Label8
Caption = "人 数:"
Height = 255
Left = 3360
TabIndex = 19
Top = 1440
Width = 735
End
Begin VB.Label Label9
Caption = "开房日期:"
Height = 375
Left = 600
TabIndex = 18
Top = 2040
Width = 855
End
Begin VB.Label Label10
Caption = "操作员:"
Height = 255
Left = 600
TabIndex = 17
Top = 2640
Width = 975
End
Begin VB.Label Label11
Caption = "备 注:"
Height = 375
Left = 600
TabIndex = 16
Top = 3240
Width = 975
End
Begin VB.Label Label12
Caption = "开房时间:"
Height = 255
Left = 3360
TabIndex = 15
Top = 2040
Width = 975
End
Begin VB.Label Label13
Caption = "预付金额:"
Height = 375
Left = 3360
TabIndex = 14
Top = 2640
Width = 975
End
End
Begin VB.CommandButton ComdCancel
Caption = "取消"
Height = 495
Left = 5280
TabIndex = 1
Top = 4560
Width = 735
End
Begin VB.CommandButton ComdOK
Caption = "确定"
Height = 495
Left = 4320
TabIndex = 0
Top = 4560
Width = 735
End
Begin VB.Label Label1DestineID
Height = 255
Left = 1560
TabIndex = 27
Top = 120
Width = 1095
End
Begin VB.Label LabelDestineID
Caption = "预定单编号:"
Height = 255
Left = 360
TabIndex = 26
Top = 120
Width = 1095
End
Begin VB.Label LabelDate
Height = 255
Left = 5280
TabIndex = 25
Top = 120
Width = 975
End
End
Attribute VB_Name = "FMCancelDestine"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim ReadDestine As New ADODB.Recordset
Dim SqlStr As String
Private Sub ComdCancel_Click()
Unload Me
End Sub
Private Sub ComdOK_Click()
Dim Str As String
SqlStr = "select * from DestineInfo where " & "RoomID='" & Trim(Me.CombRoomID.Text) & "'"
ReadDestine.Open SqlStr, g_DBConn, adOpenStatic, adLockOpti
mistic
ReadDestine.Delete
ReadDestine.Close
MsgBox "取消预定成功!"
Str = "update RoomInfo set RoomState='空房' where " & " RoomID='" & Trim(Me.CombRoomID.Text) & "'"
g_DBConn.Execute Str
Unload Me
End Sub
Private Sub Form_Load()
Me.Top = (Screen.Height - Me.Height) / 2 '垂直方向居中
Me.Left = (Screen.Width - Me.Height) / 2 '水平方向居中
'读取房间编号
Dim iRoomID As Integer
Dim strRoomID As String
Dim iRow, iCol As Integer
iRow = FMMain.MSFlexGrid1.Row
iCol = FMMain.MSFlexGrid1.Col
iRoomID = 10 * iRow + iCol + 1[br