
Public Class Immobili

    Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click
        Me.Close()
    End Sub

    Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If SmartEstateDataSetUtil.DesignerUtil.IsRunTime Then
            'TODO: Delete this line of code to remove the default AutoFill for 'SmartEstateDataSet.Immobili'.
            Me.ImmobiliTableAdapter.Fill(Me.SmartEstateDataSet.Immobili)
        End If

        Cursor.Current = Cursors.Default

    End Sub

    Private Sub cmdPrec_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPrec.Click
        ImmobiliBindingSource.Position = ImmobiliBindingSource.Position - 1
    End Sub

    Private Sub cmdSuc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdSuc.Click
        ImmobiliBindingSource.Position = ImmobiliBindingSource.Position + 1
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ImmobiliTableAdapter.Update(Me.SmartEstateDataSet.Immobili)
        MessageBox.Show("Aggiornamento riuscito")
    End Sub

    Private Sub MenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem4.Click
        Dim frm As New Foto

        Dim rw As System.Data.DataRowView

        rw = DirectCast(ImmobiliBindingSource.Current, System.Data.DataRowView)

        frm.Row = rw.Row

        frm.ShowDialog()
    End Sub
End Class
