PublicClass Main_Proprietor
Private user As User
PublicSubNew(u As User)
InitializeComponent()
user = u
'MsgBox(pno)EndSubPrivateSub Main_Proprietor_Click(sender AsObject, e As EventArgs)HandlesMe.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 =TrueEndSub'未完成:通知PrivateSub Main_Proprietor_Load(sender AsObject, e As EventArgs)HandlesMyBase.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 =FalseEndSubPrivateSub PictureBox3_Click(sender AsObject, e As EventArgs)Handles PictureBox3.Click
Dim p AsNew Proprietor_MessUpdata(user.usernameGet)
p.ShowDialog()EndSubPrivateSub PictureBox1_MouseLeave(ByVal sender AsObject,ByVal e AsSystem.EventArgs)Handles PictureBox1.MouseLeave
PictureBox1.BackgroundImageLayout = ImageLayout.Zoom
EndSubPrivateSub PictureBox1_MouseMove(ByVal sender AsObject,ByVal e AsSystem.Windows.Forms.MouseEventArgs)Handles PictureBox1.MouseMove
PictureBox1.BackgroundImageLayout = ImageLayout.Stretch
EndSubPrivateSub PictureBox2_MouseLeave(ByVal sender AsObject,ByVal e AsSystem.EventArgs)Handles PictureBox2.MouseLeave
PictureBox2.BackgroundImageLayout = ImageLayout.Zoom
EndSubPrivateSub PictureBox2_MouseMove(ByVal sender AsObject,ByVal e AsSystem.Windows.Forms.MouseEventArgs)Handles PictureBox2.MouseMove
PictureBox2.BackgroundImageLayout = ImageLayout.Stretch
EndSubPrivateSub PictureBox3_MouseLeave(ByVal sender AsObject,ByVal e AsSystem.EventArgs)Handles PictureBox3.MouseLeave
PictureBox3.BackgroundImageLayout = ImageLayout.Zoom
EndSubPrivateSub PictureBox3_MouseMove(ByVal sender AsObject,ByVal e AsSystem.Windows.Forms.MouseEventArgs)Handles PictureBox3.MouseMove
PictureBox3.BackgroundImageLayout = ImageLayout.Stretch
EndSubPrivateSub PictureBox4_MouseLeave(ByVal sender AsObject,ByVal e AsSystem.EventArgs)Handles PictureBox4.MouseLeave
PictureBox4.BackgroundImageLayout = ImageLayout.Zoom
EndSubPrivateSub PictureBox4_MouseMove(ByVal sender AsObject,ByVal e AsSystem.Windows.Forms.MouseEventArgs)Handles PictureBox4.MouseMove
PictureBox4.BackgroundImageLayout = ImageLayout.Stretch
EndSubPrivateSub PictureBox5_MouseLeave(ByVal sender AsObject,ByVal e AsSystem.EventArgs)Handles PictureBox5.MouseLeave
PictureBox5.BackgroundImageLayout = ImageLayout.Zoom
EndSubPrivateSub PictureBox5_MouseMove(ByVal sender AsObject,ByVal e AsSystem.Windows.Forms.MouseEventArgs)Handles PictureBox5.MouseMove
PictureBox5.BackgroundImageLayout = ImageLayout.Stretch
EndSubPrivateSub PictureBox6_MouseLeave(ByVal sender AsObject,ByVal e AsSystem.EventArgs)Handles PictureBox6.MouseLeave
PictureBox6.BackgroundImageLayout = ImageLayout.Zoom
EndSubPrivateSub PictureBox6_MouseMove(ByVal sender AsObject,ByVal e AsSystem.Windows.Forms.MouseEventArgs)Handles PictureBox6.MouseMove
PictureBox6.BackgroundImageLayout = ImageLayout.Stretch
EndSubPrivateSub PictureBox4_Click(sender AsObject, e As EventArgs)Handles PictureBox4.Click
Me.Close()
Login.Close()EndSubPrivateSub PictureBox5_Click(sender AsObject, e As EventArgs)Handles PictureBox5.Click
Dim updata AsNew Proprietor_UserUpdata(user)
user.tableSet("User_Proprietor")
updata.ShowDialog()EndSubPrivateSub PictureBox6_Click(sender AsObject, e As EventArgs)Handles PictureBox6.Click
Label6.Visible =True
ListBox1.Visible =TrueTry
FileOpen(1, "通知.txt", OpenMode.Input)Dim s AsString
ListBox1.Items.Clear()DoWhileNot EOF(1)
s = LineInput(1)
ListBox1.Items.Add(s)Loop
FileClose(1)Catch ex As Exception
MsgBox("File"+ ex.Message)EndTryEndSubPrivateSub PictureBox2_Click(sender AsObject, e As EventArgs)Handles PictureBox2.Click
Dim free AsNew Proprietor_Free(user)
free.ShowDialog()EndSubPrivateSub ToolStripButton4_Click(sender AsObject, e As EventArgs)Handles ToolStripButton4.Click
Me.Close()
Login.Close()EndSubPrivateSub ToolStripButton2_Click(sender AsObject, e As EventArgs)Handles ToolStripButton2.Click
Dim updata AsNew Proprietor_UserUpdata(user)
user.tableSet("User_Proprietor")
updata.ShowDialog()EndSubPrivateSub ToolStripButton1_Click(sender AsObject, e As EventArgs)Handles ToolStripButton1.Click
Me.Close()EndSubEndClass
缴费页面
PublicClass Proprietor_Free
Private user As User
Private cost As Cost
PublicSubNew(u As User)
InitializeComponent()
user = u
'MsgBox(pno)EndSubPrivateSub Button5_Click(sender AsObject, e As EventArgs)Handles Button5.Click
Me.Close()EndSubPrivateSub Proprietor_Free_Load(sender AsObject, e As EventArgs)HandlesMyBase.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=0EndSubPrivateSub Button1_Click(sender AsObject, e As EventArgs)Handles Button1.Click
If(Int(TextBox1.Text)>0)ThenDim x AsDouble=CDbl(TextBox1.Text)
Label6.Text=CDbl(Label6.Text)+ x
' MsgBox(CDbl(Label6.Text))
cost_Updata("Cwater", user.usernameGet,CDbl(Label6.Text))Else
MsgBox("请正确缴费!")EndIf
sum()EndSubPublicSub col(la As Label)If(CDbl(la.Text)<=0)Then
la.ForeColor =Color.Red
Else
la.ForeColor =Color.Black
EndIfEndSubPrivateSub Button2_Click(sender AsObject, e As EventArgs)Handles Button2.Click
If(Int(TextBox2.Text)>0)ThenDim x AsDouble=CDbl(TextBox2.Text)
Label4.Text=CDbl(Label4.Text)+ x
' MsgBox(CDbl(Label6.Text))
cost_Updata("Celectricity", user.usernameGet,CDbl(Label4.Text))Else
MsgBox("请正确缴费!")EndIf
sum()EndSubPrivateSub Button4_Click(sender AsObject, e As EventArgs)Handles Button4.Click
If(Int(TextBox3.Text)>0)ThenDim x AsDouble=CDbl(TextBox3.Text)
Label2.Text=CDbl(Label2.Text)+ x
' MsgBox(CDbl(Label6.Text))
cost_Updata("Cgas", user.usernameGet,CDbl(Label2.Text))Else
MsgBox("请正确缴费!")EndIf
sum()EndSubPrivateSub Button3_Click(sender AsObject, e As EventArgs)Handles Button3.Click
If(Int(TextBox4.Text)>0)ThenDim x AsDouble=CDbl(TextBox4.Text)
Label1.Text=CDbl(Label1.Text)+ x
' MsgBox(CDbl(Label6.Text))
cost_Updata("Cproperty", user.usernameGet,CDbl(Label1.Text))Else
MsgBox("请正确缴费!")EndIf
sum()EndSubPublicSub sum()
Label12.Text=CDbl(Label1.Text)+CDbl(Label2.Text)+CDbl(Label4.Text)+CDbl(Label6.Text)EndSubEndClass
修改密码
PublicClass Proprietor_UserUpdata
Private user As User
PublicSubNew(u As User)
InitializeComponent()
user = u
'MsgBox(pno)EndSubPrivateSub Proprietor_UserUpdata_Load(sender AsObject, e As EventArgs)HandlesMyBase.Load
Label10.Text= Format(Now,"yyyy-mm-dd")
Label11.Text= Format(Now,"hh:mm:ss")
Label2.Text= user.usernameGet()
TextBox4.Text= user.passwordGet()EndSubPrivateSub PictureBox2_Click(sender AsObject, e As EventArgs)Handles PictureBox2.Click
user.passwordSet(TextBox4.Text)
User_Updata(user)Me.Close()EndSubPrivateSub PictureBox3_Click(sender AsObject, e As EventArgs)Handles PictureBox3.Click
Me.Close()EndSubPrivateSub PictureBox2_MouseLeave(ByVal sender AsObject,ByVal e AsSystem.EventArgs)Handles PictureBox2.MouseLeave
PictureBox2.BackgroundImageLayout = ImageLayout.Zoom
EndSubPrivateSub PictureBox2_MouseMove(ByVal sender AsObject,ByVal e AsSystem.Windows.Forms.MouseEventArgs)Handles PictureBox2.MouseMove
PictureBox2.BackgroundImageLayout = ImageLayout.Stretch
EndSubPrivateSub PictureBox3_MouseLeave(ByVal sender AsObject,ByVal e AsSystem.EventArgs)Handles PictureBox3.MouseLeave
PictureBox3.BackgroundImageLayout = ImageLayout.Zoom
EndSubPrivateSub PictureBox3_MouseMove(ByVal sender AsObject,ByVal e AsSystem.Windows.Forms.MouseEventArgs)Handles PictureBox3.MouseMove
PictureBox3.BackgroundImageLayout = ImageLayout.Stretch
EndSubEndClass
PublicClass Proprietor_MessUpdata
Dim pno AsStringPrivate proprietor As Proprietor
PublicSubNew(no AsString)
InitializeComponent()
pno = no
EndSubPrivateSub Proprietor_MessUpdata_Load(sender AsObject, e As EventArgs)HandlesMyBase.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 =TrueEndIfIf(proprietor.psexGet()= "女")Then
RadioButton2.Checked =TrueEndIf
TextBox3.Text= proprietor.pageGet()
TextBox4.Text= Trim(proprietor.pnativeGet())EndSubPrivateSub Button8_Click(sender AsObject, e As EventArgs)Handles Button8.Click
If(TextBox1.Text=""OrLen(TextBox1.Text)>5)Then
MsgBox("请输入姓名或性名格式错误!")ElseIf(RadioButton1.Checked =FalseAnd RadioButton2.Checked =False)Then
MsgBox("请选择性别!")ElseIf(TextBox3.Text=""OrInt(TextBox3.Text)<0OrInt(TextBox3.Text)>150)Then
MsgBox("请输入正确年龄!")ElseIf(TextBox4.Text=""OrLen(TextBox4.Text)>7)Then
MsgBox("请输入籍贯或籍贯格式错误!")Else'逻辑修改
proprietor.pnameSet(TextBox1.Text)If(RadioButton1.Checked =True)Then
proprietor.psexSet("男")EndIfIf(RadioButton2.Checked =True)Then
proprietor.psexSet("女")EndIf
proprietor.pageSet(Int(TextBox3.Text))
proprietor.pnativeSet(TextBox4.Text)
proprietorUP(proprietor)Me.Close()EndIfEndIfEndIfEndIfEndSubPrivateSub Button7_Click(sender AsObject, e As EventArgs)Handles Button7.Click
Me.Close()EndSubEndClass
小区物业管理系统-业主页面编写主页面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 EventAr