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

Posted CaoPengCheng&

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了小区物业管理系统-系统管理员页面相关的知识,希望对你有一定的参考价值。

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

主页面

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

在这里插入图片描述

Public Class Main_System
    Dim proprietor As PropetyManager

    Public Sub New(u As String)
        InitializeComponent()

    End Sub

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

        ToolStripStatusLabel1.Text = "时间:" & Format(Now, "yyyy-mm-dd") + " " + Format(Now, "hh:mm:ss")

        PictureBox1.Visible = True
        GroupBox1.Visible = False
        GroupBox2.Visible = False
        Label22.Visible = False
        ListBox2.Visible = False
        ListBox3.Visible = False
        ListBox4.Visible = False

    End Sub

   
    Private Sub TreeView1_AfterSelect(sender As Object, e As TreeViewEventArgs) Handles TreeView1.AfterSelect
        If TreeView1.SelectedNode.Text = "管理人员查询" Then
            PictureBox1.Visible = False
            GroupBox2.Visible = False
            ListBox1.Items.Clear()
            GroupBox1.Visible = True
            Dim pro() As PropetyManager = PropertyManagementLike(TextBox1.Text)
            Dim i As Integer = 1
            'MsgBox(Str(DBNull.Value))

            For i = 1 To PropertyManagementCountLike(TextBox1.Text)
                ' MsgBox(pro(i).pnameGet)
                ListBox1.Items.Add(Trim(pro(i).pmnoGet) + "-" + Trim(pro(i).pmnameGet) + "-" + Trim(pro(i).pmdeptGet))
            Next
        End If

        If TreeView1.SelectedNode.Text = "管理人员添加" Then
            PictureBox1.Visible = True
            GroupBox1.Visible = False
            Dim s As New PM_add("")
            s.ShowDialog()
            Label22.Text = " 添加成功!"
        End If
        If TreeView1.SelectedNode.Text = "查询楼房" Then
            PictureBox1.Visible = True
            GroupBox1.Visible = False
            Dim s As New System_B_Secect("")
            s.ShowDialog()
            Label22.Text = " 程序员永不为奴!"
        End If

        If TreeView1.SelectedNode.Text = "查询车库" Then
            PictureBox1.Visible = True
            GroupBox1.Visible = False
            Dim s As New System_G_Select("")
            s.ShowDialog()
            Label22.Text = " 程序员永不为奴!"
        End If

        If TreeView1.SelectedNode.Text = "添加车库" Then
            PictureBox1.Visible = True
            GroupBox1.Visible = False
            Dim s As New System_G_insert("")
            s.ShowDialog()
            Label22.Text = " 添加成功!"
        End If

        If TreeView1.SelectedNode.Text = "退出系统" Then
            ' Me.Close()
            Login.Close()
        End If
       
    End Sub


    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        ListBox1.Items.Clear()
        Dim pro() As PropetyManager = PropertyManagementLike(TextBox1.Text)
        Dim i As Integer = 1
        'MsgBox(Str(DBNull.Value))

        For i = 1 To PropertyManagementCountLike(TextBox1.Text)
            ' MsgBox(pro(i).pnameGet)
            ListBox1.Items.Add(Trim(pro(i).pmnoGet) + "-" + Trim(pro(i).pmnameGet) + "-" + Trim(pro(i).pmdeptGet))
        Next

    End Sub

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

        PictureBox1.Visible = True
        GroupBox1.Visible = False
        GroupBox2.Visible = False
    End Sub

    Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged
        GroupBox2.Visible = True

        Dim a() As String = Split(ListBox1.Text, "-")
        'MsgBox(a(0))
        proprietor = PropertyManagement(a(0))

        TextBox3.Text = Trim(proprietor.pmnameGet)
        TextBox4.Text = Trim(proprietor.pmageGet)
        TextBox5.Text = Trim(proprietor.pmnativeGet)

        Label2.Text = proprietor.pmnoGet


        If (proprietor.pmsexGet = "男") Then
            RadioButton1.Checked = True
        End If
        If (proprietor.pmsexGet = "女") Then
            RadioButton2.Checked = True
        End If
        Label6.Text = Trim(proprietor.pmeduGet)
        Label12.Text = Trim(PropertyManagementForName(proprietor.pm_leaderGet))
        Label10.Text = Trim(proprietor.pmdeptGet)

    End Sub


  

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        PropertyManagementDeleteAll(proprietor.pmnoGet)
        Label22.Visible = True
        Label22.Text = proprietor.pmnoGet + " 删除成功!"
        ListBox1.Items.Clear()
        Dim pro() As PropetyManager = PropertyManagementLike(TextBox1.Text)
        Dim i As Integer = 1
        'MsgBox(Str(DBNull.Value))

        For i = 1 To PropertyManagementCountLike(TextBox1.Text)
            ' MsgBox(pro(i).pnameGet)
            ListBox1.Items.Add(Trim(pro(i).pmnoGet) + "-" + Trim(pro(i).pmnameGet) + "-" + Trim(pro(i).pmdeptGet))
        Next
        GroupBox2.Visible = False
    End Sub


    Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
        ListBox2.Visible = True



    End Sub

    Private Sub ListBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox2.SelectedIndexChanged

        Label6.Text = ListBox2.Text
        ListBox2.Visible = False
    End Sub

    Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
        ListBox3.Visible = True
    End Sub

    Private Sub ListBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox3.SelectedIndexChanged
        Label10.Text = ListBox3.Text
        ListBox3.Visible = False
    End Sub


    Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
        ListBox4.Visible = True

        ListBox4.Items.Clear()
        Dim pro() As PropetyManager = PropertyManagementSelectForDept()
        Dim i As Integer = 1
        'MsgBox(Str(DBNull.Value))

        For i = 1 To PropertyManagementCountJL()
            ' MsgBox(pro(i).pnameGet)
            ListBox4.Items.Add(Trim(pro(i).pmnameGet))
        Next
    End Sub

    Private Sub ListBox4_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox4.SelectedIndexChanged
        Label12.Text = ListBox4.Text
        ListBox4.Visible = False
    End Sub

    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
        If (TextBox3.Text = "" Or Len(TextBox3.Text) > 5) Then
            MsgBox("请输入姓名或性名格式错误!")
        Else
            If (RadioButton1.Checked = False And RadioButton2.Checked = False) Then
                MsgBox("请选择性别!")
            Else
                If (TextBox4.Text = "" Or Int(TextBox4.Text) < 0 Or Int(TextBox4.Text) > 150) Then
                    MsgBox("请输入正确年龄!")
                Else
                    If (TextBox5.Text = "" Or Len(TextBox5.Text) > 7) Then
                        MsgBox("请输入籍贯或籍贯格式错误!")
                    Else
                        If (Label6.Text = "") Then
                            MsgBox("请选择学历!")
                        Else
                            If (Label10.Text = "") Then
                                MsgBox("请选择职位!")
                            Else
                                If (Label12.Text = "") Then
                                    MsgBox("请选择上级!")
                                Else

                                    proprietor.pmnameSet(TextBox3.Text)
                                    proprietor.pmageSet(TextBox4.Text)
                                    proprietor.pmnativeSet(TextBox5.Text)


                                    If (RadioButton1.Checked = True) Then
                                        proprietor.pmsexSet("男")
                                    End If
                                    If (RadioButton2.Checked = True) Then
                                        proprietor.pmsexSet("女")
                                    End If
                                    proprietor.pmeduSet(Label6.Text)
                                    proprietor.pmdeptSet(Label10.Text)
                                    proprietor.pm_leaderSet(PropertyManagementSelectWno(Label12.Text))
                                    PropertyManagementUpdata(proprietor)
                                    'MsgBox("修改成功!")
                                    Label22.Text = proprietor.pmnoGet + " 修改成功!"
                                    GroupBox2.Visible = False

                                End If
                            End If
                        End If
                    End If
                End If
            End If
        End If

      


    End Sub

    Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click

        TextBox3.Text = proprietor.pmnameGet
        TextBox4.Text = proprietor.pmageGet
        TextBox5.Text = proprietor.pmnativeGet

        Label2.Text = proprietor.pmnoGet


        If (proprietor.pmsexGet = "男") Then
            RadioButton1.Checked = True
        End If
        If (proprietor.pmsexGet = "女") Then
            RadioButton2.Checked = True
        End If
        Label6.Text = proprietor.pmeduGet
        Label12.Text = PropertyManagementForName(proprietor.pm_leaderGet)
        Label10.Text = proprietor.pmdeptGet
    End Sub

    
    Private Sub ToolStripButton4_Click(sender As Object, e As EventArgs)
        Me.Close()
        Login.Close()
    End Sub

    Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs)
        Me.Close()
    End Sub

 


    Private Sub ToolStripButton4_Click_1(sender As Object, e As EventArgs) Handles ToolStripButton4.Click
        Me.Close()
        Login.Close()
    End Sub

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

    Private Sub 添加业主ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 添加业主ToolStripMenuItem.Click
        PictureBox1.Visible = True
        GroupBox1.Visible = False
        Dim s As New PM_add("")
        s.ShowDialog()
        Label22.Text = " 添加成功!"
    End Sub

    Private Sub 业主查询ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 业主查询ToolStripMenuItem.Click
        PictureBox1.Visible = False
        GroupBox2.Visible = False
        ListBox1.Items.Clear()
        GroupBox1.Visible = True
        Dim pro() As PropetyManager = PropertyManagementLike(TextBox1.Text)
        Dim i As Integer = 1
        'MsgBox(Str(DBNull.Value))

        For i = 1 To PropertyManagementCountLike(TextBox1.Text)
            ' MsgBox(pro(i).pnameGet)
            ListBox1.Items.Add(Trim(pro(i).pmnoGet) + "-" + Trim(pro(i).pmnameGet) + "-" + Trim(pro(i).pmdeptGet))
        Next
    End Sub

    Private Sub 费用刷新ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 费用刷新ToolStripMenuItem.Click
        PictureBox1.Visible = True
        GroupBox1.Visible = False
        Dim s As New System_B_Secect("")
        s.ShowDialog()
        Label22.Text = " 程序员永不为奴!"
    End Sub

    Private Sub 车库查询ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 车库查询ToolStripMenuItem.Click
        PictureBox1.Visible = True
        GroupBox1.Visible = False
        Dim s As New System_G_Select("")
        s.ShowDialog()
        Label22.Text = " 程序员永不为奴!"
    End Sub

    Private Sub 车库添加ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 车库添加ToolStripMenuItem.Click
        PictureBox1.Visible = True
        GroupBox1.Visible = False
        Dim s As New System_G_insert("")
        s.ShowDialog()
        Label22.Text = " 添加成功!"
    End Sub

    Private Sub 退出登录ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 退出登录ToolStripMenuItem.Click
        Me.Close()
    End Sub

    Private Sub 退出系统ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 退出系统ToolStripMenuItem.Click
        Me.Close()
        Login.Close()
    End Sub
End Class

管理人员添加

在这里插入图片描述

Imports System
Public Class PM_add
    Dim proprietor As New PropetyManager
    Public Sub New(u As String)
        InitializeComponent()
    End Sub

    Private Sub PM_add_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Label2.Text = Format(Now, "yyyy-mm-dd")
        Label11.Text = Format(Now, "hh:mm:ss")
        ListBox5.Visible = False
        ListBox6.Visible = False
        ListBox7.Visible = False
        Label16.Text = ""
        Label17.Text = ""
        Label18.Text = ""
    End Sub
    Private Sub Button10_Click(sender As Object, e As EventArgs) Handles Button10.Click
        ListBox5.Visible = True
    End Sub

    Private Sub ListBox5_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox5.SelectedIndexChanged
        Label17.Text = ListBox5.Text
        ListBox5.Visible = False
    End Sub

    Private Sub Button11_Click(sender As Object, e As EventArgs) Handles Button11.Click
        ListBox6.Visible = True
    End Sub

    Private Sub ListBox6_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox6.SelectedIndexChanged
        Label18.Text = ListBox6.Text
        ListBox6.Visible = False
    End Sub

    Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
        ListBox7.Visible = True

        ListBox7.Items.Clear()
        Dim pro() As PropetyManager = PropertyManagementSelectForDept()
        Dim i As Integer = 1
        'MsgBox(Str(DBNull.Value))

        For i = 1 To PropertyManagementCountJL()
            ' MsgBox(pro(i).pnameGet)
            ListBox7.Items.Add(Trim(pro(i).pmnameGet))
        Next
    End Sub

    Private Sub ListBox7_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox7.SelectedIndexChanged
        Label16.Text = ListBox7.Text
        ListBox7.Visible = False
    End Sub





    Private Sub Button12_Click(sender As Object, e As EventArgs) Handles Button12.Click
        If (TextBox7.Text = "" Or Len(TextBox7.Text) > 5) Then
            MsgBox("请输入姓名或性名格式错误!")
        Else
            If (RadioButton3.Checked = False And RadioButton4.Checked = False) Then
                MsgBox("请选择性别!")
            Else
                If (TextBox6.Text = "" Or Int(TextBox6.Text) < 18 Or Int(TextBox6.Text) > 60) Then
                    MsgBox("未成年或退休人员不可工作哦!")
                Else
                    If (TextBox2.Text = "" Or Len(TextBox2.Text) > 7) Then
                        MsgBox("请输入籍贯或籍贯格式错误!")
                    Else
                        If (Label18.Text = "") Then
                            MsgBox("请选择学历!")
                        Else
                            If (Label17.Text = "") Then
                                MsgBox以上是关于小区物业管理系统-系统管理员页面的主要内容,如果未能解决你的问题,请参考以下文章

小区物业管理系统-业主页面编写

小区物业管理系统-总结-总体设计

小区物业管理系统-项目结构分析和登录编写

小区物业管理系统-照片存取

计算机毕业设计-社区疫情防控管理系统springboot-小区疫情管理系统java代码

小区物业管理系统的设计与实现 文献收集