📄 frmfang.frm
字号:
TabIndex = 35
Top = 480
Width = 975
End
Begin VB.Label Label2
BackColor = &H00FFFF80&
Caption = "租售状态:"
Height = 255
Left = 4800
TabIndex = 34
Top = 480
Width = 975
End
Begin VB.Label Label3
BackColor = &H00FFFF80&
Caption = "房产类型:"
Height = 255
Left = 1080
TabIndex = 33
Top = 960
Width = 975
End
Begin VB.Label Label4
BackColor = &H00FFFF80&
Caption = "地 区:"
Height = 255
Left = 4800
TabIndex = 32
Top = 960
Width = 975
End
Begin VB.Label Label5
BackColor = &H00FFFF80&
Caption = "楼 层 :"
Height = 255
Left = 1080
TabIndex = 31
Top = 1440
Width = 975
End
Begin VB.Label Label6
BackColor = &H00FFFF80&
Caption = "户 型:"
Height = 255
Left = 4800
TabIndex = 30
Top = 1440
Width = 975
End
Begin VB.Label Label7
BackColor = &H00FFFF80&
Caption = "面 积 :"
Height = 255
Left = 1080
TabIndex = 29
Top = 1920
Width = 975
End
Begin VB.Label Label8
BackColor = &H00FFFF80&
Caption = "装修程度:"
Height = 255
Left = 4800
TabIndex = 28
Top = 1920
Width = 975
End
Begin VB.Label Label9
BackColor = &H00FFFF80&
Caption = "单 价 :"
Height = 255
Left = 1080
TabIndex = 27
Top = 2400
Width = 975
End
Begin VB.Label Label10
BackColor = &H00FFFF80&
Caption = "总 价:"
Height = 255
Left = 4800
TabIndex = 26
Top = 2400
Width = 975
End
Begin VB.Label Label11
BackColor = &H00FFFF80&
Caption = "建成时间:"
Height = 255
Left = 1080
TabIndex = 25
Top = 2880
Width = 975
End
Begin VB.Label Label12
BackColor = &H00FFFF80&
Caption = "房 主:"
Height = 255
Left = 4800
TabIndex = 24
Top = 2880
Width = 975
End
Begin VB.Label Label13
BackColor = &H00FFFF80&
Caption = "电 话 :"
Height = 255
Left = 1080
TabIndex = 23
Top = 3360
Width = 975
End
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "frmFang.frx":0000
Height = 4455
Left = 360
TabIndex = 0
Top = 240
Width = 14535
_ExtentX = 25638
_ExtentY = 7858
_Version = 393216
AllowUpdate = -1 'True
BackColor = 16776960
ForeColor = 0
HeadLines = 1
RowHeight = 15
AllowAddNew = -1 'True
AllowDelete = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.Menu mnufang
Caption = "房源信息(&F)"
Begin VB.Menu mnufangguan
Caption = "房源管理"
Enabled = 0 'False
End
Begin VB.Menu mnufangcha
Caption = "房源查询"
End
End
Begin VB.Menu mnuke
Caption = "客户信息(&K)"
End
Begin VB.Menu mnujiao
Caption = "交易信息(&J)"
Begin VB.Menu mnujiaoguan
Caption = "交易管理"
End
Begin VB.Menu mnujiaocha
Caption = "交易查询"
End
End
Begin VB.Menu mnuxi
Caption = "系统管理(&M)"
Begin VB.Menu mnuzeng
Caption = "增加用户"
End
Begin VB.Menu mnugai
Caption = "修改密码"
End
End
Begin VB.Menu mnutui
Caption = "退出系统(&Q)"
End
End
Attribute VB_Name = "frmFang"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.Recordset.Update
frmFang.Hide
frmMain.Show
End Sub
Private Sub cmdAdd_Click()
Adodc1.Recordset.AddNew '添加操作
cmdAdd.Enabled = False '使相关按钮失效
cmdDelete.Enabled = False
End Sub
Private Sub cmdFirst_Click()
Adodc1.Recordset.MoveFirst
End Sub
Private Sub cmdLast_Click()
Adodc1.Recordset.MoveLast
End Sub
Private Sub cmdNext_Click()
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveLast
End If
End Sub
Private Sub cmdPre_Click()
Adodc1.Recordset.MovePrevious
If Adodc1.Recordset.BOF Then
Adodc1.Recordset.MoveFirst
End If
End Sub
Private Sub cmdUpdate_Click()
If Text1.Text <> "" Then '控制ID不能为空
'将绑定控件的当前值写入记录集的相应字段中
'Adodc1.Recordset.AddNew
Adodc1.Recordset("房源ID") = Text1.Text
Adodc1.Recordset("租售状态") = Text2.Text
Adodc1.Recordset("房产类型") = Text3.Text
Adodc1.Recordset("地区") = Text4.Text
Adodc1.Recordset("楼层") = Text5.Text
Adodc1.Recordset("户型") = Text6.Text
Adodc1.Recordset("面积") = Text7.Text
Adodc1.Recordset("装修程度") = Text8.Text
Adodc1.Recordset("单价") = Text9.Text
Adodc1.Recordset("总价") = Text10.Text
Adodc1.Recordset("建成时间") = CDate(Text11.Text)
Adodc1.Recordset("房主") = Text12.Text
Adodc1.Recordset("电话") = Text13.Text
Adodc1.Recordset.Update '更新操作
cmdAdd.Enabled = True '使有关按钮生效
cmdDelete.Enabled = True
Else
MsgBox "房源ID不能为空,请重新输入", vbExclamation, "信息"
Text3.SetFocus
End If
End Sub
Private Sub cmdDelete_Click()
Dim r As Integer
r = MsgBox("确定删除当前记录?", vbExclamation + vbYesNo)
If r = vbYes Then '使用一个消息框实现对删除操作的确认
Adodc1.Recordset.Delete
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveLast
End If
Adodc1.Recordset.Update
End If
End Sub
Private Sub mnufangcha_Click()
frmFang.Hide
frmFangcx.Show
End Sub
Private Sub mnugai_Click()
frmXiu.Show
End Sub
Private Sub mnujiaocha_Click()
frmFang.Hide
frmjiaocha.Show
End Sub
Private Sub mnujiaoguan_Click()
frmFang.Hide
frmJiao.Show
End Sub
Private Sub mnuke_Click()
frmFang.Hide
frmKe.Show
End Sub
Private Sub mnutui_Click()
Unload Me
End
End Sub
Private Sub mnuzeng_Click()
frmZeng.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -