Imports System.ComponentModel

Class CTelefonoBO
  Implements INotifyPropertyChanged
  Private _nombre As String
  Public Property Nombre() As String
    Get
      Return _nombre
    End Get
    Set(value As String)
      _nombre = value
      OnPropertyChanged(New PropertyChangedEventArgs("Nombre"))
    End Set
  End Property

  Private _direccion As String
  Public Property Direccion() As String
    Get
      Return _direccion
    End Get
    Set(value As String)
      _direccion = value
      OnPropertyChanged(New PropertyChangedEventArgs("Direccion"))
    End Set
  End Property

  Private _telefono As String
  Public Property Telefono() As String
    Get
      Return _telefono
    End Get
    Set(value As String)
      _telefono = value
      OnPropertyChanged(New PropertyChangedEventArgs("Telefono"))
    End Set
  End Property

  Private _observaciones As String
  Public Property Observaciones() As String
    Get
      Return _observaciones
    End Get
    Set(value As String)
      _observaciones = value
      OnPropertyChanged(New PropertyChangedEventArgs("Observaciones"))
    End Set
  End Property

  Public Sub New()
  End Sub
  Public Sub New(nom As String, dir As String, tel As String, Optional obs As String = Nothing)
    Nombre = nom
    Direccion = dir
    Telefono = tel
    Observaciones = obs
  End Sub

  Private _modificado As Boolean
  Public Property Modificado() As Boolean
    Get
      Return _modificado
    End Get
    Set(value As Boolean)
      _modificado = value
    End Set
  End Property

  Public Event PropertyChanged As PropertyChangedEventHandler _
    Implements INotifyPropertyChanged.PropertyChanged
  Public Sub OnPropertyChanged(e As PropertyChangedEventArgs)
    _modificado = True
    RaiseEvent PropertyChanged(Me, e) ' generar evento
  End Sub
End Class
