frmbuildinglogin.frm

来自「一个优秀的售楼系统,可供毕业生毕业设计参考」· FRM 代码 · 共 608 行 · 第 1/2 页

FRM
608
字号
VERSION 5.00
Begin VB.Form frmbuildinglogin 
   BackColor       =   &H00C0FFFF&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "楼盘登记"
   ClientHeight    =   7710
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   9690
   LinkTopic       =   "Form3"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   7710
   ScaleWidth      =   9690
   StartUpPosition =   2  '屏幕中心
   Begin VB.PictureBox gridloupan 
      Height          =   3495
      Left            =   360
      ScaleHeight     =   3435
      ScaleWidth      =   8715
      TabIndex        =   24
      Top             =   360
      Width           =   8775
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00C0FFFF&
      Caption         =   "楼盘登记"
      Height          =   3255
      Left            =   360
      TabIndex        =   0
      Top             =   4080
      Width           =   8775
      Begin VB.TextBox txtnum 
         Height          =   285
         Left            =   1200
         TabIndex        =   12
         Top             =   360
         Width           =   1215
      End
      Begin VB.TextBox txtlouhao 
         BackColor       =   &H0080C0FF&
         Enabled         =   0   'False
         Height          =   285
         Left            =   1200
         TabIndex        =   11
         Top             =   840
         Width           =   495
      End
      Begin VB.TextBox txtdanyuan 
         BackColor       =   &H0080C0FF&
         Enabled         =   0   'False
         Height          =   285
         Left            =   2640
         TabIndex        =   10
         Top             =   840
         Width           =   495
      End
      Begin VB.TextBox txtlouceng 
         BackColor       =   &H0080C0FF&
         Enabled         =   0   'False
         Height          =   285
         Left            =   4080
         TabIndex        =   9
         Top             =   840
         Width           =   495
      End
      Begin VB.TextBox txtfanghao 
         BackColor       =   &H0080C0FF&
         Enabled         =   0   'False
         Height          =   285
         Left            =   5520
         TabIndex        =   8
         Top             =   840
         Width           =   495
      End
      Begin VB.TextBox txthuxingnum 
         Enabled         =   0   'False
         Height          =   285
         Left            =   1200
         TabIndex        =   7
         Top             =   1440
         Width           =   1215
      End
      Begin VB.ComboBox Combo1 
         Height          =   315
         Left            =   3360
         TabIndex        =   6
         Text            =   "选择户型"
         Top             =   1440
         Width           =   1455
      End
      Begin VB.TextBox txtprice 
         Height          =   285
         Left            =   1200
         TabIndex        =   5
         Top             =   2160
         Width           =   1215
      End
      Begin VB.CommandButton cmdadd 
         Caption         =   "增加"
         Height          =   375
         Left            =   1320
         TabIndex        =   4
         Top             =   2760
         Width           =   855
      End
      Begin VB.CommandButton cmdmodify 
         Caption         =   "修改"
         Height          =   375
         Left            =   2880
         TabIndex        =   3
         Top             =   2760
         Width           =   855
      End
      Begin VB.CommandButton cmddel 
         Caption         =   "删除"
         Height          =   375
         Left            =   4320
         TabIndex        =   2
         Top             =   2760
         Width           =   855
      End
      Begin VB.CommandButton cmdexit 
         Caption         =   "退出"
         Height          =   375
         Left            =   5760
         TabIndex        =   1
         Top             =   2760
         Width           =   855
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackColor       =   &H00C0FFFF&
         Caption         =   "楼盘编号:"
         Height          =   195
         Left            =   240
         TabIndex        =   23
         Top             =   360
         Width           =   900
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackColor       =   &H00C0FFFF&
         Caption         =   "楼号:"
         Height          =   195
         Left            =   600
         TabIndex        =   22
         Top             =   840
         Width           =   540
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackColor       =   &H00C0FFFF&
         Caption         =   "单元:"
         Height          =   195
         Left            =   2040
         TabIndex        =   21
         Top             =   840
         Width           =   540
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackColor       =   &H00C0FFFF&
         Caption         =   "楼层:"
         Height          =   195
         Left            =   3480
         TabIndex        =   20
         Top             =   840
         Width           =   540
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         BackColor       =   &H00C0FFFF&
         Caption         =   "房号:"
         Height          =   195
         Left            =   4920
         TabIndex        =   19
         Top             =   840
         Width           =   540
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackColor       =   &H00C0FFFF&
         Caption         =   "户型编号:"
         Height          =   195
         Left            =   240
         TabIndex        =   18
         Top             =   1440
         Width           =   900
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         BackColor       =   &H00C0FFFF&
         Caption         =   "<<----"
         Height          =   195
         Left            =   2640
         TabIndex        =   17
         Top             =   1440
         Width           =   360
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         BackColor       =   &H00C0FFFF&
         Caption         =   "报价:"
         Height          =   195
         Left            =   600
         TabIndex        =   16
         Top             =   2160
         Width           =   540
      End
      Begin VB.Label Label9 
         AutoSize        =   -1  'True
         BackColor       =   &H00C0FFFF&
         Caption         =   "元/平方米"
         Height          =   195
         Left            =   2520
         TabIndex        =   15
         Top             =   2160
         Width           =   795
      End
      Begin VB.Label Label10 
         AutoSize        =   -1  'True
         BackColor       =   &H00C0FFFF&
         Caption         =   "房型资料:"
         Height          =   195
         Left            =   6360
         TabIndex        =   14
         Top             =   360
         Width           =   900
      End
      Begin VB.Label Label11 
         BackColor       =   &H80000009&
         BorderStyle     =   1  'Fixed Single
         Height          =   1695
         Left            =   6360
         TabIndex        =   13
         Top             =   600
         Width           =   1815
      End
   End
   Begin VB.Label Label12 
      AutoSize        =   -1  'True
      BackColor       =   &H00C0FFFF&
      Caption         =   "全部楼盘资料:"
      Height          =   195
      Left            =   360
      TabIndex        =   25
      Top             =   120
      Width           =   1260
   End
End
Attribute VB_Name = "frmbuildinglogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim rs_loupan As New ADODB.Recordset  '楼盘
Dim rs_huxing As New ADODB.Recordset  '户型
Dim select_row As String              '记录选择的楼盘
Dim getrow As Long
Dim gridclick As Boolean

Private Sub cmdmodify_Click()
On Error GoTo modifyerror
txtnum.Enabled = False
If Trim(txtprice.Text) = "" Then
   MsgBox "价格不能为空!", vbOKOnly + vbExclamation, "出错啦!"
   txtprice.SetFocus
   Exit Sub
End If
If Not IsNumeric(txtprice.Text) Then
      MsgBox "价格请输入数字!", vbOKOnly + vbExclamation, ""
      txtprice.SetFocus
      Exit Sub
End If
rs_loupan.MoveFirst
Dim i As Integer
For i = 0 To rs_loupan.RecordCount - 1
    If rs_loupan.Fields(0) = txtnum.Text Then
       rs_loupan.Fields(0) = txtnum.Text
       rs_loupan.Fields(1) = txthuxingnum.Text
       rs_loupan.Fields(2) = CCur(txtprice.Text)
       rs_loupan.Update
       MsgBox "修改成功!", vbOKOnly + vbExclamation, "OK"
       With gridloupan
          .Row = getrow
          .Col = 1
          .Text = txthuxingnum.Text
          .Col = 6
          .Text = txtprice.Text
       End With
       Exit Sub
    End If
    rs_loupan.MoveNext
Next i
modifyerror:
   MsgBox Err.Description
End Sub

Private Sub Combo1_Click()
txthuxingnum.Text = Combo1.List(Combo1.ListIndex)
End Sub

⌨️ 快捷键说明

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