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

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

主页面

在这里插入图片描述

Public Class Main_Proprietor

    Private user As User

    Public Sub New(u As User)
        InitializeComponent()
        user = u
        'MsgBox(pno)
    End Sub

    Private Sub Main_Proprietor_Click(sender As Object, e As EventArgs) Handles Me.Click
        PictureBox1.Visible = True
        PictureBox2.Visible = True
        PictureBox3.Visible = True
        PictureBox4.Visible = True
        PictureBox5.Visible = True
        PictureBox6.Visible = True
        Label4.Visible = True
        Label5.Visible = True
        Label8.Visible = True
        Label9.Visible = True
        Label10.Visible = True
        Label11.Visible = True

    End Sub

    '未完成:通知
    Private Sub Main_Proprietor_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Label13.Text = Format(Now, "yyyy-mm-dd")
        Label12.Text = Format(Now, "hh:mm:ss")

        ToolStripStatusLabel1.Text = "时间:" & Format(Now, "yyyy-mm-dd") + " " + Format(Now, "hh:mm:ss")
        ToolStripStatusLabel2.Text = "尊敬的业主" & proprietorName(user.usernameGet()) & "您好!"

        PictureBox1.Visible = False
        PictureBox2.Visible = False
        PictureBox3.Visible = False
        PictureBox4.Visible = False
        PictureBox5.Visible = False
        PictureBox6.Visible = False
        Label4.Visible = False
        Label5.Visible = False
        Label6.Visible = False
        Label8.Visible = False
        Label9.Visible = False
        Label10.Visible = False
        Label11.Visible = False
        ListBox1.Visible = False


    End Sub

    Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles PictureBox3.Click
        Dim p As New Proprietor_MessUpdata(user.usernameGet)
        p.ShowDialog()
    End Sub

    Private Sub PictureBox1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseLeave
        PictureBox1.BackgroundImageLayout = ImageLayout.Zoom

    End Sub

    Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
        PictureBox1.BackgroundImageLayout = ImageLayout.Stretch

    End Sub
    Private Sub PictureBox2_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox2.MouseLeave
        PictureBox2.BackgroundImageLayout = ImageLayout.Zoom

    End Sub

    Private Sub PictureBox2_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseMove
        PictureBox2.BackgroundImageLayout = ImageLayout.Stretch

    End Sub
    Private Sub PictureBox3_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox3.MouseLeave
        PictureBox3.BackgroundImageLayout = ImageLayout.Zoom

    End Sub

    Private Sub PictureBox3_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox3.MouseMove
        PictureBox3.BackgroundImageLayout = ImageLayout.Stretch

    End Sub
    Private Sub PictureBox4_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox4.MouseLeave
        PictureBox4.BackgroundImageLayout = ImageLayout.Zoom

    End Sub

    Private Sub PictureBox4_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox4.MouseMove
        PictureBox4.BackgroundImageLayout = ImageLayout.Stretch

    End Sub
    Private Sub PictureBox5_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox5.MouseLeave
        PictureBox5.BackgroundImageLayout = ImageLayout.Zoom

    End Sub

    Private Sub PictureBox5_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox5.MouseMove
        PictureBox5.BackgroundImageLayout = ImageLayout.Stretch

    End Sub
    Private Sub PictureBox6_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox6.MouseLeave
        PictureBox6.BackgroundImageLayout = ImageLayout.Zoom

    End Sub

    Private Sub PictureBox6_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox6.MouseMove
        PictureBox6.BackgroundImageLayout = ImageLayout.Stretch

    End Sub

    Private Sub PictureBox4_Click(sender As Object, e As EventArgs) Handles PictureBox4.Click
        Me.Close()
        Login.Close()

    End Sub

    Private Sub PictureBox5_Click(sender As Object, e As EventArgs) Handles PictureBox5.Click
        Dim updata As New Proprietor_UserUpdata(user)
        user.tableSet("User_Proprietor")
        updata.ShowDialog()
    End Sub

    Private Sub PictureBox6_Click(sender As Object, e As EventArgs) Handles PictureBox6.Click
        Label6.Visible = True
        ListBox1.Visible = True
        Try

            FileOpen(1, "通知.txt", OpenMode.Input)
            Dim s As String
            ListBox1.Items.Clear()
            Do While Not EOF(1)
                s = LineInput(1)
                ListBox1.Items.Add(s)
            Loop
            FileClose(1)
        Catch ex As Exception
            MsgBox("File" + ex.Message)
        End Try
    End Sub

    Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
        Dim free As New Proprietor_Free(user)
        free.ShowDialog()
    End Sub

    Private Sub ToolStripButton4_Click(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
        Dim updata As New Proprietor_UserUpdata(user)
        user.tableSet("User_Proprietor")
        updata.ShowDialog()
    End Sub

    Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click
        Me.Close()
    End Sub
End Class

缴费页面

在这里插入图片描述

Public Class Proprietor_Free
    Private user As User
    Private cost As Cost

    Public Sub New(u As User)
        InitializeComponent()
        user = u
        'MsgBox(pno)
    End Sub

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

    Private Sub Proprietor_Free_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        cost = cost_Select(user.usernameGet)

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

        Label6.Text = cost.cwaterGet
        col(Label6)
        Label4.Text = cost.celectricityGet
        col(Label4)
        Label1.Text = cost.cpropertyGet
        col(Label1)
        Label2.Text = cost.cgasGet
        col(Label2)
        sum()
        TextBox1.Text = 0
        TextBox2.Text = 0
        TextBox3.Text = 0
        TextBox4.Text = 0
    End Sub

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

        End If
        sum()
    End Sub

    Public Sub col(la As Label)
        If (CDbl(la.Text) <= 0) Then
            la.ForeColor = Color.Red
        Else
            la.ForeColor = Color.Black
        End If

    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        If (Int(TextBox2.Text) > 0) Then
            Dim x As Double = CDbl(TextBox2.Text)
            Label4.Text = CDbl(Label4.Text) + x
            ' MsgBox(CDbl(Label6.Text))
            cost_Updata("Celectricity", user.usernameGet, CDbl(Label4.Text))
        Else
            MsgBox("请正确缴费!")

        End If
        sum()
    End Sub

    Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
        If (Int(TextBox3.Text) > 0) Then
            Dim x As Double = CDbl(TextBox3.Text)
            Label2.Text = CDbl(Label2.Text) + x
            ' MsgBox(CDbl(Label6.Text))
            cost_Updata("Cgas", user.usernameGet, CDbl(Label2.Text))
        Else
            MsgBox("请正确缴费!")

        End If
        sum()
    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)
            Label1.Text = CDbl(Label1.Text) + x
            ' MsgBox(CDbl(Label6.Text))
            cost_Updata("Cproperty", user.usernameGet, CDbl(Label1.Text))
        Else
            MsgBox("请正确缴费!")
        End If
        sum()
    End Sub
    Public Sub sum()
        Label12.Text = CDbl(Label1.Text) + CDbl(Label2.Text) + CDbl(Label4.Text) + CDbl(Label6.Text)
    End Sub
End Class

修改密码

在这里插入图片描述

Public Class Proprietor_UserUpdata

    Private user As User

    Public Sub New(u As User)
        InitializeComponent()
        user = u
        'MsgBox(pno)
    End Sub
    Private Sub Proprietor_UserUpdata_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Label10.Text = Format(Now, "yyyy-mm-dd")
        Label11.Text = Format(Now, "hh:mm:ss")
        Label2.Text = user.usernameGet()
        TextBox4.Text = user.passwordGet()
    End Sub

    Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
        user.passwordSet(TextBox4.Text)
        User_Updata(user)
        Me.Close()
    End Sub

    Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles PictureBox3.Click
        Me.Close()
    End Sub
    Private Sub PictureBox2_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox2.MouseLeave
        PictureBox2.BackgroundImageLayout = ImageLayout.Zoom

    End Sub

    Private Sub PictureBox2_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox2.MouseMove
        PictureBox2.BackgroundImageLayout = ImageLayout.Stretch

    End Sub
    Private Sub PictureBox3_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox3.MouseLeave
        PictureBox3.BackgroundImageLayout = ImageLayout.Zoom

    End Sub

    Private Sub PictureBox3_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox3.MouseMove
        PictureBox3.BackgroundImageLayout = ImageLayout.Stretch

    End Sub
End Class

在这里插入图片描述

Public Class Proprietor_MessUpdata
    Dim pno As String
    Private proprietor As Proprietor

    Public Sub New(no As String)
        InitializeComponent()
        pno = no
    End Sub
    Private Sub Proprietor_MessUpdata_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        'pno = "Y001"
        proprietor = proprietorAll(pno)
        Label10.Text = Format(Now, "yyyy-mm-dd")
        Label11.Text = Format(Now, "hh:mm:ss")
        TextBox1.Text = Trim(proprietor.pnameGet())
        If (proprietor.psexGet() = "男") Then
            RadioButton1.Checked = True
        End If
        If (proprietor.psexGet() = "女") Then
            RadioButton2.Checked = True
        End If
        TextBox3.Text = proprietor.pageGet()
        TextBox4.Text = Trim(proprietor.pnativeGet())
    End Sub


    Private Sub Button8_Click(sender As Object, e As EventArgs) Handles Button8.Click
        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) > 7) 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)
                        proprietorUP(proprietor)
                        Me.Close()
                    End If
                End If
            End If
        End If
    End Sub

    Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
        Me.Close()

    End Sub
End Class
  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

CaoPengCheng&

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

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

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

打赏作者

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

抵扣说明:

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

余额充值