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

📄 frmaddroom.frm

📁 针对于订房中心的酒店合同管理。管理权限有管理员和业务员等。
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmaddroom 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "添加酒店房型"
   ClientHeight    =   3360
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7380
   Icon            =   "frmaddroom.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3360
   ScaleWidth      =   7380
   StartUpPosition =   2  '屏幕中心
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   2040
      Top             =   3720
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Frame Frame1 
      Height          =   3255
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   6855
      Begin VB.CommandButton Command2 
         Caption         =   "取消返回"
         Height          =   375
         Left            =   3840
         TabIndex        =   17
         Top             =   2520
         Width           =   1455
      End
      Begin VB.CommandButton Command1 
         Caption         =   "添加房型"
         Height          =   375
         Left            =   1440
         TabIndex        =   16
         Top             =   2520
         Width           =   1455
      End
      Begin VB.TextBox Text3 
         Height          =   375
         Left            =   4440
         TabIndex        =   13
         Top             =   1800
         Width           =   1335
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Left            =   1080
         TabIndex        =   10
         Top             =   1800
         Width           =   1215
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         Left            =   4440
         TabIndex        =   6
         Top             =   1080
         Width           =   2175
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   1080
         TabIndex        =   5
         Top             =   1080
         Width           =   1215
      End
      Begin VB.TextBox Room 
         Height          =   375
         Left            =   4440
         TabIndex        =   3
         Top             =   360
         Width           =   2175
      End
      Begin VB.ComboBox hotel 
         Height          =   300
         Left            =   1080
         TabIndex        =   1
         Top             =   360
         Width           =   1935
      End
      Begin VB.Label Label4 
         Caption         =   "RMB"
         Height          =   255
         Index           =   1
         Left            =   5880
         TabIndex        =   15
         Top             =   1920
         Width           =   375
      End
      Begin VB.Label Label7 
         Caption         =   "同行价:"
         Height          =   255
         Left            =   3720
         TabIndex        =   14
         Top             =   1920
         Width           =   735
      End
      Begin VB.Label Label6 
         Caption         =   "底  价:"
         Height          =   255
         Left            =   360
         TabIndex        =   12
         Top             =   1920
         Width           =   855
      End
      Begin VB.Label Label5 
         Caption         =   "RMB"
         Height          =   255
         Index           =   1
         Left            =   2400
         TabIndex        =   11
         Top             =   1920
         Width           =   375
      End
      Begin VB.Label Label5 
         Caption         =   "早  餐:"
         Height          =   255
         Index           =   0
         Left            =   3720
         TabIndex        =   9
         Top             =   1200
         Width           =   735
      End
      Begin VB.Label Label4 
         Caption         =   "RMB"
         Height          =   255
         Index           =   0
         Left            =   2400
         TabIndex        =   8
         Top             =   1200
         Width           =   375
      End
      Begin VB.Label Label3 
         Caption         =   "销售价:"
         Height          =   255
         Left            =   360
         TabIndex        =   7
         Top             =   1200
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "房  型:"
         Height          =   255
         Left            =   3720
         TabIndex        =   4
         Top             =   480
         Width           =   735
      End
      Begin VB.Label Label1 
         Caption         =   "酒店名称:"
         Height          =   255
         Left            =   120
         TabIndex        =   2
         Top             =   480
         Width           =   975
      End
   End
End
Attribute VB_Name = "frmaddroom"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
 Dim sql As String
 Dim conn As New ADODB.Connection
 Dim rs_readerstyle As New ADODB.Recordset
 conn.Open "provider=Microsoft.Jet.OLEDB.4.0; data source=" & App.Path & "\database\yh8888.mdb"

 If Trim(hotel.Text) = "" Then
   MsgBox "酒店名称不能为空 ", vbOK0nly + vbExclamation, ""
   hotel.SetFocus
   Exit Sub
 Else
 sql = "select * from 房型"
 rs_readerstyle.Open sql, conn, adOpenKeyset, adLockPessimistic
 If Trim(Room.Text) = "" Then
   MsgBox "房型不能为空", vbOK0nly + vbExclamation, ""
   Room.SetFocus
   Exit Sub
 End If
 If Trim(Text1.Text) = "" Then
   MsgBox "销售价不能为空", vbOK0nly + vbExclamation, ""
   Text1.SetFocus
   Exit Sub
 End If
 If Trim(Combo1.Text) = "" Then
   MsgBox "是否含早不能为空", vbOK0nly + vbExclamation, ""
  Combo1.SetFocus
   Exit Sub
 End If
 If Trim(Text2.Text) = "" Then
 MsgBox "底价不能为空", vbOKOnly + vbExclamation, ""
 Text2.SetFocus
   Exit Sub
 End If
 If Trim(Text3.Text) = "" Then
 MsgBox "同行价不能为空", vbOKOnly + vbExclamation, ""
 Text3.SetFocus
   Exit Sub
 Else
 
 
 'If rs_readerstyle.EOF Then
   rs_readerstyle.AddNew
   rs_readerstyle.Fields(0) = Trim(hotel.Text)
   rs_readerstyle.Fields(1) = Trim(Room.Text)
   rs_readerstyle.Fields(2) = Trim(Text1.Text)
   rs_readerstyle.Fields(3) = Trim(Combo1.Text)
   rs_readerstyle.Fields(4) = Trim(Text2.Text)
   rs_readerstyle.Fields(5) = Trim(Text3.Text)
   rs_readerstyle.Update
   'MsgBox "添加酒店房型成功!", vbOKOnly, ""
   'rs_readerstyle.Close
   ' Else
   MsgBox "添加酒店房型成功!", vbOKOnly + vbExclamation, ""
  Me.Hide
End If
End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim sql As String
Dim rs As New ADODB.Recordset
Dim conn As New ADODB.Connection
conn.Open "provider=Microsoft.Jet.OLEDB.4.0; data source=" & App.Path & "\database\yh8888.mdb"
InputTime = 0
sql = "Select [酒店名称] from [酒店合同]"
rs.Open sql, conn, adOpenKeyset, adLockPessimistic
Adodc1.ConnectionString = conn
TotalNum = rs.RecordCount
For i = 1 To TotalNum
hotel.AddItem rs.Fields("酒店名称")
rs.MoveNext
Next i
rs.Close
Set rs = Nothing

Combo1.AddItem "无早"
Combo1.AddItem "单早"
Combo1.AddItem "双早"
Exit Sub
End Sub

⌨️ 快捷键说明

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