///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 3.1
// Code is generated on: Sunday, February 23, 2014 10:56:43 AM
// Code is generated using templates: SD.TemplateBindings.SharedTemplates.NET20
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.ComponentModel;
using System.Collections.Generic;
#if !CF
using System.Runtime.Serialization;
#endif
using System.Xml.Serialization;
using Datalib;
using Datalib.HelperClasses;
using Datalib.FactoryClasses;
using Datalib.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.EntityClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// Entity class which represents the entity 'TblReferral'.
[Serializable]
public partial class TblReferralEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private TblAgencyEntity _tblAgency;
private TblPatientEntity _tblPatient;
private TblServiceEntity _tblService;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary _customProperties;
private static Dictionary> _fieldsCustomProperties;
/// All names of fields mapped onto a relation. Usable for in-memory filtering
public static partial class MemberNames
{
/// Member name TblAgency
public static readonly string TblAgency = "TblAgency";
/// Member name TblPatient
public static readonly string TblPatient = "TblPatient";
/// Member name TblService
public static readonly string TblService = "TblService";
}
#endregion
/// Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed.
static TblReferralEntity()
{
SetupCustomPropertyHashtables();
}
/// CTor
public TblReferralEntity():base("TblReferralEntity")
{
InitClassEmpty(null, null);
}
/// CTor
/// For framework usage.
/// Fields object to set as the fields for this entity.
public TblReferralEntity(IEntityFields2 fields):base("TblReferralEntity")
{
InitClassEmpty(null, fields);
}
/// CTor
/// The custom validator object for this TblReferralEntity
public TblReferralEntity(IValidator validator):base("TblReferralEntity")
{
InitClassEmpty(validator, null);
}
/// CTor
/// PK value for TblReferral which data should be fetched into this TblReferral object
/// The entity is not fetched by this constructor. Use a DataAccessAdapter for that.
public TblReferralEntity(System.String uniqueKey):base("TblReferralEntity")
{
InitClassEmpty(null, null);
this.UniqueKey = uniqueKey;
}
/// CTor
/// PK value for TblReferral which data should be fetched into this TblReferral object
/// The custom validator object for this TblReferralEntity
/// The entity is not fetched by this constructor. Use a DataAccessAdapter for that.
public TblReferralEntity(System.String uniqueKey, IValidator validator):base("TblReferralEntity")
{
InitClassEmpty(validator, null);
this.UniqueKey = uniqueKey;
}
/// Protected CTor for deserialization
///
///
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblReferralEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblAgency = (TblAgencyEntity)info.GetValue("_tblAgency", typeof(TblAgencyEntity));
if(_tblAgency!=null)
{
_tblAgency.AfterSave+=new EventHandler(OnEntityAfterSave);
}
_tblPatient = (TblPatientEntity)info.GetValue("_tblPatient", typeof(TblPatientEntity));
if(_tblPatient!=null)
{
_tblPatient.AfterSave+=new EventHandler(OnEntityAfterSave);
}
_tblService = (TblServiceEntity)info.GetValue("_tblService", typeof(TblServiceEntity));
if(_tblService!=null)
{
_tblService.AfterSave+=new EventHandler(OnEntityAfterSave);
}
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// Performs the desync setup when an FK field has been changed. The entity referenced based on the FK field will be dereferenced and sync info will be removed.
/// The fieldindex.
protected override void PerformDesyncSetupFKFieldChange(int fieldIndex)
{
switch((TblReferralFieldIndex)fieldIndex)
{
case TblReferralFieldIndex.AgencyTypeId:
DesetupSyncTblAgency(true, false);
break;
case TblReferralFieldIndex.PatientId:
DesetupSyncTblPatient(true, false);
break;
case TblReferralFieldIndex.ServiceId:
DesetupSyncTblService(true, false);
break;
default:
base.PerformDesyncSetupFKFieldChange(fieldIndex);
break;
}
}
/// Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.
/// Name of the property.
/// Entity to set as an related entity
/// Used by prefetch path logic.
protected override void SetRelatedEntityProperty(string propertyName, IEntity2 entity)
{
switch(propertyName)
{
case "TblAgency":
this.TblAgency = (TblAgencyEntity)entity;
break;
case "TblPatient":
this.TblPatient = (TblPatientEntity)entity;
break;
case "TblService":
this.TblService = (TblServiceEntity)entity;
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// Gets the relation objects which represent the relation the fieldName specified is mapped on.
/// Name of the field mapped onto the relation of which the relation objects have to be obtained.
/// RelationCollection with relation object(s) which represent the relation the field is maped on
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// Gets the relation objects which represent the relation the fieldName specified is mapped on.
/// Name of the field mapped onto the relation of which the relation objects have to be obtained.
/// RelationCollection with relation object(s) which represent the relation the field is maped on
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblAgency":
toReturn.Add(Relations.TblAgencyEntityUsingAgencyTypeId);
break;
case "TblPatient":
toReturn.Add(Relations.TblPatientEntityUsingPatientId);
break;
case "TblService":
toReturn.Add(Relations.TblServiceEntityUsingServiceId);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// Checks if the relation mapped by the property with the name specified is a one way / single sided relation. If the passed in name is null, it/ will return true if the entity has any single-sided relation
/// Name of the property which is mapped onto the relation to check, or null to check if the entity has any relation/ which is single sided
/// true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise
protected override bool CheckOneWayRelations(string propertyName)
{
int numberOfOneWayRelations = 0;
switch(propertyName)
{
case null:
return ((numberOfOneWayRelations > 0) || base.CheckOneWayRelations(null));
default:
return base.CheckOneWayRelations(propertyName);
}
}
#endif
/// Sets the internal parameter related to the fieldname passed to the instance relatedEntity.
/// Instance to set as the related entity of type entityType
/// Name of field mapped onto the relation which resolves in the instance relatedEntity
protected override void SetRelatedEntity(IEntity2 relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblAgency":
SetupSyncTblAgency(relatedEntity);
break;
case "TblPatient":
SetupSyncTblPatient(relatedEntity);
break;
case "TblService":
SetupSyncTblService(relatedEntity);
break;
default:
break;
}
}
/// Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity()
/// Instance to unset as the related entity of type entityType
/// Name of field mapped onto the relation which resolves in the instance relatedEntity
/// if set to true it will notify the manytoone side, if applicable.
protected override void UnsetRelatedEntity(IEntity2 relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblAgency":
DesetupSyncTblAgency(false, true);
break;
case "TblPatient":
DesetupSyncTblPatient(false, true);
break;
case "TblService":
DesetupSyncTblService(false, true);
break;
default:
break;
}
}
/// Gets a collection of related entities referenced by this entity which depend on this entity (this entity is the PK side of their FK fields). These entities will have to be persisted after this entity during a recursive save.
/// Collection with 0 or more IEntity2 objects, referenced by this entity
protected override List GetDependingRelatedEntities()
{
List toReturn = new List();
return toReturn;
}
/// Gets a collection of related entities referenced by this entity which this entity depends on (this entity is the FK side of their PK fields). These
/// entities will have to be persisted before this entity during a recursive save.
/// Collection with 0 or more IEntity2 objects, referenced by this entity
protected override List GetDependentRelatedEntities()
{
List toReturn = new List();
if(_tblAgency!=null)
{
toReturn.Add(_tblAgency);
}
if(_tblPatient!=null)
{
toReturn.Add(_tblPatient);
}
if(_tblService!=null)
{
toReturn.Add(_tblService);
}
return toReturn;
}
/// Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.
/// Collection with 0 or more IEntityCollection2 objects, referenced by this entity
protected override List GetMemberEntityCollections()
{
List toReturn = new List();
return toReturn;
}
/// ISerializable member. Does custom serialization so event handlers do not get serialized. Serializes members of this entity class and uses the base class' implementation to serialize the rest.
///
///
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblAgency", (!this.MarkedForDeletion?_tblAgency:null));
info.AddValue("_tblPatient", (!this.MarkedForDeletion?_tblPatient:null));
info.AddValue("_tblService", (!this.MarkedForDeletion?_tblService:null));
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// Gets a list of all the EntityRelation objects the type of this instance has.
/// A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.
protected override List GetAllRelations()
{
return new TblReferralRelations().GetAllRelations();
}
/// Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblAgency' to this entity.
///
public virtual IRelationPredicateBucket GetRelationInfoTblAgency()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblAgencyFields.AgencyTypeId, null, ComparisonOperator.Equal, this.AgencyTypeId));
return bucket;
}
/// Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblPatient' to this entity.
///
public virtual IRelationPredicateBucket GetRelationInfoTblPatient()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblPatientFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblService' to this entity.
///
public virtual IRelationPredicateBucket GetRelationInfoTblService()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblServiceFields.ServiceId, null, ComparisonOperator.Equal, this.ServiceId));
return bucket;
}
/// Creates a new instance of the factory related to this entity
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblReferralEntityFactory));
}
#if !CF
/// Adds the member collections to the collections queue (base first)
/// The collections queue.
protected override void AddToMemberEntityCollectionsQueue(Queue collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
}
/// Gets the member collections queue from the queue (base first)
/// The collections queue.
protected override void GetFromMemberEntityCollectionsQueue(Queue collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
}
/// Determines whether the entity has populated member collections
/// true if the entity has populated member collections.
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// Creates the member entity collections queue.
/// The collections queue.
/// The required queue.
protected override void CreateMemberEntityCollectionsQueue(Queue collectionsQueue, Queue requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
}
#endif
/// Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.
/// Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null
protected override Dictionary GetRelatedData()
{
Dictionary toReturn = new Dictionary();
toReturn.Add("TblAgency", _tblAgency);
toReturn.Add("TblPatient", _tblPatient);
toReturn.Add("TblService", _tblService);
return toReturn;
}
/// Initializes the class members
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// Initializes the hashtables for the entity type and entity field custom properties.
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary();
_fieldsCustomProperties = new Dictionary>();
Dictionary fieldHashtable;
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("AgencyTypeId", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("Note", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("PatientId", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("ProvinceId", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("ReceiveServiceDate", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("ReferralAgency", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("ReferralDate", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("ServiceId", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("Status", fieldHashtable);
fieldHashtable = new Dictionary();
_fieldsCustomProperties.Add("UniqueKey", fieldHashtable);
}
#endregion
/// Removes the sync logic for member _tblAgency
/// If set to true, it will call the related entity's UnsetRelatedEntity method
/// if set to true it will also reset the FK fields pointing to the related entity
private void DesetupSyncTblAgency(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblAgency, new PropertyChangedEventHandler( OnTblAgencyPropertyChanged ), "TblAgency", Datalib.RelationClasses.StaticTblReferralRelations.TblAgencyEntityUsingAgencyTypeIdStatic, true, signalRelatedEntity, "TblReferrals", resetFKFields, new int[] { (int)TblReferralFieldIndex.AgencyTypeId } );
_tblAgency = null;
}
/// setups the sync logic for member _tblAgency
/// Instance to set as the related entity of type entityType
private void SetupSyncTblAgency(IEntity2 relatedEntity)
{
if(_tblAgency!=relatedEntity)
{
DesetupSyncTblAgency(true, true);
_tblAgency = (TblAgencyEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblAgency, new PropertyChangedEventHandler( OnTblAgencyPropertyChanged ), "TblAgency", Datalib.RelationClasses.StaticTblReferralRelations.TblAgencyEntityUsingAgencyTypeIdStatic, true, new string[] { } );
}
}
/// Handles property change events of properties in a related entity.
///
///
private void OnTblAgencyPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// Removes the sync logic for member _tblPatient
/// If set to true, it will call the related entity's UnsetRelatedEntity method
/// if set to true it will also reset the FK fields pointing to the related entity
private void DesetupSyncTblPatient(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblReferralRelations.TblPatientEntityUsingPatientIdStatic, true, signalRelatedEntity, "TblReferrals", resetFKFields, new int[] { (int)TblReferralFieldIndex.PatientId } );
_tblPatient = null;
}
/// setups the sync logic for member _tblPatient
/// Instance to set as the related entity of type entityType
private void SetupSyncTblPatient(IEntity2 relatedEntity)
{
if(_tblPatient!=relatedEntity)
{
DesetupSyncTblPatient(true, true);
_tblPatient = (TblPatientEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblReferralRelations.TblPatientEntityUsingPatientIdStatic, true, new string[] { } );
}
}
/// Handles property change events of properties in a related entity.
///
///
private void OnTblPatientPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// Removes the sync logic for member _tblService
/// If set to true, it will call the related entity's UnsetRelatedEntity method
/// if set to true it will also reset the FK fields pointing to the related entity
private void DesetupSyncTblService(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblService, new PropertyChangedEventHandler( OnTblServicePropertyChanged ), "TblService", Datalib.RelationClasses.StaticTblReferralRelations.TblServiceEntityUsingServiceIdStatic, true, signalRelatedEntity, "TblReferrals", resetFKFields, new int[] { (int)TblReferralFieldIndex.ServiceId } );
_tblService = null;
}
/// setups the sync logic for member _tblService
/// Instance to set as the related entity of type entityType
private void SetupSyncTblService(IEntity2 relatedEntity)
{
if(_tblService!=relatedEntity)
{
DesetupSyncTblService(true, true);
_tblService = (TblServiceEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblService, new PropertyChangedEventHandler( OnTblServicePropertyChanged ), "TblService", Datalib.RelationClasses.StaticTblReferralRelations.TblServiceEntityUsingServiceIdStatic, true, new string[] { } );
}
}
/// Handles property change events of properties in a related entity.
///
///
private void OnTblServicePropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// Initializes the class with empty data, as if it is a new Entity.
/// The validator object for this TblReferralEntity
/// Fields of this entity
private void InitClassEmpty(IValidator validator, IEntityFields2 fields)
{
OnInitializing();
this.Fields = fields ?? CreateFields();
this.Validator = validator;
InitClassMembers();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassEmpty
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitialized();
}
#region Class Property Declarations
/// The relations object holding all relations of this entity with other entity classes.
public static TblReferralRelations Relations
{
get { return new TblReferralRelations(); }
}
/// The custom properties for this entity type.
/// The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.
public static Dictionary CustomProperties
{
get { return _customProperties;}
}
/// Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblAgency' for this entity.
/// Ready to use IPrefetchPathElement2 implementation.
public static IPrefetchPathElement2 PrefetchPathTblAgency
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblAgencyEntityFactory))), (IEntityRelation)GetRelationsForField("TblAgency")[0], (int)Datalib.EntityType.TblReferralEntity, (int)Datalib.EntityType.TblAgencyEntity, 0, null, null, null, null, "TblAgency", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblPatient' for this entity.
/// Ready to use IPrefetchPathElement2 implementation.
public static IPrefetchPathElement2 PrefetchPathTblPatient
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblPatientEntityFactory))), (IEntityRelation)GetRelationsForField("TblPatient")[0], (int)Datalib.EntityType.TblReferralEntity, (int)Datalib.EntityType.TblPatientEntity, 0, null, null, null, null, "TblPatient", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblService' for this entity.
/// Ready to use IPrefetchPathElement2 implementation.
public static IPrefetchPathElement2 PrefetchPathTblService
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblServiceEntityFactory))), (IEntityRelation)GetRelationsForField("TblService")[0], (int)Datalib.EntityType.TblReferralEntity, (int)Datalib.EntityType.TblServiceEntity, 0, null, null, null, null, "TblService", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// The custom properties for the type of this entity instance.
/// The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.
[Browsable(false), XmlIgnore]
protected override Dictionary CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs.
/// The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.
public static Dictionary> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// The custom properties for the fields of the type of this entity instance. The returned Hashtable contains per fieldname a hashtable of name-value pairs.
/// The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.
[Browsable(false), XmlIgnore]
protected override Dictionary> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// The AgencyTypeId property of the Entity TblReferral
/// Mapped on table field: "TblReferral"."AgencyTypeId"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String AgencyTypeId
{
get { return (System.String)GetValue((int)TblReferralFieldIndex.AgencyTypeId, true); }
set { SetValue((int)TblReferralFieldIndex.AgencyTypeId, value); }
}
/// The Note property of the Entity TblReferral
/// Mapped on table field: "TblReferral"."Note"
/// Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 2147483647
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String Note
{
get { return (System.String)GetValue((int)TblReferralFieldIndex.Note, true); }
set { SetValue((int)TblReferralFieldIndex.Note, value); }
}
/// The PatientId property of the Entity TblReferral
/// Mapped on table field: "TblReferral"."PatientId"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 15
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String PatientId
{
get { return (System.String)GetValue((int)TblReferralFieldIndex.PatientId, true); }
set { SetValue((int)TblReferralFieldIndex.PatientId, value); }
}
/// The ProvinceId property of the Entity TblReferral
/// Mapped on table field: "TblReferral"."ProvinceId"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 3
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String ProvinceId
{
get { return (System.String)GetValue((int)TblReferralFieldIndex.ProvinceId, true); }
set { SetValue((int)TblReferralFieldIndex.ProvinceId, value); }
}
/// The ReceiveServiceDate property of the Entity TblReferral
/// Mapped on table field: "TblReferral"."ReceiveServiceDate"
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual Nullable ReceiveServiceDate
{
get { return (Nullable)GetValue((int)TblReferralFieldIndex.ReceiveServiceDate, false); }
set { SetValue((int)TblReferralFieldIndex.ReceiveServiceDate, value); }
}
/// The ReferralAgency property of the Entity TblReferral
/// Mapped on table field: "TblReferral"."ReferralAgency"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String ReferralAgency
{
get { return (System.String)GetValue((int)TblReferralFieldIndex.ReferralAgency, true); }
set { SetValue((int)TblReferralFieldIndex.ReferralAgency, value); }
}
/// The ReferralDate property of the Entity TblReferral
/// Mapped on table field: "TblReferral"."ReferralDate"
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual Nullable ReferralDate
{
get { return (Nullable)GetValue((int)TblReferralFieldIndex.ReferralDate, false); }
set { SetValue((int)TblReferralFieldIndex.ReferralDate, value); }
}
/// The ServiceId property of the Entity TblReferral
/// Mapped on table field: "TblReferral"."ServiceId"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual System.String ServiceId
{
get { return (System.String)GetValue((int)TblReferralFieldIndex.ServiceId, true); }
set { SetValue((int)TblReferralFieldIndex.ServiceId, value); }
}
/// The Status property of the Entity TblReferral
/// Mapped on table field: "TblReferral"."Status"
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false
public virtual Nullable Status
{
get { return (Nullable)GetValue((int)TblReferralFieldIndex.Status, false); }
set { SetValue((int)TblReferralFieldIndex.Status, value); }
}
/// The UniqueKey property of the Entity TblReferral
/// Mapped on table field: "TblReferral"."UniqueKey"
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false
public virtual System.String UniqueKey
{
get { return (System.String)GetValue((int)TblReferralFieldIndex.UniqueKey, true); }
set { SetValue((int)TblReferralFieldIndex.UniqueKey, value); }
}
/// Gets / sets related entity of type 'TblAgencyEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..
[Browsable(false)]
public virtual TblAgencyEntity TblAgency
{
get { return _tblAgency; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblAgency(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblReferrals", "TblAgency", _tblAgency, true);
}
}
}
/// Gets / sets related entity of type 'TblPatientEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..
[Browsable(false)]
public virtual TblPatientEntity TblPatient
{
get { return _tblPatient; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblPatient(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblReferrals", "TblPatient", _tblPatient, true);
}
}
}
/// Gets / sets related entity of type 'TblServiceEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..
[Browsable(false)]
public virtual TblServiceEntity TblService
{
get { return _tblService; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblService(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblReferrals", "TblService", _tblService, true);
}
}
}
/// Gets the type of the hierarchy this entity is in.
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// Gets or sets a value indicating whether this entity is a subtype
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// Returns the Datalib.EntityType enum value for this entity.
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblReferralEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}