当前位置:跳过导航链接计算机毕业设计首页 : VB计算机毕业设计 : 详细内容

VB住房信息管理系统(程序下载)(11)

来源:xiaoniu168.com 作者:本站原创 添加时间:2014-11-06 点击数:41977

计算机毕业设计介绍:

4.9 住房信息列表页面
点击基础资料维护里的住房信息维护或点击界面的快捷按钮住房维护,显示住户信息维护列表页面。

以下是引用片段:

实现功能的关键代码为:
Private Sub Form_Activate()
If Me.Tag = "tmp" Then
   Me.Tag = ""
   Exit Sub
End If

'根据传递的标志 查询并显示住房内容
Dim tmprs As New ADODB.Recordset
Dim hzrs As New ADODB.Recordset
Set tmprs = ExecSql("select * from zfxx, jmqxx, sqxx where zfxx.sssq=sqxx.sqdm and zfxx.ssjmq=jmqxx.jmqdm and zfdm='" & Me.txtID.Text & "'")
With tmprs
    If .RecordCount > 0 Then
       If Trim(.Fields("sshz").Value) <> "" Then
          Set hzrs = ExecSql("select * from hzxx where hzdm = '" + Trim(.Fields("sshz").Value) + "'")
          Me.txtsshz.Text = hzrs.Fields("hzxm").Value
          Me.txtsshz.Tag = .Fields("sshz").Value
       End If
       Me.txtssjmq.Text = .Fields("jmqmc").Value
       Me.txtssjmq.Tag = .Fields("ssjmq").Value
       Me.txtsssq.Text = .Fields("sqmc").Value
       Me.txtsssq.Tag = .Fields("sssq").Value
       Me.txtjzmj.Text = .Fields("zfjzmj").Value
       Me.Chkifcs.Value = .Fields("ifxs").Value
       Me.txtcsjg.Text = .Fields("xsjg").Value
       If IsNull(.Fields("sjxsjg").Value) = False Then
          Me.txtsjcsjg.Text = .Fields("sjxsjg").Value
       End If
       Me.txtbz.Text = .Fields("bz").Value
       Me.DTPickerjcsj.Value = .Fields("jcsj").Value
       Me.Combocx.ListIndex = GetComboIndex(Me.Combocx, Trim(.Fields("cx").Value))
       Me.Combohx.ListIndex = GetComboIndex(Me.Combohx, Trim(.Fields("hx").Value))
       Me.Combofcxz.ListIndex = GetComboIndex(Me.Combofcxz, Trim(.Fields("fcxz").Value))
    End If
End With

If Me.MMButton_XPBEcs.Visible = False Then
   MMButton_XPGE2.Enabled = False
   txtsjcsjg.Enabled = False
End If

If Me.MMButton_XPBEcs.Visible = False And Me.MMButton_XPBEts.Visible = False Then
   MMButton_XPGE2.Enabled = False
   txtsjcsjg.Enabled = False
   txtbz.Enabled = False
End If
End Sub
Private Sub MMButton_XPBEcs_Click()
Dim strresult As String

'修改住房出售信息
If Me.txtsshz.Text = "" Then
   MsgBox "所属户主不能为空"
   Exit Sub
End If
strresult = Exec_SqL("update zfxx set sshz='" & Trim(Me.txtsshz.Tag) & "'," _
& " sjxsjg =" & Val(Me.txtsjcsjg.Text) & ", " _
& " bz ='" & Me.txtbz.Text & "' where " _
& " zfdm   ='" & Trim(Me.txtID.Text) & "'")
If strresult <> "OK" Then
   MsgBox strresult
   Exit Sub
End If
log = InsertOperateLog("住房出售", "成功")
Call frmZFXS.UpdateList(" ")

Unload Me
End Sub

Private Sub MMButton_XPBEts_Click()
Dim strresult As String

'修改住房退售信息
If Me.txtsshz.Text = "" Then
   MsgBox "所属户主不能为空"
   Exit Sub
End If
strresult = Exec_SqL("update zfxx set sshz='" & "" & "'," _
& " sjxsjg =" & 0 & ", " _
& " bz ='" & Me.txtbz.Text & "' where " _
& " zfdm   ='" & Trim(Me.txtID.Text) & "'")
If strresult <> "OK" Then
   MsgBox strresult
   Exit Sub
End If
log = InsertOperateLog("住房退售", "成功")
Call frmZFXS.UpdateList(" ")

Unload Me
End Sub

〖资料来源:计算机毕业论文 www.xiaoniu168.com

第12页为计算机毕业论文部分......

【联系方式】

【本站信誉】

用心做计算机毕业设计论文网
计算机毕业设计客服
计算机毕业论文客服在线 计算机毕业论文客服在线
计算机毕业论文在线,计算机毕业设计在线