//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Tango Observables Generator
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. Do not modify!
//
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Serialization;
using Newtonsoft.Json;
using System.Linq;
using Tango.DAL.Remote.DB;
using Tango.Core;
using System.ComponentModel;
using Tango.Core.CustomAttributes;
namespace Tango.BL.Entities
{
[Table("PUBLISHED_PROCEDURE_PROJECTS")]
public abstract class PublishedProcedureProjectBase : ObservableEntity
{
public event EventHandler NameChanged;
public event EventHandler DescriptionChanged;
public event EventHandler PublishDateChanged;
public event EventHandler SortingIndexChanged;
public event EventHandler IsVisibleChanged;
public event EventHandler VisibilityChanged;
public event EventHandler> PublishedProcedureProjectsVersionsChanged;
protected String _name;
///
/// Gets or sets the publishedprocedureprojectbase name.
///
[Column("NAME")]
public String Name
{
get
{
return _name;
}
set
{
if (_name != value)
{
_name = value;
OnNameChanged(value);
}
}
}
protected String _description;
///
/// Gets or sets the publishedprocedureprojectbase description.
///
[Column("DESCRIPTION")]
public String Description
{
get
{
return _description;
}
set
{
if (_description != value)
{
_description = value;
OnDescriptionChanged(value);
}
}
}
protected DateTime _publishdate;
///
/// Gets or sets the publishedprocedureprojectbase publish date.
///
[Column("PUBLISH_DATE")]
public DateTime PublishDate
{
get
{
return _publishdate;
}
set
{
if (_publishdate != value)
{
_publishdate = value;
OnPublishDateChanged(value);
}
}
}
protected Int32 _sortingindex;
///
/// Gets or sets the publishedprocedureprojectbase sorting index.
///
[Column("SORTING_INDEX")]
public Int32 SortingIndex
{
get
{
return _sortingindex;
}
set
{
if (_sortingindex != value)
{
_sortingindex = value;
OnSortingIndexChanged(value);
}
}
}
protected Boolean _isvisible;
///
/// Gets or sets the publishedprocedureprojectbase is visible.
///
[Column("IS_VISIBLE")]
public Boolean IsVisible
{
get
{
return _isvisible;
}
set
{
if (_isvisible != value)
{
_isvisible = value;
OnIsVisibleChanged(value);
}
}
}
protected Int32 _visibility;
///
/// 0 - Public
/// 1 - Internal
///
[Column("VISIBILITY")]
public Int32 Visibility
{
get
{
return _visibility;
}
set
{
if (_visibility != value)
{
_visibility = value;
OnVisibilityChanged(value);
}
}
}
protected SynchronizedObservableCollection _publishedprocedureprojectsversions;
///
/// Gets or sets the publishedprocedureprojectbase published procedure projects versions.
///
public virtual SynchronizedObservableCollection PublishedProcedureProjectsVersions
{
get
{
return _publishedprocedureprojectsversions;
}
set
{
if (_publishedprocedureprojectsversions != value)
{
_publishedprocedureprojectsversions = value;
OnPublishedProcedureProjectsVersionsChanged(value);
}
}
}
///
/// Called when the Name has changed.
///
protected virtual void OnNameChanged(String name)
{
NameChanged?.Invoke(this, name);
RaisePropertyChanged(nameof(Name));
}
///
/// Called when the Description has changed.
///
protected virtual void OnDescriptionChanged(String description)
{
DescriptionChanged?.Invoke(this, description);
RaisePropertyChanged(nameof(Description));
}
///
/// Called when the PublishDate has changed.
///
protected virtual void OnPublishDateChanged(DateTime publishdate)
{
PublishDateChanged?.Invoke(this, publishdate);
RaisePropertyChanged(nameof(PublishDate));
}
///
/// Called when the SortingIndex has changed.
///
protected virtual void OnSortingIndexChanged(Int32 sortingindex)
{
SortingIndexChanged?.Invoke(this, sortingindex);
RaisePropertyChanged(nameof(SortingIndex));
}
///
/// Called when the IsVisible has changed.
///
protected virtual void OnIsVisibleChanged(Boolean isvisible)
{
IsVisibleChanged?.Invoke(this, isvisible);
RaisePropertyChanged(nameof(IsVisible));
}
///
/// Called when the Visibility has changed.
///
protected virtual void OnVisibilityChanged(Int32 visibility)
{
VisibilityChanged?.Invoke(this, visibility);
RaisePropertyChanged(nameof(Visibility));
}
///
/// Called when the PublishedProcedureProjectsVersions has changed.
///
protected virtual void OnPublishedProcedureProjectsVersionsChanged(SynchronizedObservableCollection publishedprocedureprojectsversions)
{
PublishedProcedureProjectsVersionsChanged?.Invoke(this, publishedprocedureprojectsversions);
RaisePropertyChanged(nameof(PublishedProcedureProjectsVersions));
}
///
/// Initializes a new instance of the class.
///
public PublishedProcedureProjectBase() : base()
{
PublishedProcedureProjectsVersions = new SynchronizedObservableCollection();
}
}
}