frmdelfee_building.vb

来自「由VB开发的基于SQL的小区物业管理系统」· VB 代码 · 共 38 行

VB
38
字号

Friend Class FrmDelFee_Building
    Inherits System.Windows.Forms.Form

    Private Sub cmdExit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs)
        Me.Close()

    End Sub

    Private Sub BtnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnOK.Click
        If Trim(Me.TxtRoom.Text) = "" Then
            MsgBox("请输入房间号!", MsgBoxStyle.OkOnly + MsgBoxStyle.Exclamation, "警告")
            TxtRoom.Focus()
            Exit Sub
        End If
        Dim TempDBFee As New DBFee
        TempDBFee.FYear = ComboFYear.Text
        TempDBFee.Fmonth = ComboFmonth.Text
        TempDBFee.HouseNo = Me.ComboBuilding.Text & "-" & Me.ComboUnit.Text & "-" & Me.TxtRoom.Text
        DGVResult.DataSource = TempDBFee.LoadFee(2)
    End Sub


    Private Sub DGVResult_CellContentDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGVResult.CellContentDoubleClick
        Dim DR As DialogResult
        DR = MsgBox("请确认是否删除这条记录", MsgBoxStyle.YesNo, "信息框")
        If DR = Windows.Forms.DialogResult.Yes Then
            Dim TempDBFee As New DBFee
            TempDBFee.HouseNo = DGVResult.Rows(e.RowIndex).Cells(5).Value
            TempDBFee.FYear = DGVResult.Rows(e.RowIndex).Cells(1).Value
            TempDBFee.Fmonth = DGVResult.Rows(e.RowIndex).Cells(2).Value
            TempDBFee.DelFee()
        Else
            Exit Sub
        End If
        DGVResult.DataSource = DBHouse.LoadHouse("HouseNo", DGVResult.Rows(e.RowIndex).Cells(0).Value, "")
    End Sub
End Class

⌨️ 快捷键说明

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