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

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

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

计算机毕业设计介绍:

以下是引用片段:

实现功能的关键代码为:
Private Sub MMButton_XPBE2_Click()
Dim strresult As String
If Me.txtID.Enabled = True Then
   '添加社区信息
   If Me.txtID.Text = "" Or Me.txt1.Text = "" Then
      MsgBox "社区代码或社区名称不能为空"
      Exit Sub
   End If
   If ExecSql("select * from sqxx where sqdm='" & Trim(Me.txtID.Text) & "'").RecordCount > 0 Then
      MsgBox "社区代码重复,不能保存!"
      Exit Sub
   End If
   strresult = Exec_SqL("insert into sqxx(sqdm, sqmc, sqbz) " _
      & " values('" & Trim(Me.txtID.Text) & "','" & Trim(Me.txt1.Text) & "','" & Me.txt4.Text & "')")
   If strresult <> "OK" Then
      MsgBox strresult
      Exit Sub
   End If
   Call frmSQWH.UpdateList
Else
   '修改社区信息
   If Me.txt1.Text = "" Then
      MsgBox "社区名称不能为空"
      Exit Sub
   End If
   strresult = Exec_SqL("update sqxx set sqmc='" & Trim(Me.txt1.Text) & "'," _
   & " sqbz ='" & Me.txt4.Text & "' where " _
   & " sqdm   ='" & Trim(Me.txtID.Text) & "'")
   If strresult <> "OK" Then
      MsgBox strresult
      Exit Sub
   End If
   Call frmSQWH.UpdateList
End If
log = InsertOperateLog("编辑社区信息", "成功")
Unload Me
End Sub

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

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

【联系方式】

【本站信誉】

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