⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmaddfee.vb

📁 Visual Basic 2005数据库通用模块开发与系统移植 物业管理信息系统
💻 VB
字号:

Class FrmAddFee
    Inherits System.Windows.Forms.Form
    Public AddOrEditFlag As Boolean = True
    Public HouseNo As String
    Public FYear As String
    Public Fmonth As String
    Private Sub cancelCommand_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cancelCommand.Click
        Me.Close()
    End Sub





    Private Sub FrmAddHouse_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If AddOrEditFlag = True Then
            Exit Sub
        Else
            Dim TempFee As New DBFee
            TempFee.HouseNo = HouseNo
            TempFee.FYear = FYear
            TempFee.Fmonth = Fmonth
            Dim DTable As DataTable
            DTable = TempFee.LoadFee(2)
            ComboFeeType.Text = DTable.Rows(0)("收费类型")
            ComboFYear.Text = DTable.Rows(0)("年份")
            ComboFmonth.Text = DTable.Rows(0)("月份")
            TxtAmount.Text = DTable.Rows(0)("用量")
            TxtCharge.Text = DTable.Rows(0)("费用")
            Dim TempString(2) As String
            TempString = DTable.Rows(0)("房屋编号").ToString.Split("-")
            ComboBuilding.Text = TempString(0)
            ComboUnit.Text = TempString(1)
            TxtRoom.Text = TempString(2)
            txtMemo.Text = DTable.Rows(0)("备注")
            ComboBuilding.Enabled = False
            ComboUnit.Enabled = False
            TxtRoom.Enabled = False
            ComboFYear.Enabled = False
            ComboFmonth.Enabled = False
            ComboFeeType.Enabled = False
        End If
    End Sub

    Private Sub BtnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnOK.Click
        If Trim(Me.TxtAmount.Text) = "" Then
            MsgBox("请输入用量!", MsgBoxStyle.OkOnly + MsgBoxStyle.Exclamation, "警告")
            TxtAmount.Focus()
            Exit Sub
        End If
        If Not IsNumeric(TxtCharge.Text) Then
            MsgBox("请输入费用!", MsgBoxStyle.OkOnly + MsgBoxStyle.Exclamation, "警告")
            TxtCharge.Focus()
            Exit Sub
        End If
        If Not IsNumeric(TxtRoom.Text) Then
            MsgBox("请输入房间号!", MsgBoxStyle.OkOnly + MsgBoxStyle.Exclamation, "警告")
            TxtRoom.Focus()
            Exit Sub
        End If
        Dim TempFee As New DBFee
        TempFee.FeeType = ComboFeeType.Text
        TempFee.FYear = ComboFYear.Text
        TempFee.Fmonth = ComboFmonth.Text
        TempFee.Amount = TxtAmount.Text
        TempFee.Charge = TxtCharge.Text
        TempFee.HouseNo = Me.ComboBuilding.Text & "-" & Me.ComboUnit.Text & "-" & Me.TxtRoom.Text
        TempFee.Memo = txtMemo.Text
        If AddOrEditFlag = True Then
            TempFee.AddFee()
        Else
            TempFee.DelFee()
            TempFee.AddFee()
        End If
    End Sub
End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -