小区物业管理系统-物业管理员页面

小区物业管理系统-物业管理员页面

主页面

在这里插入图片描述
在这里插入图片描述

添加业主

在这里插入图片描述

Public Class PropertyManager_Pro_insert
    'bug:插入:若删除一个,用count就会插入相同的,导致插入错误

    Dim proprietor As New Proprietor

    Public Sub New(s As String)
        InitializeComponent()

    End Sub
    Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
        'MsgBox(Len(TextBox1.Text))

        If (TextBox1.Text = "" Or Len(TextBox1.Text) > 5) Then
            MsgBox("请输入姓名或姓名格式错误!")
        Else
            If (RadioButton1.Checked = False And RadioButton2.Checked = False) Then
                MsgBox("请选择性别!")
            Else
                If (TextBox3.Text = "" Or Int(TextBox3.Text) < 0 Or Int(TextBox3.Text) > 150) Then
                    MsgBox("请输入正确年龄!")
                Else
                    If (TextBox4.Text = "" Or Len(TextBox4.Text) > 5) Then
                        MsgBox("请输入籍贯或籍贯格式错误!")
                    Else
                        If (proprietor.fGet = False) Then
                            MsgBox("请选择房屋和车库")
                        Else
                            proprietor.pnameSet(TextBox1.Text)
                            If (RadioButton1.Checked = True) Then
                                proprietor.psexSet("男")
                            End If
                            If (RadioButton2.Checked = True) Then
                                proprietor.psexSet("女")
                            End If
                            proprietor.pageSet(Int(TextBox3.Text))
                            proprietor.pnativeSet(TextBox4.Text)

                            Dim i As Integer = y()
                            proprietor.pnoSet("Y00" + i)
                            ' MsgBox(proprietor.pnoGet)
                            NumberUpdata("y", i + 1)
                            proprietorAllInsert(proprietor)


                            Dim user As New User
                            user.usernameSet(proprietor.pnoGet)
                            user.tableSet("User_Proprietor")
                            User_Insert(user)
                            cost_Insert(proprietor.pnoGet, proprietor.p_bnoGet)
                            Label9.Text = "成功:请记住业主号"
                            Label12.Text = proprietor.pnoGet
                            Label16.Text = "系统初始密码:123"
                        End If
                    End If
                End If
            End If
        End If
    End Sub


    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Dim pbg As New PropertyManager_Pro_insert_B_G(proprietor)
        pbg.ShowDialog()

        'MsgBox(proprietor.p_gnoGet)
        'MsgBox(proprietor.p_bnoGet)
        If (proprietor.fGet) Then
            Button1.Visible = False
            Button2.Visible = False
            Label2.Visible = True
            Label6.Visible = True
            Label6.Text = BuildingAddresss(proprietor.p_bnoGet)
            Label2.Text = garageAll(proprietor.p_gnoGet)
        End If
    End Sub


    Private Sub PropertyManager_Pro_insert_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        '设置同步时间显示

        proprietor.fSet(False)
        Label2.Visible = False
        Label6.Visible = False
        Button1.Visible = True
        Button2.Visible = True

        Label10.Text = Format(Now, "yyyy-mm-dd")
        Label11.Text = Format(Now, "hh:mm:ss")

        Label9.Text = ""
        Label12.Text = ""
        Label16.Text = ""
    End Sub

    Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
        Me.Close()
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Dim pbg As New PropertyManager_Pro_insert_B_G(proprietor)
        pbg.ShowDialog()

        'MsgBox(proprietor.p_gnoGet)
        'MsgBox(proprietor.p_bnoGet)
        If (proprietor.fGet) Then
            Button1.Visible = False
            Button2.Visible = False
            Label2.Visible = True
            Label6.Visible = True
            Label6.Text = BuildingAddresss(proprietor.p_bnoGet)
            Label2.Text = garageAll(proprietor.p_gnoGet)
        End If
    End Sub


End Class

业主查询

在这里插入图片描述
在这里插入图片描述

Public Class PropertyManager_Pro_add
    Dim prop As Proprietor
    Public Sub New(u As String)
        InitializeComponent()
    End Sub
    Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
        If (proprietorSelectCount(TextBox1.Text) > 0) Then
            Button8.Visible = False
            Button9.Visible = False

            Label18.Visible = False
            TextBox1.Visible = False


            Label1.Visible = True
            Label2.Visible = True
            Label3.Visible = True

            Label5.Visible = True
            Label6.Visible = True
            Label7.Visible = True
            Label8.Visible = True
            Label9.Visible = True
            Label10.Visible = True
            Label11.Visible = True
            Label12.Visible = True
            Label16.Visible = True
            Label17.Visible = True

            Button2.Visible = True
            Button3.Visible = True
            Button4.Visible = True

            Button6.Visible = True

            prop = proprietorForPnoName(TextBox1.Text)

            Label10.Text = prop.pnoGet()
            Label17.Text = prop.pnameGet()
            Label16.Text = prop.psexGet()
            Label12.Text = prop.pageGet()
            Label11.Text = prop.pnativeGet()
            Label6.Text = garageAll(prop.p_gnoGet())
            Label9.Text = BuildingAddresss(prop.p_bnoGet)

        Else
            MsgBox("业主不存在!!!")
        End If
    End Sub

    Private Sub PropertyManager_Pro_add_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Label19.Text = Format(Now, "yyyy-mm-dd")
        Label4.Text = Format(Now, "hh:mm:ss")

        Label1.Visible = False
        Label2.Visible = False
        Label3.Visible = False

        Label5.Visible = False
        Label6.Visible = False
        Label7.Visible = False
        Label8.Visible = False
        Label9.Visible = False
        Label10.Visible = False
        Label11.Visible = False
        Label12.Visible = False
        Label16.Visible = False
        Label17.Visible = False

        Button2.Visible = False
        Button3.Visible = False
        Button4.Visible = False

        Button6.Visible = False
    End Sub
    Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
        Me.Close()
    End Sub

    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
        Dim user As User = User_Select(prop.pnoGet, "User_Proprietor")
        user.tableSet("User_Proprietor")
        Dim uer As New Proprietor_UserUpdata(user)
        uer.ShowDialog()
    End Sub

    Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
        Me.Close()
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        '删除
        MsgBox(prop.pnoGet)

        User_Delete(prop.pnoGet)
        cost_Delete(prop.pnoGet)
        proprietor_Delete(prop.pnoGet)
        MsgBox("删除成功")
        Me.Close()
    End Sub

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        Dim uer As New PropertyManager_Pro_updata(prop)
        uer.ShowDialog()

        prop = proprietorAll(prop.pnoGet)
         Label10.Text = prop.pnoGet()
        Label17.Text = prop.pnameGet()
        Label16.Text = prop.psexGet()
        Label12.Text = prop.pageGet()
        Label11.Text = prop.pnativeGet()
        Label6.Text = garageAll(prop.p_gnoGet())
        Label9.Text = BuildingAddresss(prop.p_bnoGet)

    End Sub
End Class

修改业主信息

在这里插入图片描述

Public Class PropertyManager_Pro_updata
    Dim proprietor As Proprietor
    Dim jbno, jgno As String
    Public Sub New(p As Proprietor)
        InitializeComponent()
        proprietor = p
    End Sub
    Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
        'MsgBox(Len(TextBox1.Text))

        If (TextBox1.Text = "" Or Len(TextBox1.Text) > 5) Then
            MsgBox("请输入姓名或姓名格式错误!")
        Else
            If (RadioButton1.Checked = False And RadioButton2.Checked = False) Then
                MsgBox("请选择性别!")
            Else
                If (TextBox3.Text = "" Or Int(TextBox3.Text) < 0 Or Int(TextBox3.Text) > 150) Then
                    MsgBox("请输入正确年龄!")
                Else
                    If (TextBox4.Text = "" Or Len(TextBox4.Text) > 5) Then
                        MsgBox("请输入籍贯或籍贯格式错误!")
                    Else
                            proprietor.pnameSet(TextBox1.Text)
                            If (RadioButton1.Checked = True) Then
                                proprietor.psexSet("男")
                            End If
                            If (RadioButton2.Checked = True) Then
                                proprietor.psexSet("女")
                            End If
                            proprietor.pageSet(Int(TextBox3.Text))
                            proprietor.pnativeSet(TextBox4.Text)

                            ' MsgBox(proprietor.pnoGet)
                            proprietorUP(proprietor)

                            Me.Close()
                    End If
                End If
            End If
        End If
    End Sub


    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

        Dim pbg As New PropertyManager_Pro_insert_B_G(proprietor)
        pbg.ShowDialog()

        'MsgBox(proprietor.p_gnoGet)
        'MsgBox(proprietor.p_bnoGet)
        If (proprietor.fGet) Then
            Button1.Visible = False

       
            Label6.Text = BuildingAddresss(proprietor.p_bnoGet)
            Label2.Text = garageAll(proprietor.p_gnoGet)


        End If
    End Sub
    Private Sub PropertyManager_Pro_updata_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        '设置同步时间显示
        Proprietor.fSet(False)

        Label10.Text = Format(Now, "yyyy-mm-dd")
        Label11.Text = Format(Now, "hh:mm:ss")

        'proprietor = proprietorAll("Y002")

        TextBox1.Text = Trim(proprietor.pnameGet())
        If (proprietor.psexGet() = "男") Then
            RadioButton1.Checked = True
        End If
        If (proprietor.psexGet() = "女") Then
            RadioButton2.Checked = True
        End If
        'MsgBox(proprietor.p_bnoGet)

        TextBox3.Text = proprietor.pageGet()
        TextBox4.Text = Trim(proprietor.pnativeGet())
        Label6.Text = BuildingAddresss(proprietor.p_bnoGet)
        Label2.Text = garageAll(proprietor.p_gnoGet)
        jbno = proprietor.p_bnoGet
        jgno = proprietor.p_gnoGet
    End Sub
    Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
        Me.Close()
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        '设置同步时间显示
        proprietor.fSet(False)

        'proprietor = proprietorAll("Y002")

        TextBox1.Text = Trim(proprietor.pnameGet())
        If (proprietor.psexGet() = "男") Then
            RadioButton1.Checked = True
        End If
        If (proprietor.psexGet() = "女") Then
            RadioButton2.Checked = True
        End If
        'MsgBox(proprietor.p_bnoGet)

        TextBox3.Text = proprietor.pageGet()
        TextBox4.Text = Trim(proprietor.pnativeGet())
        Label6.Text = BuildingAddresss(jbno)
        Label2.Text = garageAll(jgno)
        Button1.Visible = True
    End Sub
End Class

房屋车库选择

在这里插入图片描述

Public Class PropertyManager_Pro_insert_B_G
    Dim pro As Proprietor
    Public Sub New(p As Proprietor)
        InitializeComponent()
        pro = p
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        ListBox1.Items.Clear()
        ListBox2.Items.Clear()
        ListBox3.Items.Clear()
        ListBox4.Items.Clear()
        ListBox5.Items.Clear()
        Label1.Text = ""
        Label2.Text = ""
        ListBox1.Visible = True
        ListBox2.Visible = True
        ListBox4.Visible = True
        ListBox3.Visible = True
        Label5.Visible = True
        Label6.Visible = True
        Label7.Visible = True
        Label8.Visible = True

        Button2.Visible = False
        ListBox5.Visible = False
        Button4.Visible = False
        Dim s() As String = BuildingForBarea()
        For i = 1 To Int(s(0))
            ListBox1.Items.Add(s(i))
        Next
    End Sub

    Private Sub PropertyManager_Pro_insert_B_G_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Label1.Text = ""
        Label2.Text = ""

        Label10.Text = Format(Now, "yyyy-mm-dd")
        Label11.Text = Format(Now, "hh:mm:ss")

        Button2.Visible = False
        ListBox5.Visible = False
        Button4.Visible = False
        Dim s() As String = BuildingForBarea()
        For i = 1 To Int(s(0))
            ListBox1.Items.Add(s(i))
        Next
    End Sub

    Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged
        Label1.Text = ListBox1.Text + "区 "
        ListBox2.Items.Clear()
        Dim s() As String = BuildingForBlouno(ListBox1.Text)
        For i = 1 To Int(s(0))
            ListBox2.Items.Add(s(i))
        Next

    End Sub

    Private Sub ListBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox2.SelectedIndexChanged
        Label1.Text = Label1.Text + ListBox2.Text + "号楼 "
        ListBox3.Items.Clear()
        Dim s() As String = BuildingForBapartment(ListBox1.Text, ListBox2.Text)
        For i = 1 To Int(s(0))
            ListBox3.Items.Add(s(i))
        Next
    End Sub

    Private Sub ListBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox3.SelectedIndexChanged
        Label1.Text = Label1.Text + ListBox3.Text + "单元 "
        ListBox4.Items.Clear()
        Dim s() As String = BuildingForBRoomNo(ListBox1.Text, ListBox2.Text, ListBox3.Text)
        For i = 1 To Int(s(0))
            ListBox4.Items.Add(s(i))
        Next
    End Sub

    Private Sub ListBox4_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox4.SelectedIndexChanged
        Label1.Text = Label1.Text + ListBox4.Text + "户"
        Button2.Visible = True
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        ListBox1.Visible = False
        ListBox2.Visible = False
        ListBox4.Visible = False
        ListBox3.Visible = False
        Label5.Visible = False
        Label6.Visible = False
        Label7.Visible = False
        Label8.Visible = False


        Button2.Visible = False


        ListBox5.Visible = True
        pro.p_bnoSet(BuildingForBno(ListBox1.Text, ListBox2.Text, ListBox3.Text, ListBox4.Text))
        'MsgBox(pro.p_bnoGet)
        Dim s() As String = GarageGaddress()
        For i = 1 To Int(s(0))
            ListBox5.Items.Add(s(i))
        Next
    End Sub

    Private Sub ListBox5_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox5.SelectedIndexChanged
        Label2.Text = ListBox5.Text
        Button4.Visible = True
    End Sub

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click

        Me.Close()
    End Sub

    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
        pro.p_gnoSet(GarageGno(ListBox5.Text))
        'MsgBox(pro.p_gnoGet)
        pro.fSet(True)
        Me.Close()
    End Sub
End Class

费用

在这里插入图片描述
在这里插入图片描述

Public Class Free_Updata
    Dim cost As Cost
    Public Sub New(s As String)
        InitializeComponent()
    End Sub
    Private Sub Free_Updata_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Label19.Text = Format(Now, "yyyy-mm-dd")
        Label4.Text = Format(Now, "hh:mm:ss")
        GroupBox1.Visible = False
        Label17.Visible = False
        Label10.Visible = False
        Label12.Visible = False
        Label16.Visible = False
        Label11.Visible = False
    End Sub

    Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
        If (costSelectCount(TextBox1.Text)) Then
            Label17.Visible = True
            GroupBox1.Visible = True

            cost = cost_Select(TextBox1.Text)
            Label9.Text = cost.cwaterGet
            Label8.Text = cost.celectricityGet
            Label7.Text = cost.cgasGet
            Label6.Text = cost.cpropertyGet

            Label17.Text = BuildingAddresss(cost.c_bnoGet) + " " + proprietorName(cost.c_pnoGet)
            freeQian()
        Else
            MsgBox("业主不存在!")
        End If

    End Sub
    Public Sub freeQian()
        If (cost.cwaterGet < 0) Then
            Label10.Visible = True
            Label10.Text = "欠费"
        Else
            Label10.Visible = False
        End If
        If (cost.celectricityGet < 0) Then
            Label12.Visible = True
            Label12.Text = "欠费"
        Else
            Label12.Visible = False
        End If
        If (cost.cgasGet < 0) Then
            Label16.Visible = True
            Label16.Text = "欠费"
        Else
            Label16.Visible = False
        End If
        If (cost.cpropertyGet < 0) Then
            Label11.Visible = True
            Label11.Text = "欠费"
        Else
            Label11.Visible = False
        End If
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If (Int(TextBox2.Text) > 0) Then
            Dim x As Double = CDbl(TextBox1.Text)
            Label9.Text = CDbl(Label9.Text) + x
            ' MsgBox(CDbl(Label6.Text))
            cost_Updata("Cwater", cost.c_pnoGet, CDbl(Label9.Text))
        Else
            MsgBox("请正确缴费!")

        End If
        freeQian()
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        If (Int(TextBox3.Text) > 0) Then
            Dim x As Double = CDbl(TextBox3.Text)
            Label8.Text = CDbl(Label8.Text) + x
            cost_Updata("Celectricity", cost.c_pnoGet, CDbl(Label8.Text))
        Else
            MsgBox("请正确缴费!")

        End If
        freeQian()
    End Sub

    Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
        If (Int(TextBox5.Text) > 0) Then
            Dim x As Double = CDbl(TextBox5.Text)
            Label7.Text = CDbl(Label7.Text) + x
            cost_Updata("Cgas", cost.c_pnoGet, CDbl(Label7.Text))
        Else
            MsgBox("请正确缴费!")

        End If
        freeQian()
    End Sub

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        If (Int(TextBox4.Text) > 0) Then
            Dim x As Double = CDbl(TextBox4.Text)
            Label6.Text = CDbl(Label6.Text) + x
            cost_Updata("Cproperty", cost.c_pnoGet, CDbl(Label6.Text))
        Else
            MsgBox("请正确缴费!")

        End If
        freeQian()
    End Sub

    Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
        Me.Close()
    End Sub
End Class
  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

CaoPengCheng&

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值