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

📄 frmchangef.frm

📁 酒店管理系统 (VB版) 简单的酒店管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Frmchangef 
   Caption         =   "修改房类详情"
   ClientHeight    =   4170
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4635
   LinkTopic       =   "Form2"
   ScaleHeight     =   4170
   ScaleWidth      =   4635
   StartUpPosition =   3  '窗口缺省
   Begin VB.CheckBox Checktype 
      Caption         =   "修改房间类型名称:"
      ForeColor       =   &H00000000&
      Height          =   375
      Left            =   480
      TabIndex        =   9
      Top             =   240
      Width           =   1935
   End
   Begin VB.CheckBox Checkbed 
      Caption         =   "修改床位数:"
      ForeColor       =   &H00000000&
      Height          =   495
      Left            =   480
      TabIndex        =   8
      Top             =   840
      Width           =   1335
   End
   Begin VB.CheckBox Checkprice 
      Caption         =   "修改单价:"
      ForeColor       =   &H00000000&
      Height          =   615
      Left            =   480
      TabIndex        =   7
      Top             =   1560
      Width           =   1215
   End
   Begin VB.CheckBox Checkremark 
      Caption         =   "修改备注:"
      ForeColor       =   &H00000000&
      Height          =   495
      Left            =   480
      TabIndex        =   6
      Top             =   2400
      Width           =   1335
   End
   Begin VB.CommandButton Cmdchange 
      Caption         =   "修改"
      Height          =   615
      Left            =   720
      TabIndex        =   5
      Top             =   3240
      Width           =   1215
   End
   Begin VB.CommandButton Cmdcancel 
      Caption         =   "返回"
      Height          =   615
      Left            =   2640
      TabIndex        =   4
      Top             =   3240
      Width           =   1215
   End
   Begin VB.TextBox Texttypename 
      Height          =   375
      Left            =   2640
      TabIndex        =   3
      Top             =   240
      Width           =   1215
   End
   Begin VB.TextBox Textbed 
      Height          =   375
      Left            =   2040
      TabIndex        =   2
      Top             =   960
      Width           =   1215
   End
   Begin VB.TextBox Textprice 
      Height          =   375
      Left            =   2040
      TabIndex        =   1
      Top             =   1680
      Width           =   1215
   End
   Begin VB.TextBox Textremark 
      Height          =   495
      Left            =   2040
      TabIndex        =   0
      Top             =   2400
      Width           =   1575
   End
End
Attribute VB_Name = "Frmchangef"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim str As String

Private Sub Cmdcancel_Click()
Unload Me
End Sub

Private Sub Cmdchange_Click()
Set cnn = New ADODB.Connection
Dim connectstring As String
connectstring = "DSN=hotelodbc"
cnn.Open connectstring

Dim a As String
If Checktype.Value = 1 Then
str = "update roomtype set typename='" & Texttypename & "' where typename='" & frmchaxunf.Dataroom.Columns(0) & "'"
cnn.Execute str
a = "'房间类型名称'"
Else: a = ""
End If

Dim b As String
If Checkbed.Value = 1 Then
str = "update roomtype set beds='" & Textbed & "' where typename='" & frmchaxunf.Dataroom.Columns(0) & "'"
cnn.Execute str
b = "'床位数'"
Else: b = ""
End If

Dim c As String
If Checkprice.Value = 1 Then
str = "update roomtype set price='" & Textprice & "' where typename='" & frmchaxunf.Dataroom.Columns(0) & "'"
cnn.Execute str
c = "'单价'"
Else: c = ""
End If

Dim d As String
If Checkremark.Value = 1 Then
str = "update roomtype set remarks='" & Textremark & "' where typename='" & frmchaxunf.Dataroom.Columns(0) & "'"
cnn.Execute str
d = "'备注'"
Else: d = ""
End If

If a = "" And b = "" And c = "" And d = "" Then
   MsgBox "未选择任何修改项", vbOKOnly + vbInformation, "提示"
Else
   MsgBox "修改" & a & "" & b & "" & c & "" & d & "成功", vbOKOnly + vbInformation, "提示"
End If

End Sub

Private Sub Form_Load()
Texttypename.Text = frmchaxunf.Dataroom.Columns(0)
Textbed.Text = frmchaxunf.Dataroom.Columns(1)
Textprice.Text = frmchaxunf.Dataroom.Columns(2)
Textremark.Text = frmchaxunf.Dataroom.Columns(3)
End Sub

⌨️ 快捷键说明

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