Upload to server

uploading
This commit is contained in:
2025-08-02 05:20:17 +07:00
commit a5eccbd452
984 changed files with 3031800 additions and 0 deletions

1
patientman/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
OmegaPro

View File

@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
</configuration>

View File

@@ -0,0 +1,59 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: System.CLSCompliant(true)]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]

View File

@@ -0,0 +1,592 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
namespace Datalib
{
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblAgeGroup.</summary>
public enum TblAgeGroupFieldIndex
{
///<summary>Age. </summary>
Age,
///<summary>Grp1. </summary>
Grp1,
///<summary>Grp2. </summary>
Grp2,
///<summary>Id. </summary>
Id,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblAgency.</summary>
public enum TblAgencyFieldIndex
{
///<summary>AgencyTypeId. </summary>
AgencyTypeId,
///<summary>EAgencyTypeName. </summary>
EAgencyTypeName,
///<summary>VAgencyTypeName. </summary>
VAgencyTypeName,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblChild.</summary>
public enum TblChildFieldIndex
{
///<summary>ChildId. </summary>
ChildId,
///<summary>ChildName. </summary>
ChildName,
///<summary>Ctxdate. </summary>
Ctxdate,
///<summary>FeedingType. </summary>
FeedingType,
///<summary>Hiv18Date. </summary>
Hiv18Date,
///<summary>Hiv18Result. </summary>
Hiv18Result,
///<summary>Pcrcdate1. </summary>
Pcrcdate1,
///<summary>Pcrcdate2. </summary>
Pcrcdate2,
///<summary>Pcrresult1. </summary>
Pcrresult1,
///<summary>Pcrresult2. </summary>
Pcrresult2,
///<summary>PreganceId. </summary>
PreganceId,
///<summary>Sex. </summary>
Sex,
///<summary>UniqueKey. </summary>
UniqueKey,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblClinicInfo.</summary>
public enum TblClinicInfoFieldIndex
{
///<summary>Anemia. </summary>
Anemia,
///<summary>Blackouts. </summary>
Blackouts,
///<summary>Burning. </summary>
Burning,
///<summary>ClinicDate. </summary>
ClinicDate,
///<summary>ClinicStage. </summary>
ClinicStage,
///<summary>Colic. </summary>
Colic,
///<summary>Depression. </summary>
Depression,
///<summary>Diarrhea. </summary>
Diarrhea,
///<summary>FatDistributionChanges. </summary>
FatDistributionChanges,
///<summary>Headache. </summary>
Headache,
///<summary>Height. </summary>
Height,
///<summary>Jaundice. </summary>
Jaundice,
///<summary>Motion. </summary>
Motion,
///<summary>Nausea. </summary>
Nausea,
///<summary>PatientId. </summary>
PatientId,
///<summary>Poisoning. </summary>
Poisoning,
///<summary>ProgressTb. </summary>
ProgressTb,
///<summary>Rash. </summary>
Rash,
///<summary>UniqueKey. </summary>
UniqueKey,
///<summary>Weight. </summary>
Weight,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblCommune.</summary>
public enum TblCommuneFieldIndex
{
///<summary>Communeid. </summary>
Communeid,
///<summary>Communename. </summary>
Communename,
///<summary>Districtid. </summary>
Districtid,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblDiary.</summary>
public enum TblDiaryFieldIndex
{
///<summary>EventDate. </summary>
EventDate,
///<summary>OtherResult. </summary>
OtherResult,
///<summary>PatientId. </summary>
PatientId,
///<summary>Reason. </summary>
Reason,
///<summary>Result. </summary>
Result,
///<summary>UniqueKey. </summary>
UniqueKey,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblDistrict.</summary>
public enum TblDistrictFieldIndex
{
///<summary>Districtid. </summary>
Districtid,
///<summary>Districtname. </summary>
Districtname,
///<summary>Provinceid. </summary>
Provinceid,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblExaminationInfo.</summary>
public enum TblExaminationInfoFieldIndex
{
///<summary>Anemia. </summary>
Anemia,
///<summary>Blackouts. </summary>
Blackouts,
///<summary>Burning. </summary>
Burning,
///<summary>Calc. </summary>
Calc,
///<summary>ClinicStage. </summary>
ClinicStage,
///<summary>Colic. </summary>
Colic,
///<summary>CommuneId. </summary>
CommuneId,
///<summary>DayDiff. </summary>
DayDiff,
///<summary>Depression. </summary>
Depression,
///<summary>Diarrhea. </summary>
Diarrhea,
///<summary>DistrictId. </summary>
DistrictId,
///<summary>EndExamDate. </summary>
EndExamDate,
///<summary>ExamDate. </summary>
ExamDate,
///<summary>FatDistributionChanges. </summary>
FatDistributionChanges,
///<summary>Headache. </summary>
Headache,
///<summary>Height. </summary>
Height,
///<summary>IsClinic. </summary>
IsClinic,
///<summary>Jaundice. </summary>
Jaundice,
///<summary>LateAppointmentReason. </summary>
LateAppointmentReason,
///<summary>LateTimes. </summary>
LateTimes,
///<summary>Motion. </summary>
Motion,
///<summary>Nausea. </summary>
Nausea,
///<summary>NoSelfExam. </summary>
NoSelfExam,
///<summary>OutPatientTreatment. </summary>
OutPatientTreatment,
///<summary>PatientId. </summary>
PatientId,
///<summary>Poisoning. </summary>
Poisoning,
///<summary>ProgressTb. </summary>
ProgressTb,
///<summary>ProvinceId. </summary>
ProvinceId,
///<summary>Rash. </summary>
Rash,
///<summary>ReasonEnd. </summary>
ReasonEnd,
///<summary>ReExamDate. </summary>
ReExamDate,
///<summary>ReTreatment. </summary>
ReTreatment,
///<summary>Status. </summary>
Status,
///<summary>TbScreen. </summary>
TbScreen,
///<summary>TbScreenResult. </summary>
TbScreenResult,
///<summary>TreatmentFollow. </summary>
TreatmentFollow,
///<summary>UniqueKey. </summary>
UniqueKey,
///<summary>Weight. </summary>
Weight,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblPatient.</summary>
public enum TblPatientFieldIndex
{
///<summary>Address. </summary>
Address,
///<summary>BirthYear. </summary>
BirthYear,
///<summary>CommuneId. </summary>
CommuneId,
///<summary>CreateDate. </summary>
CreateDate,
///<summary>DateofArv. </summary>
DateofArv,
///<summary>DateofReceivingDrug. </summary>
DateofReceivingDrug,
///<summary>Dateofreferral. </summary>
Dateofreferral,
///<summary>DateofRegistration. </summary>
DateofRegistration,
///<summary>DeathDate. </summary>
DeathDate,
///<summary>DistrictId. </summary>
DistrictId,
///<summary>HaveArvBefore. </summary>
HaveArvBefore,
///<summary>HivConfirmedDate. </summary>
HivConfirmedDate,
///<summary>IdentityCardNo. </summary>
IdentityCardNo,
///<summary>Insuranceid. </summary>
Insuranceid,
///<summary>ModifyDate. </summary>
ModifyDate,
///<summary>OldPatientId. </summary>
OldPatientId,
///<summary>PatientId. </summary>
PatientId,
///<summary>PatientName. </summary>
PatientName,
///<summary>ProvinceId. </summary>
ProvinceId,
///<summary>ReferralId. </summary>
ReferralId,
///<summary>ReferralName. </summary>
ReferralName,
///<summary>ReferralProvinceId. </summary>
ReferralProvinceId,
///<summary>Regimenid. </summary>
Regimenid,
///<summary>Sex. </summary>
Sex,
///<summary>Sms. </summary>
Sms,
///<summary>Status. </summary>
Status,
///<summary>SupporterInfo. </summary>
SupporterInfo,
///<summary>TelephoneNo. </summary>
TelephoneNo,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblPreClinicsInfo.</summary>
public enum TblPreClinicsInfoFieldIndex
{
///<summary>PatientId. </summary>
PatientId,
///<summary>QualityResult. </summary>
QualityResult,
///<summary>QuantityResult. </summary>
QuantityResult,
///<summary>Status. </summary>
Status,
///<summary>TestDate. </summary>
TestDate,
///<summary>Testid. </summary>
Testid,
///<summary>UniqueKey. </summary>
UniqueKey,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblPregnanceInfo.</summary>
public enum TblPregnanceInfoFieldIndex
{
///<summary>EstimatedDelivery. </summary>
EstimatedDelivery,
///<summary>Note. </summary>
Note,
///<summary>PatientId. </summary>
PatientId,
///<summary>PregnanceDate. </summary>
PregnanceDate,
///<summary>UniqueKey. </summary>
UniqueKey,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblProvince.</summary>
public enum TblProvinceFieldIndex
{
///<summary>Provinceid. </summary>
Provinceid,
///<summary>Provincename. </summary>
Provincename,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblReferralFromPlace.</summary>
public enum TblReferralFromPlaceFieldIndex
{
///<summary>EReferralName. </summary>
EReferralName,
///<summary>ReferralId. </summary>
ReferralId,
///<summary>VReferralName. </summary>
VReferralName,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblReferralsTo.</summary>
public enum TblReferralsToFieldIndex
{
///<summary>AgencyTypeId. </summary>
AgencyTypeId,
///<summary>DeathReasonId. </summary>
DeathReasonId,
///<summary>EndDate. </summary>
EndDate,
///<summary>Note. </summary>
Note,
///<summary>PatientId. </summary>
PatientId,
///<summary>ProvinceId. </summary>
ProvinceId,
///<summary>ReceiveServiceDate. </summary>
ReceiveServiceDate,
///<summary>ReferralAgency. </summary>
ReferralAgency,
///<summary>Status. </summary>
Status,
///<summary>TypeId. </summary>
TypeId,
///<summary>UniqueKey. </summary>
UniqueKey,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblReferraltoService.</summary>
public enum TblReferraltoServiceFieldIndex
{
///<summary>AgencyTypeId. </summary>
AgencyTypeId,
///<summary>Note. </summary>
Note,
///<summary>PatientId. </summary>
PatientId,
///<summary>ProvinceId. </summary>
ProvinceId,
///<summary>ReceiveServiceDate. </summary>
ReceiveServiceDate,
///<summary>ReferralAgency. </summary>
ReferralAgency,
///<summary>ReferralDate. </summary>
ReferralDate,
///<summary>Status. </summary>
Status,
///<summary>UniqueKey. </summary>
UniqueKey,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblRegimen.</summary>
public enum TblRegimenFieldIndex
{
///<summary>ERegimenName. </summary>
ERegimenName,
///<summary>Regimenid. </summary>
Regimenid,
///<summary>Sign. </summary>
Sign,
///<summary>Type. </summary>
Type,
///<summary>VRegimenname. </summary>
VRegimenname,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblRegimenStopReason.</summary>
public enum TblRegimenStopReasonFieldIndex
{
///<summary>EReasonDes. </summary>
EReasonDes,
///<summary>ReasonId. </summary>
ReasonId,
///<summary>Sign. </summary>
Sign,
///<summary>VReasonDes. </summary>
VReasonDes,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblService.</summary>
public enum TblServiceFieldIndex
{
///<summary>EServiceName. </summary>
EServiceName,
///<summary>ServiceId. </summary>
ServiceId,
///<summary>VServiceName. </summary>
VServiceName,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblTest.</summary>
public enum TblTestFieldIndex
{
///<summary>ETestName. </summary>
ETestName,
///<summary>Testid. </summary>
Testid,
///<summary>VTestName. </summary>
VTestName,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblTreatment.</summary>
public enum TblTreatmentFieldIndex
{
///<summary>ETreatmentDes. </summary>
ETreatmentDes,
///<summary>Sign. </summary>
Sign,
///<summary>TreatmentId. </summary>
TreatmentId,
///<summary>VTreatmentDes. </summary>
VTreatmentDes,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblTreatmentInfo.</summary>
public enum TblTreatmentInfoFieldIndex
{
///<summary>PatientId. </summary>
PatientId,
///<summary>ReasonId. </summary>
ReasonId,
///<summary>Regimenid. </summary>
Regimenid,
///<summary>TreatmentEdate. </summary>
TreatmentEdate,
///<summary>TreatmentId. </summary>
TreatmentId,
///<summary>TreatmentSdate. </summary>
TreatmentSdate,
///<summary>UniqueKey. </summary>
UniqueKey,
/// <summary></summary>
AmountOfFields
}
/// <summary>Index enum to fast-access EntityFields in the IEntityFields collection for the entity: TblWaitingList.</summary>
public enum TblWaitingListFieldIndex
{
///<summary>Arv. </summary>
Arv,
///<summary>FollowNum. </summary>
FollowNum,
///<summary>LastFolowResult. </summary>
LastFolowResult,
///<summary>LateTimes. </summary>
LateTimes,
///<summary>PatientId. </summary>
PatientId,
///<summary>PatientName. </summary>
PatientName,
///<summary>ReExamDate. </summary>
ReExamDate,
///<summary>Selected. </summary>
Selected,
///<summary>Status. </summary>
Status,
///<summary>TelephoneNo. </summary>
TelephoneNo,
/// <summary></summary>
AmountOfFields
}
/// <summary>Enum definition for all the entity types defined in this namespace. Used by the entityfields factory.</summary>
public enum EntityType
{
///<summary>TblAgeGroup</summary>
TblAgeGroupEntity,
///<summary>TblAgency</summary>
TblAgencyEntity,
///<summary>TblChild</summary>
TblChildEntity,
///<summary>TblClinicInfo</summary>
TblClinicInfoEntity,
///<summary>TblCommune</summary>
TblCommuneEntity,
///<summary>TblDiary</summary>
TblDiaryEntity,
///<summary>TblDistrict</summary>
TblDistrictEntity,
///<summary>TblExaminationInfo</summary>
TblExaminationInfoEntity,
///<summary>TblPatient</summary>
TblPatientEntity,
///<summary>TblPreClinicsInfo</summary>
TblPreClinicsInfoEntity,
///<summary>TblPregnanceInfo</summary>
TblPregnanceInfoEntity,
///<summary>TblProvince</summary>
TblProvinceEntity,
///<summary>TblReferralFromPlace</summary>
TblReferralFromPlaceEntity,
///<summary>TblReferralsTo</summary>
TblReferralsToEntity,
///<summary>TblReferraltoService</summary>
TblReferraltoServiceEntity,
///<summary>TblRegimen</summary>
TblRegimenEntity,
///<summary>TblRegimenStopReason</summary>
TblRegimenStopReasonEntity,
///<summary>TblService</summary>
TblServiceEntity,
///<summary>TblTest</summary>
TblTestEntity,
///<summary>TblTreatment</summary>
TblTreatmentEntity,
///<summary>TblTreatmentInfo</summary>
TblTreatmentInfoEntity,
///<summary>TblWaitingList</summary>
TblWaitingListEntity
}
#region Custom ConstantsEnums Code
// __LLBLGENPRO_USER_CODE_REGION_START CustomUserConstants
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}

View File

@@ -0,0 +1,114 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using Datalib;
using Datalib.HelperClasses;
using Datalib.FactoryClasses;
using Datalib.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
#if !CF
using System.Runtime.Serialization;
#endif
namespace Datalib.EntityClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>Common base class which is the base class for all generated entities which aren't a subtype of another entity.</summary>
[Serializable]
public abstract partial class CommonEntityBase : EntityBase2
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
/// <summary>CTor</summary>
protected CommonEntityBase()
{
}
/// <summary> CTor</summary>
protected CommonEntityBase(string name):base(name)
{
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected CommonEntityBase(SerializationInfo info, StreamingContext context) : base(info, context)
{
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>Gets the inheritance info provider instance of the project this entity instance is located in. </summary>
/// <returns>ready to use inheritance info provider instance.</returns>
protected override IInheritanceInfoProvider GetInheritanceInfoProvider()
{
return InheritanceInfoProviderSingleton.GetInstance();
}
/// <summary>Creates the ITypeDefaultValue instance used to provide default values for value types which aren't of type nullable(of T)</summary>
/// <returns></returns>
protected override ITypeDefaultValue CreateTypeDefaultValueProvider()
{
return new TypeDefaultValue();
}
/// <summary>Creates the entity collection and stores it in destination if destination is null</summary>
/// <typeparam name="T">type of the element to store in the collection</typeparam>
/// <typeparam name="TFactory">The type of the factory to pass to the entitycollection ctor.</typeparam>
/// <param name="navigatorName">Name of the property this collection is for.</param>
/// <param name="setContainingEntityInfo">if set to <see langword="true"/> the collection is for an 1:n relationship, and the containing entity info has to be set</param>
/// <param name="forMN">if set to <see langword="true"/> the collection is for an m:n relationship, otherwise for an 1:n relationship</param>
/// <param name="destination">The destination member variable.</param>
/// <returns>the collection referred to by destination if destination isn't null, otherwise the newly created collection (which is then stored in destination</returns>
protected EntityCollection<T> GetOrCreateEntityCollection<T, TFactory>(string navigatorName, bool setContainingEntityInfo, bool forMN, ref EntityCollection<T> destination)
where T:EntityBase2 , IEntity2
{
if(destination==null)
{
destination = new EntityCollection<T>(EntityFactoryCache2.GetEntityFactory(typeof(TFactory)));
if(forMN)
{
((IEntityCollectionCore)destination).IsForMN = true;
}
else
{
if(setContainingEntityInfo)
{
destination.SetContainingEntityInfo(this, navigatorName);
}
}
destination.ActiveContext = this.ActiveContext;
}
return destination;
}
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,455 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblAgeGroup'.<br/><br/></summary>
[Serializable]
public partial class TblAgeGroupEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblAgeGroupEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblAgeGroupEntity():base("TblAgeGroupEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblAgeGroupEntity(IEntityFields2 fields):base("TblAgeGroupEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblAgeGroupEntity</param>
public TblAgeGroupEntity(IValidator validator):base("TblAgeGroupEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="id">PK value for TblAgeGroup which data should be fetched into this TblAgeGroup object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblAgeGroupEntity(System.Int16 id):base("TblAgeGroupEntity")
{
InitClassEmpty(null, null);
this.Id = id;
}
/// <summary> CTor</summary>
/// <param name="id">PK value for TblAgeGroup which data should be fetched into this TblAgeGroup object</param>
/// <param name="validator">The custom validator object for this TblAgeGroupEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblAgeGroupEntity(System.Int16 id, IValidator validator):base("TblAgeGroupEntity")
{
InitClassEmpty(validator, null);
this.Id = id;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblAgeGroupEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary> Method which will construct a filter (predicate expression) for the unique constraint defined on the fields:
/// Age .</summary>
/// <returns>true if succeeded and the contents is read, false otherwise</returns>
public IPredicateExpression ConstructFilterForUCAge()
{
IPredicateExpression filter = new PredicateExpression();
filter.Add(Datalib.HelperClasses.TblAgeGroupFields.Age == this.Fields.GetCurrentValue((int)TblAgeGroupFieldIndex.Age));
return filter;
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblAgeGroupRelations().GetAllRelations();
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblAgeGroupEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Age", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Grp1", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Grp2", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Id", fieldHashtable);
}
#endregion
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblAgeGroupEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblAgeGroupRelations Relations
{
get { return new TblAgeGroupRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The Age property of the Entity TblAgeGroup<br/><br/></summary>
/// <remarks>Mapped on table field: "tblAgeGroup"."Age"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Age
{
get { return (Nullable<System.Int16>)GetValue((int)TblAgeGroupFieldIndex.Age, false); }
set { SetValue((int)TblAgeGroupFieldIndex.Age, value); }
}
/// <summary> The Grp1 property of the Entity TblAgeGroup<br/><br/></summary>
/// <remarks>Mapped on table field: "tblAgeGroup"."Grp1"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 10<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Grp1
{
get { return (System.String)GetValue((int)TblAgeGroupFieldIndex.Grp1, true); }
set { SetValue((int)TblAgeGroupFieldIndex.Grp1, value); }
}
/// <summary> The Grp2 property of the Entity TblAgeGroup<br/><br/></summary>
/// <remarks>Mapped on table field: "tblAgeGroup"."Grp2"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 10<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Grp2
{
get { return (System.String)GetValue((int)TblAgeGroupFieldIndex.Grp2, true); }
set { SetValue((int)TblAgeGroupFieldIndex.Grp2, value); }
}
/// <summary> The Id property of the Entity TblAgeGroup<br/><br/></summary>
/// <remarks>Mapped on table field: "tblAgeGroup"."ID"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.Int16 Id
{
get { return (System.Int16)GetValue((int)TblAgeGroupFieldIndex.Id, true); }
set { SetValue((int)TblAgeGroupFieldIndex.Id, value); }
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblAgeGroupEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,479 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblAgency'.<br/><br/></summary>
[Serializable]
public partial class TblAgencyEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private EntityCollection<TblReferraltoServiceEntity> _tblReferraltoServices;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblReferraltoServices</summary>
public static readonly string TblReferraltoServices = "TblReferraltoServices";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblAgencyEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblAgencyEntity():base("TblAgencyEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblAgencyEntity(IEntityFields2 fields):base("TblAgencyEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblAgencyEntity</param>
public TblAgencyEntity(IValidator validator):base("TblAgencyEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="agencyTypeId">PK value for TblAgency which data should be fetched into this TblAgency object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblAgencyEntity(System.String agencyTypeId):base("TblAgencyEntity")
{
InitClassEmpty(null, null);
this.AgencyTypeId = agencyTypeId;
}
/// <summary> CTor</summary>
/// <param name="agencyTypeId">PK value for TblAgency which data should be fetched into this TblAgency object</param>
/// <param name="validator">The custom validator object for this TblAgencyEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblAgencyEntity(System.String agencyTypeId, IValidator validator):base("TblAgencyEntity")
{
InitClassEmpty(validator, null);
this.AgencyTypeId = agencyTypeId;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblAgencyEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblReferraltoServices = (EntityCollection<TblReferraltoServiceEntity>)info.GetValue("_tblReferraltoServices", typeof(EntityCollection<TblReferraltoServiceEntity>));
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblReferraltoServices":
this.TblReferraltoServices.Add((TblReferraltoServiceEntity)entity);
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblReferraltoServices":
toReturn.Add(Relations.TblReferraltoServiceEntityUsingAgencyTypeId);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblReferraltoServices":
this.TblReferraltoServices.Add((TblReferraltoServiceEntity)relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblReferraltoServices":
this.PerformRelatedEntityRemoval(this.TblReferraltoServices, relatedEntity, signalRelatedEntityManyToOne);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
toReturn.Add(this.TblReferraltoServices);
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblReferraltoServices", ((_tblReferraltoServices!=null) && (_tblReferraltoServices.Count>0) && !this.MarkedForDeletion)?_tblReferraltoServices:null);
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblAgencyRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblReferraltoService' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblReferraltoServices()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblReferraltoServiceFields.AgencyTypeId, null, ComparisonOperator.Equal, this.AgencyTypeId));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblAgencyEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
collectionsQueue.Enqueue(this._tblReferraltoServices);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
this._tblReferraltoServices = (EntityCollection<TblReferraltoServiceEntity>) collectionsQueue.Dequeue();
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
toReturn |=(this._tblReferraltoServices != null);
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection<TblReferraltoServiceEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblReferraltoServiceEntityFactory))) : null);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblReferraltoServices", _tblReferraltoServices);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("AgencyTypeId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("EAgencyTypeName", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("VAgencyTypeName", fieldHashtable);
}
#endregion
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblAgencyEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblAgencyRelations Relations
{
get { return new TblAgencyRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblReferraltoService' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblReferraltoServices
{
get { return new PrefetchPathElement2( new EntityCollection<TblReferraltoServiceEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblReferraltoServiceEntityFactory))), (IEntityRelation)GetRelationsForField("TblReferraltoServices")[0], (int)Datalib.EntityType.TblAgencyEntity, (int)Datalib.EntityType.TblReferraltoServiceEntity, 0, null, null, null, null, "TblReferraltoServices", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The AgencyTypeId property of the Entity TblAgency<br/><br/></summary>
/// <remarks>Mapped on table field: "tblAgency"."AgencyTypeID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String AgencyTypeId
{
get { return (System.String)GetValue((int)TblAgencyFieldIndex.AgencyTypeId, true); }
set { SetValue((int)TblAgencyFieldIndex.AgencyTypeId, value); }
}
/// <summary> The EAgencyTypeName property of the Entity TblAgency<br/><br/></summary>
/// <remarks>Mapped on table field: "tblAgency"."eAgencyTypeName"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String EAgencyTypeName
{
get { return (System.String)GetValue((int)TblAgencyFieldIndex.EAgencyTypeName, true); }
set { SetValue((int)TblAgencyFieldIndex.EAgencyTypeName, value); }
}
/// <summary> The VAgencyTypeName property of the Entity TblAgency<br/><br/></summary>
/// <remarks>Mapped on table field: "tblAgency"."vAgencyTypeName"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String VAgencyTypeName
{
get { return (System.String)GetValue((int)TblAgencyFieldIndex.VAgencyTypeName, true); }
set { SetValue((int)TblAgencyFieldIndex.VAgencyTypeName, value); }
}
/// <summary> Gets the EntityCollection with the related entities of type 'TblReferraltoServiceEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblReferraltoServiceEntity))]
public virtual EntityCollection<TblReferraltoServiceEntity> TblReferraltoServices
{
get { return GetOrCreateEntityCollection<TblReferraltoServiceEntity, TblReferraltoServiceEntityFactory>("TblAgency", true, false, ref _tblReferraltoServices); }
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblAgencyEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,661 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblChild'.<br/><br/></summary>
[Serializable]
public partial class TblChildEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private TblPregnanceInfoEntity _tblPregnanceInfo;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblPregnanceInfo</summary>
public static readonly string TblPregnanceInfo = "TblPregnanceInfo";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblChildEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblChildEntity():base("TblChildEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblChildEntity(IEntityFields2 fields):base("TblChildEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblChildEntity</param>
public TblChildEntity(IValidator validator):base("TblChildEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblChild which data should be fetched into this TblChild object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblChildEntity(System.String uniqueKey):base("TblChildEntity")
{
InitClassEmpty(null, null);
this.UniqueKey = uniqueKey;
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblChild which data should be fetched into this TblChild object</param>
/// <param name="validator">The custom validator object for this TblChildEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblChildEntity(System.String uniqueKey, IValidator validator):base("TblChildEntity")
{
InitClassEmpty(validator, null);
this.UniqueKey = uniqueKey;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblChildEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblPregnanceInfo = (TblPregnanceInfoEntity)info.GetValue("_tblPregnanceInfo", typeof(TblPregnanceInfoEntity));
if(_tblPregnanceInfo!=null)
{
_tblPregnanceInfo.AfterSave+=new EventHandler(OnEntityAfterSave);
}
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>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.</summary>
/// <param name="fieldIndex">The fieldindex.</param>
protected override void PerformDesyncSetupFKFieldChange(int fieldIndex)
{
switch((TblChildFieldIndex)fieldIndex)
{
case TblChildFieldIndex.PreganceId:
DesetupSyncTblPregnanceInfo(true, false);
break;
default:
base.PerformDesyncSetupFKFieldChange(fieldIndex);
break;
}
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblPregnanceInfo":
this.TblPregnanceInfo = (TblPregnanceInfoEntity)entity;
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblPregnanceInfo":
toReturn.Add(Relations.TblPregnanceInfoEntityUsingPreganceId);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblPregnanceInfo":
SetupSyncTblPregnanceInfo(relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblPregnanceInfo":
DesetupSyncTblPregnanceInfo(false, true);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
if(_tblPregnanceInfo!=null)
{
toReturn.Add(_tblPregnanceInfo);
}
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblPregnanceInfo", (!this.MarkedForDeletion?_tblPregnanceInfo:null));
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblChildRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblPregnanceInfo' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblPregnanceInfo()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblPregnanceInfoFields.UniqueKey, null, ComparisonOperator.Equal, this.PreganceId));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblChildEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblPregnanceInfo", _tblPregnanceInfo);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ChildId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ChildName", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Ctxdate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("FeedingType", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Hiv18Date", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Hiv18Result", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Pcrcdate1", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Pcrcdate2", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Pcrresult1", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Pcrresult2", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("PreganceId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Sex", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("UniqueKey", fieldHashtable);
}
#endregion
/// <summary> Removes the sync logic for member _tblPregnanceInfo</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblPregnanceInfo(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblPregnanceInfo, new PropertyChangedEventHandler( OnTblPregnanceInfoPropertyChanged ), "TblPregnanceInfo", Datalib.RelationClasses.StaticTblChildRelations.TblPregnanceInfoEntityUsingPreganceIdStatic, true, signalRelatedEntity, "TblChildren", resetFKFields, new int[] { (int)TblChildFieldIndex.PreganceId } );
_tblPregnanceInfo = null;
}
/// <summary> setups the sync logic for member _tblPregnanceInfo</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblPregnanceInfo(IEntityCore relatedEntity)
{
if(_tblPregnanceInfo!=relatedEntity)
{
DesetupSyncTblPregnanceInfo(true, true);
_tblPregnanceInfo = (TblPregnanceInfoEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblPregnanceInfo, new PropertyChangedEventHandler( OnTblPregnanceInfoPropertyChanged ), "TblPregnanceInfo", Datalib.RelationClasses.StaticTblChildRelations.TblPregnanceInfoEntityUsingPreganceIdStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblPregnanceInfoPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblChildEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblChildRelations Relations
{
get { return new TblChildRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblPregnanceInfo' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblPregnanceInfo
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblPregnanceInfoEntityFactory))), (IEntityRelation)GetRelationsForField("TblPregnanceInfo")[0], (int)Datalib.EntityType.TblChildEntity, (int)Datalib.EntityType.TblPregnanceInfoEntity, 0, null, null, null, null, "TblPregnanceInfo", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The ChildId property of the Entity TblChild<br/><br/></summary>
/// <remarks>Mapped on table field: "tblChildren"."ChildId"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 15<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String ChildId
{
get { return (System.String)GetValue((int)TblChildFieldIndex.ChildId, true); }
set { SetValue((int)TblChildFieldIndex.ChildId, value); }
}
/// <summary> The ChildName property of the Entity TblChild<br/><br/></summary>
/// <remarks>Mapped on table field: "tblChildren"."ChildName"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 25<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String ChildName
{
get { return (System.String)GetValue((int)TblChildFieldIndex.ChildName, true); }
set { SetValue((int)TblChildFieldIndex.ChildName, value); }
}
/// <summary> The Ctxdate property of the Entity TblChild<br/><br/></summary>
/// <remarks>Mapped on table field: "tblChildren"."CTXDate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> Ctxdate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblChildFieldIndex.Ctxdate, false); }
set { SetValue((int)TblChildFieldIndex.Ctxdate, value); }
}
/// <summary> The FeedingType property of the Entity TblChild<br/><br/></summary>
/// <remarks>Mapped on table field: "tblChildren"."FeedingType"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.Int16 FeedingType
{
get { return (System.Int16)GetValue((int)TblChildFieldIndex.FeedingType, true); }
set { SetValue((int)TblChildFieldIndex.FeedingType, value); }
}
/// <summary> The Hiv18Date property of the Entity TblChild<br/><br/></summary>
/// <remarks>Mapped on table field: "tblChildren"."HIV18Date"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> Hiv18Date
{
get { return (Nullable<System.DateTime>)GetValue((int)TblChildFieldIndex.Hiv18Date, false); }
set { SetValue((int)TblChildFieldIndex.Hiv18Date, value); }
}
/// <summary> The Hiv18Result property of the Entity TblChild<br/><br/></summary>
/// <remarks>Mapped on table field: "tblChildren"."HIV18Result"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Hiv18Result
{
get { return (Nullable<System.Int16>)GetValue((int)TblChildFieldIndex.Hiv18Result, false); }
set { SetValue((int)TblChildFieldIndex.Hiv18Result, value); }
}
/// <summary> The Pcrcdate1 property of the Entity TblChild<br/><br/></summary>
/// <remarks>Mapped on table field: "tblChildren"."PCRCDate1"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> Pcrcdate1
{
get { return (Nullable<System.DateTime>)GetValue((int)TblChildFieldIndex.Pcrcdate1, false); }
set { SetValue((int)TblChildFieldIndex.Pcrcdate1, value); }
}
/// <summary> The Pcrcdate2 property of the Entity TblChild<br/><br/></summary>
/// <remarks>Mapped on table field: "tblChildren"."PCRCDate2"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> Pcrcdate2
{
get { return (Nullable<System.DateTime>)GetValue((int)TblChildFieldIndex.Pcrcdate2, false); }
set { SetValue((int)TblChildFieldIndex.Pcrcdate2, value); }
}
/// <summary> The Pcrresult1 property of the Entity TblChild<br/><br/></summary>
/// <remarks>Mapped on table field: "tblChildren"."PCRResult1"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Pcrresult1
{
get { return (Nullable<System.Int16>)GetValue((int)TblChildFieldIndex.Pcrresult1, false); }
set { SetValue((int)TblChildFieldIndex.Pcrresult1, value); }
}
/// <summary> The Pcrresult2 property of the Entity TblChild<br/><br/></summary>
/// <remarks>Mapped on table field: "tblChildren"."PCRResult2"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Pcrresult2
{
get { return (Nullable<System.Int16>)GetValue((int)TblChildFieldIndex.Pcrresult2, false); }
set { SetValue((int)TblChildFieldIndex.Pcrresult2, value); }
}
/// <summary> The PreganceId property of the Entity TblChild<br/><br/></summary>
/// <remarks>Mapped on table field: "tblChildren"."PreganceID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String PreganceId
{
get { return (System.String)GetValue((int)TblChildFieldIndex.PreganceId, true); }
set { SetValue((int)TblChildFieldIndex.PreganceId, value); }
}
/// <summary> The Sex property of the Entity TblChild<br/><br/></summary>
/// <remarks>Mapped on table field: "tblChildren"."Sex"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.Int16 Sex
{
get { return (System.Int16)GetValue((int)TblChildFieldIndex.Sex, true); }
set { SetValue((int)TblChildFieldIndex.Sex, value); }
}
/// <summary> The UniqueKey property of the Entity TblChild<br/><br/></summary>
/// <remarks>Mapped on table field: "tblChildren"."UniqueKey"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String UniqueKey
{
get { return (System.String)GetValue((int)TblChildFieldIndex.UniqueKey, true); }
set { SetValue((int)TblChildFieldIndex.UniqueKey, value); }
}
/// <summary> Gets / sets related entity of type 'TblPregnanceInfoEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
[Browsable(false)]
public virtual TblPregnanceInfoEntity TblPregnanceInfo
{
get { return _tblPregnanceInfo; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblPregnanceInfo(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblChildren", "TblPregnanceInfo", _tblPregnanceInfo, true);
}
}
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblChildEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,745 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblClinicInfo'.<br/><br/></summary>
[Serializable]
public partial class TblClinicInfoEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private TblPatientEntity _tblPatient;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblPatient</summary>
public static readonly string TblPatient = "TblPatient";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblClinicInfoEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblClinicInfoEntity():base("TblClinicInfoEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblClinicInfoEntity(IEntityFields2 fields):base("TblClinicInfoEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblClinicInfoEntity</param>
public TblClinicInfoEntity(IValidator validator):base("TblClinicInfoEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblClinicInfo which data should be fetched into this TblClinicInfo object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblClinicInfoEntity(System.String uniqueKey):base("TblClinicInfoEntity")
{
InitClassEmpty(null, null);
this.UniqueKey = uniqueKey;
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblClinicInfo which data should be fetched into this TblClinicInfo object</param>
/// <param name="validator">The custom validator object for this TblClinicInfoEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblClinicInfoEntity(System.String uniqueKey, IValidator validator):base("TblClinicInfoEntity")
{
InitClassEmpty(validator, null);
this.UniqueKey = uniqueKey;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblClinicInfoEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblPatient = (TblPatientEntity)info.GetValue("_tblPatient", typeof(TblPatientEntity));
if(_tblPatient!=null)
{
_tblPatient.AfterSave+=new EventHandler(OnEntityAfterSave);
}
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>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.</summary>
/// <param name="fieldIndex">The fieldindex.</param>
protected override void PerformDesyncSetupFKFieldChange(int fieldIndex)
{
switch((TblClinicInfoFieldIndex)fieldIndex)
{
case TblClinicInfoFieldIndex.PatientId:
DesetupSyncTblPatient(true, false);
break;
default:
base.PerformDesyncSetupFKFieldChange(fieldIndex);
break;
}
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblPatient":
this.TblPatient = (TblPatientEntity)entity;
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblPatient":
toReturn.Add(Relations.TblPatientEntityUsingPatientId);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblPatient":
SetupSyncTblPatient(relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblPatient":
DesetupSyncTblPatient(false, true);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
if(_tblPatient!=null)
{
toReturn.Add(_tblPatient);
}
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblPatient", (!this.MarkedForDeletion?_tblPatient:null));
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblClinicInfoRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblPatient' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblPatient()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblPatientFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblClinicInfoEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblPatient", _tblPatient);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Anemia", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Blackouts", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Burning", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ClinicDate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ClinicStage", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Colic", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Depression", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Diarrhea", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("FatDistributionChanges", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Headache", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Height", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Jaundice", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Motion", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Nausea", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("PatientId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Poisoning", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ProgressTb", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Rash", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("UniqueKey", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Weight", fieldHashtable);
}
#endregion
/// <summary> Removes the sync logic for member _tblPatient</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblPatient(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblClinicInfoRelations.TblPatientEntityUsingPatientIdStatic, true, signalRelatedEntity, "TblClinicInfos", resetFKFields, new int[] { (int)TblClinicInfoFieldIndex.PatientId } );
_tblPatient = null;
}
/// <summary> setups the sync logic for member _tblPatient</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblPatient(IEntityCore relatedEntity)
{
if(_tblPatient!=relatedEntity)
{
DesetupSyncTblPatient(true, true);
_tblPatient = (TblPatientEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblClinicInfoRelations.TblPatientEntityUsingPatientIdStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblPatientPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblClinicInfoEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblClinicInfoRelations Relations
{
get { return new TblClinicInfoRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblPatient' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblPatient
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblPatientEntityFactory))), (IEntityRelation)GetRelationsForField("TblPatient")[0], (int)Datalib.EntityType.TblClinicInfoEntity, (int)Datalib.EntityType.TblPatientEntity, 0, null, null, null, null, "TblPatient", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The Anemia property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."Anemia"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Anemia
{
get { return (Nullable<System.Int16>)GetValue((int)TblClinicInfoFieldIndex.Anemia, false); }
set { SetValue((int)TblClinicInfoFieldIndex.Anemia, value); }
}
/// <summary> The Blackouts property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."Blackouts"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Blackouts
{
get { return (Nullable<System.Int16>)GetValue((int)TblClinicInfoFieldIndex.Blackouts, false); }
set { SetValue((int)TblClinicInfoFieldIndex.Blackouts, value); }
}
/// <summary> The Burning property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."Burning"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Burning
{
get { return (Nullable<System.Int16>)GetValue((int)TblClinicInfoFieldIndex.Burning, false); }
set { SetValue((int)TblClinicInfoFieldIndex.Burning, value); }
}
/// <summary> The ClinicDate property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."ClinicDate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> ClinicDate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblClinicInfoFieldIndex.ClinicDate, false); }
set { SetValue((int)TblClinicInfoFieldIndex.ClinicDate, value); }
}
/// <summary> The ClinicStage property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."ClinicStage"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> ClinicStage
{
get { return (Nullable<System.Int16>)GetValue((int)TblClinicInfoFieldIndex.ClinicStage, false); }
set { SetValue((int)TblClinicInfoFieldIndex.ClinicStage, value); }
}
/// <summary> The Colic property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."Colic"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Colic
{
get { return (Nullable<System.Int16>)GetValue((int)TblClinicInfoFieldIndex.Colic, false); }
set { SetValue((int)TblClinicInfoFieldIndex.Colic, value); }
}
/// <summary> The Depression property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."Depression"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Depression
{
get { return (Nullable<System.Int16>)GetValue((int)TblClinicInfoFieldIndex.Depression, false); }
set { SetValue((int)TblClinicInfoFieldIndex.Depression, value); }
}
/// <summary> The Diarrhea property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."Diarrhea"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Diarrhea
{
get { return (Nullable<System.Int16>)GetValue((int)TblClinicInfoFieldIndex.Diarrhea, false); }
set { SetValue((int)TblClinicInfoFieldIndex.Diarrhea, value); }
}
/// <summary> The FatDistributionChanges property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."FatDistributionChanges"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> FatDistributionChanges
{
get { return (Nullable<System.Int16>)GetValue((int)TblClinicInfoFieldIndex.FatDistributionChanges, false); }
set { SetValue((int)TblClinicInfoFieldIndex.FatDistributionChanges, value); }
}
/// <summary> The Headache property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."Headache"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Headache
{
get { return (Nullable<System.Int16>)GetValue((int)TblClinicInfoFieldIndex.Headache, false); }
set { SetValue((int)TblClinicInfoFieldIndex.Headache, value); }
}
/// <summary> The Height property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."Height"<br/>
/// Table field type characteristics (type, precision, scale, length): Double, 15, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Double> Height
{
get { return (Nullable<System.Double>)GetValue((int)TblClinicInfoFieldIndex.Height, false); }
set { SetValue((int)TblClinicInfoFieldIndex.Height, value); }
}
/// <summary> The Jaundice property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."jaundice"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Jaundice
{
get { return (Nullable<System.Int16>)GetValue((int)TblClinicInfoFieldIndex.Jaundice, false); }
set { SetValue((int)TblClinicInfoFieldIndex.Jaundice, value); }
}
/// <summary> The Motion property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."Motion"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Motion
{
get { return (Nullable<System.Int16>)GetValue((int)TblClinicInfoFieldIndex.Motion, false); }
set { SetValue((int)TblClinicInfoFieldIndex.Motion, value); }
}
/// <summary> The Nausea property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."Nausea"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Nausea
{
get { return (Nullable<System.Int16>)GetValue((int)TblClinicInfoFieldIndex.Nausea, false); }
set { SetValue((int)TblClinicInfoFieldIndex.Nausea, value); }
}
/// <summary> The PatientId property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."PatientID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 15<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.String PatientId
{
get { return (System.String)GetValue((int)TblClinicInfoFieldIndex.PatientId, true); }
set { SetValue((int)TblClinicInfoFieldIndex.PatientId, value); }
}
/// <summary> The Poisoning property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."Poisoning"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Poisoning
{
get { return (Nullable<System.Int16>)GetValue((int)TblClinicInfoFieldIndex.Poisoning, false); }
set { SetValue((int)TblClinicInfoFieldIndex.Poisoning, value); }
}
/// <summary> The ProgressTb property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."ProgressTB"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> ProgressTb
{
get { return (Nullable<System.Int16>)GetValue((int)TblClinicInfoFieldIndex.ProgressTb, false); }
set { SetValue((int)TblClinicInfoFieldIndex.ProgressTb, value); }
}
/// <summary> The Rash property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."Rash"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Rash
{
get { return (Nullable<System.Int16>)GetValue((int)TblClinicInfoFieldIndex.Rash, false); }
set { SetValue((int)TblClinicInfoFieldIndex.Rash, value); }
}
/// <summary> The UniqueKey property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."UniqueKey"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String UniqueKey
{
get { return (System.String)GetValue((int)TblClinicInfoFieldIndex.UniqueKey, true); }
set { SetValue((int)TblClinicInfoFieldIndex.UniqueKey, value); }
}
/// <summary> The Weight property of the Entity TblClinicInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblClinicInfo"."Weight"<br/>
/// Table field type characteristics (type, precision, scale, length): Double, 15, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Double> Weight
{
get { return (Nullable<System.Double>)GetValue((int)TblClinicInfoFieldIndex.Weight, false); }
set { SetValue((int)TblClinicInfoFieldIndex.Weight, value); }
}
/// <summary> 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..<br/><br/></summary>
[Browsable(false)]
public virtual TblPatientEntity TblPatient
{
get { return _tblPatient; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblPatient(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblClinicInfos", "TblPatient", _tblPatient, true);
}
}
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblClinicInfoEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,541 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblCommune'.<br/><br/></summary>
[Serializable]
public partial class TblCommuneEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private TblDistrictEntity _tblDistrict;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblDistrict</summary>
public static readonly string TblDistrict = "TblDistrict";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblCommuneEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblCommuneEntity():base("TblCommuneEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblCommuneEntity(IEntityFields2 fields):base("TblCommuneEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblCommuneEntity</param>
public TblCommuneEntity(IValidator validator):base("TblCommuneEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="communeid">PK value for TblCommune which data should be fetched into this TblCommune object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblCommuneEntity(System.String communeid):base("TblCommuneEntity")
{
InitClassEmpty(null, null);
this.Communeid = communeid;
}
/// <summary> CTor</summary>
/// <param name="communeid">PK value for TblCommune which data should be fetched into this TblCommune object</param>
/// <param name="validator">The custom validator object for this TblCommuneEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblCommuneEntity(System.String communeid, IValidator validator):base("TblCommuneEntity")
{
InitClassEmpty(validator, null);
this.Communeid = communeid;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblCommuneEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblDistrict = (TblDistrictEntity)info.GetValue("_tblDistrict", typeof(TblDistrictEntity));
if(_tblDistrict!=null)
{
_tblDistrict.AfterSave+=new EventHandler(OnEntityAfterSave);
}
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>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.</summary>
/// <param name="fieldIndex">The fieldindex.</param>
protected override void PerformDesyncSetupFKFieldChange(int fieldIndex)
{
switch((TblCommuneFieldIndex)fieldIndex)
{
case TblCommuneFieldIndex.Districtid:
DesetupSyncTblDistrict(true, false);
break;
default:
base.PerformDesyncSetupFKFieldChange(fieldIndex);
break;
}
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblDistrict":
this.TblDistrict = (TblDistrictEntity)entity;
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblDistrict":
toReturn.Add(Relations.TblDistrictEntityUsingDistrictid);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblDistrict":
SetupSyncTblDistrict(relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblDistrict":
DesetupSyncTblDistrict(false, true);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
if(_tblDistrict!=null)
{
toReturn.Add(_tblDistrict);
}
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblDistrict", (!this.MarkedForDeletion?_tblDistrict:null));
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblCommuneRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblDistrict' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblDistrict()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblDistrictFields.Districtid, null, ComparisonOperator.Equal, this.Districtid));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblCommuneEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblDistrict", _tblDistrict);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Communeid", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Communename", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Districtid", fieldHashtable);
}
#endregion
/// <summary> Removes the sync logic for member _tblDistrict</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblDistrict(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblDistrict, new PropertyChangedEventHandler( OnTblDistrictPropertyChanged ), "TblDistrict", Datalib.RelationClasses.StaticTblCommuneRelations.TblDistrictEntityUsingDistrictidStatic, true, signalRelatedEntity, "TblCommunes", resetFKFields, new int[] { (int)TblCommuneFieldIndex.Districtid } );
_tblDistrict = null;
}
/// <summary> setups the sync logic for member _tblDistrict</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblDistrict(IEntityCore relatedEntity)
{
if(_tblDistrict!=relatedEntity)
{
DesetupSyncTblDistrict(true, true);
_tblDistrict = (TblDistrictEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblDistrict, new PropertyChangedEventHandler( OnTblDistrictPropertyChanged ), "TblDistrict", Datalib.RelationClasses.StaticTblCommuneRelations.TblDistrictEntityUsingDistrictidStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblDistrictPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblCommuneEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblCommuneRelations Relations
{
get { return new TblCommuneRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblDistrict' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblDistrict
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblDistrictEntityFactory))), (IEntityRelation)GetRelationsForField("TblDistrict")[0], (int)Datalib.EntityType.TblCommuneEntity, (int)Datalib.EntityType.TblDistrictEntity, 0, null, null, null, null, "TblDistrict", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The Communeid property of the Entity TblCommune<br/><br/></summary>
/// <remarks>Mapped on table field: "tblCommunes"."communeid"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 7<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String Communeid
{
get { return (System.String)GetValue((int)TblCommuneFieldIndex.Communeid, true); }
set { SetValue((int)TblCommuneFieldIndex.Communeid, value); }
}
/// <summary> The Communename property of the Entity TblCommune<br/><br/></summary>
/// <remarks>Mapped on table field: "tblCommunes"."communename"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Communename
{
get { return (System.String)GetValue((int)TblCommuneFieldIndex.Communename, true); }
set { SetValue((int)TblCommuneFieldIndex.Communename, value); }
}
/// <summary> The Districtid property of the Entity TblCommune<br/><br/></summary>
/// <remarks>Mapped on table field: "tblCommunes"."districtid"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 5<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Districtid
{
get { return (System.String)GetValue((int)TblCommuneFieldIndex.Districtid, true); }
set { SetValue((int)TblCommuneFieldIndex.Districtid, value); }
}
/// <summary> Gets / sets related entity of type 'TblDistrictEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
[Browsable(false)]
public virtual TblDistrictEntity TblDistrict
{
get { return _tblDistrict; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblDistrict(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblCommunes", "TblDistrict", _tblDistrict, true);
}
}
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblCommuneEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,577 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblDiary'.<br/><br/></summary>
[Serializable]
public partial class TblDiaryEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private TblPatientEntity _tblPatient;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblPatient</summary>
public static readonly string TblPatient = "TblPatient";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblDiaryEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblDiaryEntity():base("TblDiaryEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblDiaryEntity(IEntityFields2 fields):base("TblDiaryEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblDiaryEntity</param>
public TblDiaryEntity(IValidator validator):base("TblDiaryEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblDiary which data should be fetched into this TblDiary object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblDiaryEntity(System.String uniqueKey):base("TblDiaryEntity")
{
InitClassEmpty(null, null);
this.UniqueKey = uniqueKey;
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblDiary which data should be fetched into this TblDiary object</param>
/// <param name="validator">The custom validator object for this TblDiaryEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblDiaryEntity(System.String uniqueKey, IValidator validator):base("TblDiaryEntity")
{
InitClassEmpty(validator, null);
this.UniqueKey = uniqueKey;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblDiaryEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblPatient = (TblPatientEntity)info.GetValue("_tblPatient", typeof(TblPatientEntity));
if(_tblPatient!=null)
{
_tblPatient.AfterSave+=new EventHandler(OnEntityAfterSave);
}
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>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.</summary>
/// <param name="fieldIndex">The fieldindex.</param>
protected override void PerformDesyncSetupFKFieldChange(int fieldIndex)
{
switch((TblDiaryFieldIndex)fieldIndex)
{
case TblDiaryFieldIndex.PatientId:
DesetupSyncTblPatient(true, false);
break;
default:
base.PerformDesyncSetupFKFieldChange(fieldIndex);
break;
}
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblPatient":
this.TblPatient = (TblPatientEntity)entity;
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblPatient":
toReturn.Add(Relations.TblPatientEntityUsingPatientId);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblPatient":
SetupSyncTblPatient(relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblPatient":
DesetupSyncTblPatient(false, true);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
if(_tblPatient!=null)
{
toReturn.Add(_tblPatient);
}
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblPatient", (!this.MarkedForDeletion?_tblPatient:null));
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblDiaryRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblPatient' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblPatient()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblPatientFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblDiaryEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblPatient", _tblPatient);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("EventDate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("OtherResult", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("PatientId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Reason", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Result", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("UniqueKey", fieldHashtable);
}
#endregion
/// <summary> Removes the sync logic for member _tblPatient</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblPatient(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblDiaryRelations.TblPatientEntityUsingPatientIdStatic, true, signalRelatedEntity, "TblDiaries", resetFKFields, new int[] { (int)TblDiaryFieldIndex.PatientId } );
_tblPatient = null;
}
/// <summary> setups the sync logic for member _tblPatient</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblPatient(IEntityCore relatedEntity)
{
if(_tblPatient!=relatedEntity)
{
DesetupSyncTblPatient(true, true);
_tblPatient = (TblPatientEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblDiaryRelations.TblPatientEntityUsingPatientIdStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblPatientPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblDiaryEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblDiaryRelations Relations
{
get { return new TblDiaryRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblPatient' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblPatient
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblPatientEntityFactory))), (IEntityRelation)GetRelationsForField("TblPatient")[0], (int)Datalib.EntityType.TblDiaryEntity, (int)Datalib.EntityType.TblPatientEntity, 0, null, null, null, null, "TblPatient", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The EventDate property of the Entity TblDiary<br/><br/></summary>
/// <remarks>Mapped on table field: "tblDiary"."EventDate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> EventDate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblDiaryFieldIndex.EventDate, false); }
set { SetValue((int)TblDiaryFieldIndex.EventDate, value); }
}
/// <summary> The OtherResult property of the Entity TblDiary<br/><br/></summary>
/// <remarks>Mapped on table field: "tblDiary"."OtherResult"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String OtherResult
{
get { return (System.String)GetValue((int)TblDiaryFieldIndex.OtherResult, true); }
set { SetValue((int)TblDiaryFieldIndex.OtherResult, value); }
}
/// <summary> The PatientId property of the Entity TblDiary<br/><br/></summary>
/// <remarks>Mapped on table field: "tblDiary"."PatientID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 15<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String PatientId
{
get { return (System.String)GetValue((int)TblDiaryFieldIndex.PatientId, true); }
set { SetValue((int)TblDiaryFieldIndex.PatientId, value); }
}
/// <summary> The Reason property of the Entity TblDiary<br/><br/></summary>
/// <remarks>Mapped on table field: "tblDiary"."Reason"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Reason
{
get { return (System.String)GetValue((int)TblDiaryFieldIndex.Reason, true); }
set { SetValue((int)TblDiaryFieldIndex.Reason, value); }
}
/// <summary> The Result property of the Entity TblDiary<br/><br/></summary>
/// <remarks>Mapped on table field: "tblDiary"."Result"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 1<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Result
{
get { return (System.String)GetValue((int)TblDiaryFieldIndex.Result, true); }
set { SetValue((int)TblDiaryFieldIndex.Result, value); }
}
/// <summary> The UniqueKey property of the Entity TblDiary<br/><br/></summary>
/// <remarks>Mapped on table field: "tblDiary"."UniqueKey"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String UniqueKey
{
get { return (System.String)GetValue((int)TblDiaryFieldIndex.UniqueKey, true); }
set { SetValue((int)TblDiaryFieldIndex.UniqueKey, value); }
}
/// <summary> 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..<br/><br/></summary>
[Browsable(false)]
public virtual TblPatientEntity TblPatient
{
get { return _tblPatient; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblPatient(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblDiaries", "TblPatient", _tblPatient, true);
}
}
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblDiaryEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,587 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblDistrict'.<br/><br/></summary>
[Serializable]
public partial class TblDistrictEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private EntityCollection<TblCommuneEntity> _tblCommunes;
private TblProvinceEntity _tblProvince;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblProvince</summary>
public static readonly string TblProvince = "TblProvince";
/// <summary>Member name TblCommunes</summary>
public static readonly string TblCommunes = "TblCommunes";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblDistrictEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblDistrictEntity():base("TblDistrictEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblDistrictEntity(IEntityFields2 fields):base("TblDistrictEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblDistrictEntity</param>
public TblDistrictEntity(IValidator validator):base("TblDistrictEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="districtid">PK value for TblDistrict which data should be fetched into this TblDistrict object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblDistrictEntity(System.String districtid):base("TblDistrictEntity")
{
InitClassEmpty(null, null);
this.Districtid = districtid;
}
/// <summary> CTor</summary>
/// <param name="districtid">PK value for TblDistrict which data should be fetched into this TblDistrict object</param>
/// <param name="validator">The custom validator object for this TblDistrictEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblDistrictEntity(System.String districtid, IValidator validator):base("TblDistrictEntity")
{
InitClassEmpty(validator, null);
this.Districtid = districtid;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblDistrictEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblCommunes = (EntityCollection<TblCommuneEntity>)info.GetValue("_tblCommunes", typeof(EntityCollection<TblCommuneEntity>));
_tblProvince = (TblProvinceEntity)info.GetValue("_tblProvince", typeof(TblProvinceEntity));
if(_tblProvince!=null)
{
_tblProvince.AfterSave+=new EventHandler(OnEntityAfterSave);
}
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>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.</summary>
/// <param name="fieldIndex">The fieldindex.</param>
protected override void PerformDesyncSetupFKFieldChange(int fieldIndex)
{
switch((TblDistrictFieldIndex)fieldIndex)
{
case TblDistrictFieldIndex.Provinceid:
DesetupSyncTblProvince(true, false);
break;
default:
base.PerformDesyncSetupFKFieldChange(fieldIndex);
break;
}
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblProvince":
this.TblProvince = (TblProvinceEntity)entity;
break;
case "TblCommunes":
this.TblCommunes.Add((TblCommuneEntity)entity);
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblProvince":
toReturn.Add(Relations.TblProvinceEntityUsingProvinceid);
break;
case "TblCommunes":
toReturn.Add(Relations.TblCommuneEntityUsingDistrictid);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblProvince":
SetupSyncTblProvince(relatedEntity);
break;
case "TblCommunes":
this.TblCommunes.Add((TblCommuneEntity)relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblProvince":
DesetupSyncTblProvince(false, true);
break;
case "TblCommunes":
this.PerformRelatedEntityRemoval(this.TblCommunes, relatedEntity, signalRelatedEntityManyToOne);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
if(_tblProvince!=null)
{
toReturn.Add(_tblProvince);
}
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
toReturn.Add(this.TblCommunes);
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblCommunes", ((_tblCommunes!=null) && (_tblCommunes.Count>0) && !this.MarkedForDeletion)?_tblCommunes:null);
info.AddValue("_tblProvince", (!this.MarkedForDeletion?_tblProvince:null));
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblDistrictRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblCommune' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblCommunes()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblCommuneFields.Districtid, null, ComparisonOperator.Equal, this.Districtid));
return bucket;
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblProvince' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblProvince()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblProvinceFields.Provinceid, null, ComparisonOperator.Equal, this.Provinceid));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblDistrictEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
collectionsQueue.Enqueue(this._tblCommunes);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
this._tblCommunes = (EntityCollection<TblCommuneEntity>) collectionsQueue.Dequeue();
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
toReturn |=(this._tblCommunes != null);
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection<TblCommuneEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblCommuneEntityFactory))) : null);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblProvince", _tblProvince);
toReturn.Add("TblCommunes", _tblCommunes);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Districtid", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Districtname", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Provinceid", fieldHashtable);
}
#endregion
/// <summary> Removes the sync logic for member _tblProvince</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblProvince(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblProvince, new PropertyChangedEventHandler( OnTblProvincePropertyChanged ), "TblProvince", Datalib.RelationClasses.StaticTblDistrictRelations.TblProvinceEntityUsingProvinceidStatic, true, signalRelatedEntity, "TblDistricts", resetFKFields, new int[] { (int)TblDistrictFieldIndex.Provinceid } );
_tblProvince = null;
}
/// <summary> setups the sync logic for member _tblProvince</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblProvince(IEntityCore relatedEntity)
{
if(_tblProvince!=relatedEntity)
{
DesetupSyncTblProvince(true, true);
_tblProvince = (TblProvinceEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblProvince, new PropertyChangedEventHandler( OnTblProvincePropertyChanged ), "TblProvince", Datalib.RelationClasses.StaticTblDistrictRelations.TblProvinceEntityUsingProvinceidStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblProvincePropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblDistrictEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblDistrictRelations Relations
{
get { return new TblDistrictRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblCommune' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblCommunes
{
get { return new PrefetchPathElement2( new EntityCollection<TblCommuneEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblCommuneEntityFactory))), (IEntityRelation)GetRelationsForField("TblCommunes")[0], (int)Datalib.EntityType.TblDistrictEntity, (int)Datalib.EntityType.TblCommuneEntity, 0, null, null, null, null, "TblCommunes", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblProvince' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblProvince
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblProvinceEntityFactory))), (IEntityRelation)GetRelationsForField("TblProvince")[0], (int)Datalib.EntityType.TblDistrictEntity, (int)Datalib.EntityType.TblProvinceEntity, 0, null, null, null, null, "TblProvince", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The Districtid property of the Entity TblDistrict<br/><br/></summary>
/// <remarks>Mapped on table field: "tblDistricts"."districtid"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 5<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String Districtid
{
get { return (System.String)GetValue((int)TblDistrictFieldIndex.Districtid, true); }
set { SetValue((int)TblDistrictFieldIndex.Districtid, value); }
}
/// <summary> The Districtname property of the Entity TblDistrict<br/><br/></summary>
/// <remarks>Mapped on table field: "tblDistricts"."districtname"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 26<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Districtname
{
get { return (System.String)GetValue((int)TblDistrictFieldIndex.Districtname, true); }
set { SetValue((int)TblDistrictFieldIndex.Districtname, value); }
}
/// <summary> The Provinceid property of the Entity TblDistrict<br/><br/></summary>
/// <remarks>Mapped on table field: "tblDistricts"."provinceid"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 3<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Provinceid
{
get { return (System.String)GetValue((int)TblDistrictFieldIndex.Provinceid, true); }
set { SetValue((int)TblDistrictFieldIndex.Provinceid, value); }
}
/// <summary> Gets the EntityCollection with the related entities of type 'TblCommuneEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblCommuneEntity))]
public virtual EntityCollection<TblCommuneEntity> TblCommunes
{
get { return GetOrCreateEntityCollection<TblCommuneEntity, TblCommuneEntityFactory>("TblDistrict", true, false, ref _tblCommunes); }
}
/// <summary> Gets / sets related entity of type 'TblProvinceEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
[Browsable(false)]
public virtual TblProvinceEntity TblProvince
{
get { return _tblProvince; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblProvince(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblDistricts", "TblProvince", _tblProvince, true);
}
}
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblDistrictEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,961 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblExaminationInfo'.<br/><br/></summary>
[Serializable]
public partial class TblExaminationInfoEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private TblPatientEntity _tblPatient;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblPatient</summary>
public static readonly string TblPatient = "TblPatient";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblExaminationInfoEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblExaminationInfoEntity():base("TblExaminationInfoEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblExaminationInfoEntity(IEntityFields2 fields):base("TblExaminationInfoEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblExaminationInfoEntity</param>
public TblExaminationInfoEntity(IValidator validator):base("TblExaminationInfoEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblExaminationInfo which data should be fetched into this TblExaminationInfo object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblExaminationInfoEntity(System.String uniqueKey):base("TblExaminationInfoEntity")
{
InitClassEmpty(null, null);
this.UniqueKey = uniqueKey;
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblExaminationInfo which data should be fetched into this TblExaminationInfo object</param>
/// <param name="validator">The custom validator object for this TblExaminationInfoEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblExaminationInfoEntity(System.String uniqueKey, IValidator validator):base("TblExaminationInfoEntity")
{
InitClassEmpty(validator, null);
this.UniqueKey = uniqueKey;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblExaminationInfoEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblPatient = (TblPatientEntity)info.GetValue("_tblPatient", typeof(TblPatientEntity));
if(_tblPatient!=null)
{
_tblPatient.AfterSave+=new EventHandler(OnEntityAfterSave);
}
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>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.</summary>
/// <param name="fieldIndex">The fieldindex.</param>
protected override void PerformDesyncSetupFKFieldChange(int fieldIndex)
{
switch((TblExaminationInfoFieldIndex)fieldIndex)
{
case TblExaminationInfoFieldIndex.PatientId:
DesetupSyncTblPatient(true, false);
break;
default:
base.PerformDesyncSetupFKFieldChange(fieldIndex);
break;
}
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblPatient":
this.TblPatient = (TblPatientEntity)entity;
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblPatient":
toReturn.Add(Relations.TblPatientEntityUsingPatientId);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblPatient":
SetupSyncTblPatient(relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblPatient":
DesetupSyncTblPatient(false, true);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
if(_tblPatient!=null)
{
toReturn.Add(_tblPatient);
}
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblPatient", (!this.MarkedForDeletion?_tblPatient:null));
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblExaminationInfoRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblPatient' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblPatient()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblPatientFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblExaminationInfoEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblPatient", _tblPatient);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Anemia", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Blackouts", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Burning", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Calc", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ClinicStage", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Colic", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("CommuneId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("DayDiff", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Depression", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Diarrhea", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("DistrictId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("EndExamDate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ExamDate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("FatDistributionChanges", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Headache", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Height", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("IsClinic", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Jaundice", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("LateAppointmentReason", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("LateTimes", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Motion", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Nausea", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("NoSelfExam", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("OutPatientTreatment", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("PatientId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Poisoning", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ProgressTb", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ProvinceId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Rash", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ReasonEnd", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ReExamDate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ReTreatment", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Status", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("TbScreen", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("TbScreenResult", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("TreatmentFollow", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("UniqueKey", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Weight", fieldHashtable);
}
#endregion
/// <summary> Removes the sync logic for member _tblPatient</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblPatient(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblExaminationInfoRelations.TblPatientEntityUsingPatientIdStatic, true, signalRelatedEntity, "TblExaminationInfos", resetFKFields, new int[] { (int)TblExaminationInfoFieldIndex.PatientId } );
_tblPatient = null;
}
/// <summary> setups the sync logic for member _tblPatient</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblPatient(IEntityCore relatedEntity)
{
if(_tblPatient!=relatedEntity)
{
DesetupSyncTblPatient(true, true);
_tblPatient = (TblPatientEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblExaminationInfoRelations.TblPatientEntityUsingPatientIdStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblPatientPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblExaminationInfoEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblExaminationInfoRelations Relations
{
get { return new TblExaminationInfoRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblPatient' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblPatient
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblPatientEntityFactory))), (IEntityRelation)GetRelationsForField("TblPatient")[0], (int)Datalib.EntityType.TblExaminationInfoEntity, (int)Datalib.EntityType.TblPatientEntity, 0, null, null, null, null, "TblPatient", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The Anemia property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."Anemia"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Anemia
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.Anemia, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Anemia, value); }
}
/// <summary> The Blackouts property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."Blackouts"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Blackouts
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.Blackouts, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Blackouts, value); }
}
/// <summary> The Burning property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."Burning"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Burning
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.Burning, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Burning, value); }
}
/// <summary> The Calc property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."Calc"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Calc
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.Calc, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Calc, value); }
}
/// <summary> The ClinicStage property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."ClinicStage"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> ClinicStage
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.ClinicStage, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.ClinicStage, value); }
}
/// <summary> The Colic property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."Colic"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Colic
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.Colic, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Colic, value); }
}
/// <summary> The CommuneId property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."CommuneID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 7<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String CommuneId
{
get { return (System.String)GetValue((int)TblExaminationInfoFieldIndex.CommuneId, true); }
set { SetValue((int)TblExaminationInfoFieldIndex.CommuneId, value); }
}
/// <summary> The DayDiff property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."DayDiff"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> DayDiff
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.DayDiff, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.DayDiff, value); }
}
/// <summary> The Depression property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."Depression"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Depression
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.Depression, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Depression, value); }
}
/// <summary> The Diarrhea property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."Diarrhea"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Diarrhea
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.Diarrhea, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Diarrhea, value); }
}
/// <summary> The DistrictId property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."DistrictID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 5<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String DistrictId
{
get { return (System.String)GetValue((int)TblExaminationInfoFieldIndex.DistrictId, true); }
set { SetValue((int)TblExaminationInfoFieldIndex.DistrictId, value); }
}
/// <summary> The EndExamDate property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."endExamDate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> EndExamDate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblExaminationInfoFieldIndex.EndExamDate, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.EndExamDate, value); }
}
/// <summary> The ExamDate property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."ExamDate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> ExamDate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblExaminationInfoFieldIndex.ExamDate, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.ExamDate, value); }
}
/// <summary> The FatDistributionChanges property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."FatDistributionChanges"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> FatDistributionChanges
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.FatDistributionChanges, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.FatDistributionChanges, value); }
}
/// <summary> The Headache property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."Headache"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Headache
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.Headache, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Headache, value); }
}
/// <summary> The Height property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."Height"<br/>
/// Table field type characteristics (type, precision, scale, length): Double, 15, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Double> Height
{
get { return (Nullable<System.Double>)GetValue((int)TblExaminationInfoFieldIndex.Height, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Height, value); }
}
/// <summary> The IsClinic property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."IsClinic"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> IsClinic
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.IsClinic, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.IsClinic, value); }
}
/// <summary> The Jaundice property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."jaundice"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Jaundice
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.Jaundice, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Jaundice, value); }
}
/// <summary> The LateAppointmentReason property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."LateAppointmentReason"<br/>
/// Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 536870911<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String LateAppointmentReason
{
get { return (System.String)GetValue((int)TblExaminationInfoFieldIndex.LateAppointmentReason, true); }
set { SetValue((int)TblExaminationInfoFieldIndex.LateAppointmentReason, value); }
}
/// <summary> The LateTimes property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."LateTimes"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 10<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String LateTimes
{
get { return (System.String)GetValue((int)TblExaminationInfoFieldIndex.LateTimes, true); }
set { SetValue((int)TblExaminationInfoFieldIndex.LateTimes, value); }
}
/// <summary> The Motion property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."Motion"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Motion
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.Motion, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Motion, value); }
}
/// <summary> The Nausea property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."Nausea"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Nausea
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.Nausea, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Nausea, value); }
}
/// <summary> The NoSelfExam property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."NoSelfExam"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> NoSelfExam
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.NoSelfExam, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.NoSelfExam, value); }
}
/// <summary> The OutPatientTreatment property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."OutPatientTreatment"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> OutPatientTreatment
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.OutPatientTreatment, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.OutPatientTreatment, value); }
}
/// <summary> The PatientId property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."PatientID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 15<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.String PatientId
{
get { return (System.String)GetValue((int)TblExaminationInfoFieldIndex.PatientId, true); }
set { SetValue((int)TblExaminationInfoFieldIndex.PatientId, value); }
}
/// <summary> The Poisoning property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."Poisoning"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Poisoning
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.Poisoning, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Poisoning, value); }
}
/// <summary> The ProgressTb property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."ProgressTB"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> ProgressTb
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.ProgressTb, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.ProgressTb, value); }
}
/// <summary> The ProvinceId property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."ProvinceID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 3<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String ProvinceId
{
get { return (System.String)GetValue((int)TblExaminationInfoFieldIndex.ProvinceId, true); }
set { SetValue((int)TblExaminationInfoFieldIndex.ProvinceId, value); }
}
/// <summary> The Rash property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."Rash"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Rash
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.Rash, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Rash, value); }
}
/// <summary> The ReasonEnd property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."ReasonEnd"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String ReasonEnd
{
get { return (System.String)GetValue((int)TblExaminationInfoFieldIndex.ReasonEnd, true); }
set { SetValue((int)TblExaminationInfoFieldIndex.ReasonEnd, value); }
}
/// <summary> The ReExamDate property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."ReExamDate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> ReExamDate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblExaminationInfoFieldIndex.ReExamDate, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.ReExamDate, value); }
}
/// <summary> The ReTreatment property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."ReTreatment"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> ReTreatment
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.ReTreatment, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.ReTreatment, value); }
}
/// <summary> The Status property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."Status"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Status
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.Status, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Status, value); }
}
/// <summary> The TbScreen property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."TbScreen"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> TbScreen
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.TbScreen, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.TbScreen, value); }
}
/// <summary> The TbScreenResult property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."tbScreenResult"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String TbScreenResult
{
get { return (System.String)GetValue((int)TblExaminationInfoFieldIndex.TbScreenResult, true); }
set { SetValue((int)TblExaminationInfoFieldIndex.TbScreenResult, value); }
}
/// <summary> The TreatmentFollow property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."TreatmentFollow"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> TreatmentFollow
{
get { return (Nullable<System.Int16>)GetValue((int)TblExaminationInfoFieldIndex.TreatmentFollow, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.TreatmentFollow, value); }
}
/// <summary> The UniqueKey property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."UniqueKey"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String UniqueKey
{
get { return (System.String)GetValue((int)TblExaminationInfoFieldIndex.UniqueKey, true); }
set { SetValue((int)TblExaminationInfoFieldIndex.UniqueKey, value); }
}
/// <summary> The Weight property of the Entity TblExaminationInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblExaminationInfo"."Weight"<br/>
/// Table field type characteristics (type, precision, scale, length): Double, 15, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Double> Weight
{
get { return (Nullable<System.Double>)GetValue((int)TblExaminationInfoFieldIndex.Weight, false); }
set { SetValue((int)TblExaminationInfoFieldIndex.Weight, value); }
}
/// <summary> 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..<br/><br/></summary>
[Browsable(false)]
public virtual TblPatientEntity TblPatient
{
get { return _tblPatient; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblPatient(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblExaminationInfos", "TblPatient", _tblPatient, true);
}
}
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblExaminationInfoEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,685 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblPreClinicsInfo'.<br/><br/></summary>
[Serializable]
public partial class TblPreClinicsInfoEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private TblPatientEntity _tblPatient;
private TblTestEntity _tblTest;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblPatient</summary>
public static readonly string TblPatient = "TblPatient";
/// <summary>Member name TblTest</summary>
public static readonly string TblTest = "TblTest";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblPreClinicsInfoEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblPreClinicsInfoEntity():base("TblPreClinicsInfoEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblPreClinicsInfoEntity(IEntityFields2 fields):base("TblPreClinicsInfoEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblPreClinicsInfoEntity</param>
public TblPreClinicsInfoEntity(IValidator validator):base("TblPreClinicsInfoEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblPreClinicsInfo which data should be fetched into this TblPreClinicsInfo object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblPreClinicsInfoEntity(System.String uniqueKey):base("TblPreClinicsInfoEntity")
{
InitClassEmpty(null, null);
this.UniqueKey = uniqueKey;
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblPreClinicsInfo which data should be fetched into this TblPreClinicsInfo object</param>
/// <param name="validator">The custom validator object for this TblPreClinicsInfoEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblPreClinicsInfoEntity(System.String uniqueKey, IValidator validator):base("TblPreClinicsInfoEntity")
{
InitClassEmpty(validator, null);
this.UniqueKey = uniqueKey;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblPreClinicsInfoEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblPatient = (TblPatientEntity)info.GetValue("_tblPatient", typeof(TblPatientEntity));
if(_tblPatient!=null)
{
_tblPatient.AfterSave+=new EventHandler(OnEntityAfterSave);
}
_tblTest = (TblTestEntity)info.GetValue("_tblTest", typeof(TblTestEntity));
if(_tblTest!=null)
{
_tblTest.AfterSave+=new EventHandler(OnEntityAfterSave);
}
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>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.</summary>
/// <param name="fieldIndex">The fieldindex.</param>
protected override void PerformDesyncSetupFKFieldChange(int fieldIndex)
{
switch((TblPreClinicsInfoFieldIndex)fieldIndex)
{
case TblPreClinicsInfoFieldIndex.PatientId:
DesetupSyncTblPatient(true, false);
break;
case TblPreClinicsInfoFieldIndex.Testid:
DesetupSyncTblTest(true, false);
break;
default:
base.PerformDesyncSetupFKFieldChange(fieldIndex);
break;
}
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblPatient":
this.TblPatient = (TblPatientEntity)entity;
break;
case "TblTest":
this.TblTest = (TblTestEntity)entity;
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblPatient":
toReturn.Add(Relations.TblPatientEntityUsingPatientId);
break;
case "TblTest":
toReturn.Add(Relations.TblTestEntityUsingTestid);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblPatient":
SetupSyncTblPatient(relatedEntity);
break;
case "TblTest":
SetupSyncTblTest(relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblPatient":
DesetupSyncTblPatient(false, true);
break;
case "TblTest":
DesetupSyncTblTest(false, true);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
if(_tblPatient!=null)
{
toReturn.Add(_tblPatient);
}
if(_tblTest!=null)
{
toReturn.Add(_tblTest);
}
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblPatient", (!this.MarkedForDeletion?_tblPatient:null));
info.AddValue("_tblTest", (!this.MarkedForDeletion?_tblTest:null));
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblPreClinicsInfoRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblPatient' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblPatient()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblPatientFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblTest' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblTest()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblTestFields.Testid, null, ComparisonOperator.Equal, this.Testid));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblPreClinicsInfoEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblPatient", _tblPatient);
toReturn.Add("TblTest", _tblTest);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("PatientId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("QualityResult", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("QuantityResult", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Status", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("TestDate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Testid", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("UniqueKey", fieldHashtable);
}
#endregion
/// <summary> Removes the sync logic for member _tblPatient</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblPatient(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblPreClinicsInfoRelations.TblPatientEntityUsingPatientIdStatic, true, signalRelatedEntity, "TblPreClinicsInfos", resetFKFields, new int[] { (int)TblPreClinicsInfoFieldIndex.PatientId } );
_tblPatient = null;
}
/// <summary> setups the sync logic for member _tblPatient</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblPatient(IEntityCore relatedEntity)
{
if(_tblPatient!=relatedEntity)
{
DesetupSyncTblPatient(true, true);
_tblPatient = (TblPatientEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblPreClinicsInfoRelations.TblPatientEntityUsingPatientIdStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblPatientPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Removes the sync logic for member _tblTest</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblTest(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblTest, new PropertyChangedEventHandler( OnTblTestPropertyChanged ), "TblTest", Datalib.RelationClasses.StaticTblPreClinicsInfoRelations.TblTestEntityUsingTestidStatic, true, signalRelatedEntity, "TblPreClinicsInfos", resetFKFields, new int[] { (int)TblPreClinicsInfoFieldIndex.Testid } );
_tblTest = null;
}
/// <summary> setups the sync logic for member _tblTest</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblTest(IEntityCore relatedEntity)
{
if(_tblTest!=relatedEntity)
{
DesetupSyncTblTest(true, true);
_tblTest = (TblTestEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblTest, new PropertyChangedEventHandler( OnTblTestPropertyChanged ), "TblTest", Datalib.RelationClasses.StaticTblPreClinicsInfoRelations.TblTestEntityUsingTestidStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblTestPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblPreClinicsInfoEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblPreClinicsInfoRelations Relations
{
get { return new TblPreClinicsInfoRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblPatient' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblPatient
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblPatientEntityFactory))), (IEntityRelation)GetRelationsForField("TblPatient")[0], (int)Datalib.EntityType.TblPreClinicsInfoEntity, (int)Datalib.EntityType.TblPatientEntity, 0, null, null, null, null, "TblPatient", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblTest' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblTest
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblTestEntityFactory))), (IEntityRelation)GetRelationsForField("TblTest")[0], (int)Datalib.EntityType.TblPreClinicsInfoEntity, (int)Datalib.EntityType.TblTestEntity, 0, null, null, null, null, "TblTest", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The PatientId property of the Entity TblPreClinicsInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblPreClinicsInfo"."PatientID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 15<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.String PatientId
{
get { return (System.String)GetValue((int)TblPreClinicsInfoFieldIndex.PatientId, true); }
set { SetValue((int)TblPreClinicsInfoFieldIndex.PatientId, value); }
}
/// <summary> The QualityResult property of the Entity TblPreClinicsInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblPreClinicsInfo"."QualityResult"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> QualityResult
{
get { return (Nullable<System.Int16>)GetValue((int)TblPreClinicsInfoFieldIndex.QualityResult, false); }
set { SetValue((int)TblPreClinicsInfoFieldIndex.QualityResult, value); }
}
/// <summary> The QuantityResult property of the Entity TblPreClinicsInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblPreClinicsInfo"."QuantityResult"<br/>
/// Table field type characteristics (type, precision, scale, length): Double, 15, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Double> QuantityResult
{
get { return (Nullable<System.Double>)GetValue((int)TblPreClinicsInfoFieldIndex.QuantityResult, false); }
set { SetValue((int)TblPreClinicsInfoFieldIndex.QuantityResult, value); }
}
/// <summary> The Status property of the Entity TblPreClinicsInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblPreClinicsInfo"."Status"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Status
{
get { return (Nullable<System.Int16>)GetValue((int)TblPreClinicsInfoFieldIndex.Status, false); }
set { SetValue((int)TblPreClinicsInfoFieldIndex.Status, value); }
}
/// <summary> The TestDate property of the Entity TblPreClinicsInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblPreClinicsInfo"."TestDate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> TestDate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblPreClinicsInfoFieldIndex.TestDate, false); }
set { SetValue((int)TblPreClinicsInfoFieldIndex.TestDate, value); }
}
/// <summary> The Testid property of the Entity TblPreClinicsInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblPreClinicsInfo"."Testid"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.String Testid
{
get { return (System.String)GetValue((int)TblPreClinicsInfoFieldIndex.Testid, true); }
set { SetValue((int)TblPreClinicsInfoFieldIndex.Testid, value); }
}
/// <summary> The UniqueKey property of the Entity TblPreClinicsInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblPreClinicsInfo"."UniqueKey"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String UniqueKey
{
get { return (System.String)GetValue((int)TblPreClinicsInfoFieldIndex.UniqueKey, true); }
set { SetValue((int)TblPreClinicsInfoFieldIndex.UniqueKey, value); }
}
/// <summary> 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..<br/><br/></summary>
[Browsable(false)]
public virtual TblPatientEntity TblPatient
{
get { return _tblPatient; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblPatient(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblPreClinicsInfos", "TblPatient", _tblPatient, true);
}
}
}
/// <summary> Gets / sets related entity of type 'TblTestEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
[Browsable(false)]
public virtual TblTestEntity TblTest
{
get { return _tblTest; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblTest(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblPreClinicsInfos", "TblTest", _tblTest, true);
}
}
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblPreClinicsInfoEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,611 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblPregnanceInfo'.<br/><br/></summary>
[Serializable]
public partial class TblPregnanceInfoEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private EntityCollection<TblChildEntity> _tblChildren;
private TblPatientEntity _tblPatient;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblPatient</summary>
public static readonly string TblPatient = "TblPatient";
/// <summary>Member name TblChildren</summary>
public static readonly string TblChildren = "TblChildren";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblPregnanceInfoEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblPregnanceInfoEntity():base("TblPregnanceInfoEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblPregnanceInfoEntity(IEntityFields2 fields):base("TblPregnanceInfoEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblPregnanceInfoEntity</param>
public TblPregnanceInfoEntity(IValidator validator):base("TblPregnanceInfoEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblPregnanceInfo which data should be fetched into this TblPregnanceInfo object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblPregnanceInfoEntity(System.String uniqueKey):base("TblPregnanceInfoEntity")
{
InitClassEmpty(null, null);
this.UniqueKey = uniqueKey;
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblPregnanceInfo which data should be fetched into this TblPregnanceInfo object</param>
/// <param name="validator">The custom validator object for this TblPregnanceInfoEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblPregnanceInfoEntity(System.String uniqueKey, IValidator validator):base("TblPregnanceInfoEntity")
{
InitClassEmpty(validator, null);
this.UniqueKey = uniqueKey;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblPregnanceInfoEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblChildren = (EntityCollection<TblChildEntity>)info.GetValue("_tblChildren", typeof(EntityCollection<TblChildEntity>));
_tblPatient = (TblPatientEntity)info.GetValue("_tblPatient", typeof(TblPatientEntity));
if(_tblPatient!=null)
{
_tblPatient.AfterSave+=new EventHandler(OnEntityAfterSave);
}
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>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.</summary>
/// <param name="fieldIndex">The fieldindex.</param>
protected override void PerformDesyncSetupFKFieldChange(int fieldIndex)
{
switch((TblPregnanceInfoFieldIndex)fieldIndex)
{
case TblPregnanceInfoFieldIndex.PatientId:
DesetupSyncTblPatient(true, false);
break;
default:
base.PerformDesyncSetupFKFieldChange(fieldIndex);
break;
}
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblPatient":
this.TblPatient = (TblPatientEntity)entity;
break;
case "TblChildren":
this.TblChildren.Add((TblChildEntity)entity);
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblPatient":
toReturn.Add(Relations.TblPatientEntityUsingPatientId);
break;
case "TblChildren":
toReturn.Add(Relations.TblChildEntityUsingPreganceId);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblPatient":
SetupSyncTblPatient(relatedEntity);
break;
case "TblChildren":
this.TblChildren.Add((TblChildEntity)relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblPatient":
DesetupSyncTblPatient(false, true);
break;
case "TblChildren":
this.PerformRelatedEntityRemoval(this.TblChildren, relatedEntity, signalRelatedEntityManyToOne);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
if(_tblPatient!=null)
{
toReturn.Add(_tblPatient);
}
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
toReturn.Add(this.TblChildren);
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblChildren", ((_tblChildren!=null) && (_tblChildren.Count>0) && !this.MarkedForDeletion)?_tblChildren:null);
info.AddValue("_tblPatient", (!this.MarkedForDeletion?_tblPatient:null));
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblPregnanceInfoRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblChild' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblChildren()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblChildFields.PreganceId, null, ComparisonOperator.Equal, this.UniqueKey));
return bucket;
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblPatient' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblPatient()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblPatientFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblPregnanceInfoEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
collectionsQueue.Enqueue(this._tblChildren);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
this._tblChildren = (EntityCollection<TblChildEntity>) collectionsQueue.Dequeue();
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
toReturn |=(this._tblChildren != null);
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection<TblChildEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblChildEntityFactory))) : null);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblPatient", _tblPatient);
toReturn.Add("TblChildren", _tblChildren);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("EstimatedDelivery", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Note", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("PatientId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("PregnanceDate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("UniqueKey", fieldHashtable);
}
#endregion
/// <summary> Removes the sync logic for member _tblPatient</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblPatient(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblPregnanceInfoRelations.TblPatientEntityUsingPatientIdStatic, true, signalRelatedEntity, "TblPregnanceInfos", resetFKFields, new int[] { (int)TblPregnanceInfoFieldIndex.PatientId } );
_tblPatient = null;
}
/// <summary> setups the sync logic for member _tblPatient</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblPatient(IEntityCore relatedEntity)
{
if(_tblPatient!=relatedEntity)
{
DesetupSyncTblPatient(true, true);
_tblPatient = (TblPatientEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblPregnanceInfoRelations.TblPatientEntityUsingPatientIdStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblPatientPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblPregnanceInfoEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblPregnanceInfoRelations Relations
{
get { return new TblPregnanceInfoRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblChild' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblChildren
{
get { return new PrefetchPathElement2( new EntityCollection<TblChildEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblChildEntityFactory))), (IEntityRelation)GetRelationsForField("TblChildren")[0], (int)Datalib.EntityType.TblPregnanceInfoEntity, (int)Datalib.EntityType.TblChildEntity, 0, null, null, null, null, "TblChildren", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblPatient' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblPatient
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblPatientEntityFactory))), (IEntityRelation)GetRelationsForField("TblPatient")[0], (int)Datalib.EntityType.TblPregnanceInfoEntity, (int)Datalib.EntityType.TblPatientEntity, 0, null, null, null, null, "TblPatient", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The EstimatedDelivery property of the Entity TblPregnanceInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblPregnanceInfo"."EstimatedDelivery"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> EstimatedDelivery
{
get { return (Nullable<System.DateTime>)GetValue((int)TblPregnanceInfoFieldIndex.EstimatedDelivery, false); }
set { SetValue((int)TblPregnanceInfoFieldIndex.EstimatedDelivery, value); }
}
/// <summary> The Note property of the Entity TblPregnanceInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblPregnanceInfo"."Note"<br/>
/// Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 536870911<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Note
{
get { return (System.String)GetValue((int)TblPregnanceInfoFieldIndex.Note, true); }
set { SetValue((int)TblPregnanceInfoFieldIndex.Note, value); }
}
/// <summary> The PatientId property of the Entity TblPregnanceInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblPregnanceInfo"."PatientID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 15<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String PatientId
{
get { return (System.String)GetValue((int)TblPregnanceInfoFieldIndex.PatientId, true); }
set { SetValue((int)TblPregnanceInfoFieldIndex.PatientId, value); }
}
/// <summary> The PregnanceDate property of the Entity TblPregnanceInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblPregnanceInfo"."PregnanceDate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> PregnanceDate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblPregnanceInfoFieldIndex.PregnanceDate, false); }
set { SetValue((int)TblPregnanceInfoFieldIndex.PregnanceDate, value); }
}
/// <summary> The UniqueKey property of the Entity TblPregnanceInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblPregnanceInfo"."UniqueKey"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String UniqueKey
{
get { return (System.String)GetValue((int)TblPregnanceInfoFieldIndex.UniqueKey, true); }
set { SetValue((int)TblPregnanceInfoFieldIndex.UniqueKey, value); }
}
/// <summary> Gets the EntityCollection with the related entities of type 'TblChildEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblChildEntity))]
public virtual EntityCollection<TblChildEntity> TblChildren
{
get { return GetOrCreateEntityCollection<TblChildEntity, TblChildEntityFactory>("TblPregnanceInfo", true, false, ref _tblChildren); }
}
/// <summary> 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..<br/><br/></summary>
[Browsable(false)]
public virtual TblPatientEntity TblPatient
{
get { return _tblPatient; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblPatient(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblPregnanceInfos", "TblPatient", _tblPatient, true);
}
}
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblPregnanceInfoEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,467 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblProvince'.<br/><br/></summary>
[Serializable]
public partial class TblProvinceEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private EntityCollection<TblDistrictEntity> _tblDistricts;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblDistricts</summary>
public static readonly string TblDistricts = "TblDistricts";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblProvinceEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblProvinceEntity():base("TblProvinceEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblProvinceEntity(IEntityFields2 fields):base("TblProvinceEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblProvinceEntity</param>
public TblProvinceEntity(IValidator validator):base("TblProvinceEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="provinceid">PK value for TblProvince which data should be fetched into this TblProvince object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblProvinceEntity(System.String provinceid):base("TblProvinceEntity")
{
InitClassEmpty(null, null);
this.Provinceid = provinceid;
}
/// <summary> CTor</summary>
/// <param name="provinceid">PK value for TblProvince which data should be fetched into this TblProvince object</param>
/// <param name="validator">The custom validator object for this TblProvinceEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblProvinceEntity(System.String provinceid, IValidator validator):base("TblProvinceEntity")
{
InitClassEmpty(validator, null);
this.Provinceid = provinceid;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblProvinceEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblDistricts = (EntityCollection<TblDistrictEntity>)info.GetValue("_tblDistricts", typeof(EntityCollection<TblDistrictEntity>));
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblDistricts":
this.TblDistricts.Add((TblDistrictEntity)entity);
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblDistricts":
toReturn.Add(Relations.TblDistrictEntityUsingProvinceid);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblDistricts":
this.TblDistricts.Add((TblDistrictEntity)relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblDistricts":
this.PerformRelatedEntityRemoval(this.TblDistricts, relatedEntity, signalRelatedEntityManyToOne);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
toReturn.Add(this.TblDistricts);
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblDistricts", ((_tblDistricts!=null) && (_tblDistricts.Count>0) && !this.MarkedForDeletion)?_tblDistricts:null);
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblProvinceRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblDistrict' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblDistricts()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblDistrictFields.Provinceid, null, ComparisonOperator.Equal, this.Provinceid));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblProvinceEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
collectionsQueue.Enqueue(this._tblDistricts);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
this._tblDistricts = (EntityCollection<TblDistrictEntity>) collectionsQueue.Dequeue();
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
toReturn |=(this._tblDistricts != null);
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection<TblDistrictEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblDistrictEntityFactory))) : null);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblDistricts", _tblDistricts);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Provinceid", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Provincename", fieldHashtable);
}
#endregion
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblProvinceEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblProvinceRelations Relations
{
get { return new TblProvinceRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblDistrict' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblDistricts
{
get { return new PrefetchPathElement2( new EntityCollection<TblDistrictEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblDistrictEntityFactory))), (IEntityRelation)GetRelationsForField("TblDistricts")[0], (int)Datalib.EntityType.TblProvinceEntity, (int)Datalib.EntityType.TblDistrictEntity, 0, null, null, null, null, "TblDistricts", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The Provinceid property of the Entity TblProvince<br/><br/></summary>
/// <remarks>Mapped on table field: "tblProvinces"."provinceid"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 3<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String Provinceid
{
get { return (System.String)GetValue((int)TblProvinceFieldIndex.Provinceid, true); }
set { SetValue((int)TblProvinceFieldIndex.Provinceid, value); }
}
/// <summary> The Provincename property of the Entity TblProvince<br/><br/></summary>
/// <remarks>Mapped on table field: "tblProvinces"."provincename"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 30<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Provincename
{
get { return (System.String)GetValue((int)TblProvinceFieldIndex.Provincename, true); }
set { SetValue((int)TblProvinceFieldIndex.Provincename, value); }
}
/// <summary> Gets the EntityCollection with the related entities of type 'TblDistrictEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblDistrictEntity))]
public virtual EntityCollection<TblDistrictEntity> TblDistricts
{
get { return GetOrCreateEntityCollection<TblDistrictEntity, TblDistrictEntityFactory>("TblProvince", true, false, ref _tblDistricts); }
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblProvinceEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,817 @@
///////////////////////////////////////////////////////////////
// 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
/// <summary>Entity class which represents the entity 'TblReferral'.<br/><br/></summary>
[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<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblAgency</summary>
public static readonly string TblAgency = "TblAgency";
/// <summary>Member name TblPatient</summary>
public static readonly string TblPatient = "TblPatient";
/// <summary>Member name TblService</summary>
public static readonly string TblService = "TblService";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblReferralEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblReferralEntity():base("TblReferralEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblReferralEntity(IEntityFields2 fields):base("TblReferralEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblReferralEntity</param>
public TblReferralEntity(IValidator validator):base("TblReferralEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblReferral which data should be fetched into this TblReferral object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblReferralEntity(System.String uniqueKey):base("TblReferralEntity")
{
InitClassEmpty(null, null);
this.UniqueKey = uniqueKey;
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblReferral which data should be fetched into this TblReferral object</param>
/// <param name="validator">The custom validator object for this TblReferralEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblReferralEntity(System.String uniqueKey, IValidator validator):base("TblReferralEntity")
{
InitClassEmpty(validator, null);
this.UniqueKey = uniqueKey;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[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
}
/// <summary>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.</summary>
/// <param name="fieldIndex">The fieldindex.</param>
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;
}
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
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;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
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
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
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;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
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;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
if(_tblAgency!=null)
{
toReturn.Add(_tblAgency);
}
if(_tblPatient!=null)
{
toReturn.Add(_tblPatient);
}
if(_tblService!=null)
{
toReturn.Add(_tblService);
}
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[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);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblReferralRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblAgency' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblAgency()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblAgencyFields.AgencyTypeId, null, ComparisonOperator.Equal, this.AgencyTypeId));
return bucket;
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblPatient' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblPatient()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblPatientFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblService' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblService()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblServiceFields.ServiceId, null, ComparisonOperator.Equal, this.ServiceId));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblReferralEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblAgency", _tblAgency);
toReturn.Add("TblPatient", _tblPatient);
toReturn.Add("TblService", _tblService);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("AgencyTypeId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Note", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("PatientId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ProvinceId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ReceiveServiceDate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ReferralAgency", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ReferralDate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ServiceId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Status", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("UniqueKey", fieldHashtable);
}
#endregion
/// <summary> Removes the sync logic for member _tblAgency</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
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;
}
/// <summary> setups the sync logic for member _tblAgency</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
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[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblAgencyPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Removes the sync logic for member _tblPatient</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
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;
}
/// <summary> setups the sync logic for member _tblPatient</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
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[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblPatientPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Removes the sync logic for member _tblService</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
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;
}
/// <summary> setups the sync logic for member _tblService</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
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[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblServicePropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblReferralEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblReferralRelations Relations
{
get { return new TblReferralRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblAgency' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
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); }
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblPatient' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
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); }
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblService' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
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); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The AgencyTypeId property of the Entity TblReferral<br/><br/></summary>
/// <remarks>Mapped on table field: "TblReferral"."AgencyTypeId"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String AgencyTypeId
{
get { return (System.String)GetValue((int)TblReferralFieldIndex.AgencyTypeId, true); }
set { SetValue((int)TblReferralFieldIndex.AgencyTypeId, value); }
}
/// <summary> The Note property of the Entity TblReferral<br/><br/></summary>
/// <remarks>Mapped on table field: "TblReferral"."Note"<br/>
/// Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 2147483647<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Note
{
get { return (System.String)GetValue((int)TblReferralFieldIndex.Note, true); }
set { SetValue((int)TblReferralFieldIndex.Note, value); }
}
/// <summary> The PatientId property of the Entity TblReferral<br/><br/></summary>
/// <remarks>Mapped on table field: "TblReferral"."PatientId"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 15<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String PatientId
{
get { return (System.String)GetValue((int)TblReferralFieldIndex.PatientId, true); }
set { SetValue((int)TblReferralFieldIndex.PatientId, value); }
}
/// <summary> The ProvinceId property of the Entity TblReferral<br/><br/></summary>
/// <remarks>Mapped on table field: "TblReferral"."ProvinceId"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 3<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String ProvinceId
{
get { return (System.String)GetValue((int)TblReferralFieldIndex.ProvinceId, true); }
set { SetValue((int)TblReferralFieldIndex.ProvinceId, value); }
}
/// <summary> The ReceiveServiceDate property of the Entity TblReferral<br/><br/></summary>
/// <remarks>Mapped on table field: "TblReferral"."ReceiveServiceDate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> ReceiveServiceDate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblReferralFieldIndex.ReceiveServiceDate, false); }
set { SetValue((int)TblReferralFieldIndex.ReceiveServiceDate, value); }
}
/// <summary> The ReferralAgency property of the Entity TblReferral<br/><br/></summary>
/// <remarks>Mapped on table field: "TblReferral"."ReferralAgency"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String ReferralAgency
{
get { return (System.String)GetValue((int)TblReferralFieldIndex.ReferralAgency, true); }
set { SetValue((int)TblReferralFieldIndex.ReferralAgency, value); }
}
/// <summary> The ReferralDate property of the Entity TblReferral<br/><br/></summary>
/// <remarks>Mapped on table field: "TblReferral"."ReferralDate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> ReferralDate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblReferralFieldIndex.ReferralDate, false); }
set { SetValue((int)TblReferralFieldIndex.ReferralDate, value); }
}
/// <summary> The ServiceId property of the Entity TblReferral<br/><br/></summary>
/// <remarks>Mapped on table field: "TblReferral"."ServiceId"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String ServiceId
{
get { return (System.String)GetValue((int)TblReferralFieldIndex.ServiceId, true); }
set { SetValue((int)TblReferralFieldIndex.ServiceId, value); }
}
/// <summary> The Status property of the Entity TblReferral<br/><br/></summary>
/// <remarks>Mapped on table field: "TblReferral"."Status"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Status
{
get { return (Nullable<System.Int16>)GetValue((int)TblReferralFieldIndex.Status, false); }
set { SetValue((int)TblReferralFieldIndex.Status, value); }
}
/// <summary> The UniqueKey property of the Entity TblReferral<br/><br/></summary>
/// <remarks>Mapped on table field: "TblReferral"."UniqueKey"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String UniqueKey
{
get { return (System.String)GetValue((int)TblReferralFieldIndex.UniqueKey, true); }
set { SetValue((int)TblReferralFieldIndex.UniqueKey, value); }
}
/// <summary> 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..<br/><br/></summary>
[Browsable(false)]
public virtual TblAgencyEntity TblAgency
{
get { return _tblAgency; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblAgency(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblReferrals", "TblAgency", _tblAgency, true);
}
}
}
/// <summary> 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..<br/><br/></summary>
[Browsable(false)]
public virtual TblPatientEntity TblPatient
{
get { return _tblPatient; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblPatient(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblReferrals", "TblPatient", _tblPatient, true);
}
}
}
/// <summary> 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..<br/><br/></summary>
[Browsable(false)]
public virtual TblServiceEntity TblService
{
get { return _tblService; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblService(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblReferrals", "TblService", _tblService, true);
}
}
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[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
}
}

View File

@@ -0,0 +1,479 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblReferralFromPlace'.<br/><br/></summary>
[Serializable]
public partial class TblReferralFromPlaceEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private EntityCollection<TblPatientEntity> _tblPatients;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblPatients</summary>
public static readonly string TblPatients = "TblPatients";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblReferralFromPlaceEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblReferralFromPlaceEntity():base("TblReferralFromPlaceEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblReferralFromPlaceEntity(IEntityFields2 fields):base("TblReferralFromPlaceEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblReferralFromPlaceEntity</param>
public TblReferralFromPlaceEntity(IValidator validator):base("TblReferralFromPlaceEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="referralId">PK value for TblReferralFromPlace which data should be fetched into this TblReferralFromPlace object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblReferralFromPlaceEntity(System.String referralId):base("TblReferralFromPlaceEntity")
{
InitClassEmpty(null, null);
this.ReferralId = referralId;
}
/// <summary> CTor</summary>
/// <param name="referralId">PK value for TblReferralFromPlace which data should be fetched into this TblReferralFromPlace object</param>
/// <param name="validator">The custom validator object for this TblReferralFromPlaceEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblReferralFromPlaceEntity(System.String referralId, IValidator validator):base("TblReferralFromPlaceEntity")
{
InitClassEmpty(validator, null);
this.ReferralId = referralId;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblReferralFromPlaceEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblPatients = (EntityCollection<TblPatientEntity>)info.GetValue("_tblPatients", typeof(EntityCollection<TblPatientEntity>));
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblPatients":
this.TblPatients.Add((TblPatientEntity)entity);
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblPatients":
toReturn.Add(Relations.TblPatientEntityUsingReferralId);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblPatients":
this.TblPatients.Add((TblPatientEntity)relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblPatients":
this.PerformRelatedEntityRemoval(this.TblPatients, relatedEntity, signalRelatedEntityManyToOne);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
toReturn.Add(this.TblPatients);
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblPatients", ((_tblPatients!=null) && (_tblPatients.Count>0) && !this.MarkedForDeletion)?_tblPatients:null);
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblReferralFromPlaceRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblPatient' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblPatients()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblPatientFields.ReferralId, null, ComparisonOperator.Equal, this.ReferralId));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblReferralFromPlaceEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
collectionsQueue.Enqueue(this._tblPatients);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
this._tblPatients = (EntityCollection<TblPatientEntity>) collectionsQueue.Dequeue();
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
toReturn |=(this._tblPatients != null);
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection<TblPatientEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblPatientEntityFactory))) : null);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblPatients", _tblPatients);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("EReferralName", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ReferralId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("VReferralName", fieldHashtable);
}
#endregion
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblReferralFromPlaceEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblReferralFromPlaceRelations Relations
{
get { return new TblReferralFromPlaceRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblPatient' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblPatients
{
get { return new PrefetchPathElement2( new EntityCollection<TblPatientEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblPatientEntityFactory))), (IEntityRelation)GetRelationsForField("TblPatients")[0], (int)Datalib.EntityType.TblReferralFromPlaceEntity, (int)Datalib.EntityType.TblPatientEntity, 0, null, null, null, null, "TblPatients", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The EReferralName property of the Entity TblReferralFromPlace<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferralFromPlaces"."eReferralName"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String EReferralName
{
get { return (System.String)GetValue((int)TblReferralFromPlaceFieldIndex.EReferralName, true); }
set { SetValue((int)TblReferralFromPlaceFieldIndex.EReferralName, value); }
}
/// <summary> The ReferralId property of the Entity TblReferralFromPlace<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferralFromPlaces"."ReferralID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String ReferralId
{
get { return (System.String)GetValue((int)TblReferralFromPlaceFieldIndex.ReferralId, true); }
set { SetValue((int)TblReferralFromPlaceFieldIndex.ReferralId, value); }
}
/// <summary> The VReferralName property of the Entity TblReferralFromPlace<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferralFromPlaces"."vReferralName"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String VReferralName
{
get { return (System.String)GetValue((int)TblReferralFromPlaceFieldIndex.VReferralName, true); }
set { SetValue((int)TblReferralFromPlaceFieldIndex.VReferralName, value); }
}
/// <summary> Gets the EntityCollection with the related entities of type 'TblPatientEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblPatientEntity))]
public virtual EntityCollection<TblPatientEntity> TblPatients
{
get { return GetOrCreateEntityCollection<TblPatientEntity, TblPatientEntityFactory>("TblReferralFromPlace", true, false, ref _tblPatients); }
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblReferralFromPlaceEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,637 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblReferralsTo'.<br/><br/></summary>
[Serializable]
public partial class TblReferralsToEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private TblPatientEntity _tblPatient;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblPatient</summary>
public static readonly string TblPatient = "TblPatient";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblReferralsToEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblReferralsToEntity():base("TblReferralsToEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblReferralsToEntity(IEntityFields2 fields):base("TblReferralsToEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblReferralsToEntity</param>
public TblReferralsToEntity(IValidator validator):base("TblReferralsToEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblReferralsTo which data should be fetched into this TblReferralsTo object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblReferralsToEntity(System.String uniqueKey):base("TblReferralsToEntity")
{
InitClassEmpty(null, null);
this.UniqueKey = uniqueKey;
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblReferralsTo which data should be fetched into this TblReferralsTo object</param>
/// <param name="validator">The custom validator object for this TblReferralsToEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblReferralsToEntity(System.String uniqueKey, IValidator validator):base("TblReferralsToEntity")
{
InitClassEmpty(validator, null);
this.UniqueKey = uniqueKey;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblReferralsToEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblPatient = (TblPatientEntity)info.GetValue("_tblPatient", typeof(TblPatientEntity));
if(_tblPatient!=null)
{
_tblPatient.AfterSave+=new EventHandler(OnEntityAfterSave);
}
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>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.</summary>
/// <param name="fieldIndex">The fieldindex.</param>
protected override void PerformDesyncSetupFKFieldChange(int fieldIndex)
{
switch((TblReferralsToFieldIndex)fieldIndex)
{
case TblReferralsToFieldIndex.PatientId:
DesetupSyncTblPatient(true, false);
break;
default:
base.PerformDesyncSetupFKFieldChange(fieldIndex);
break;
}
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblPatient":
this.TblPatient = (TblPatientEntity)entity;
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblPatient":
toReturn.Add(Relations.TblPatientEntityUsingPatientId);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblPatient":
SetupSyncTblPatient(relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblPatient":
DesetupSyncTblPatient(false, true);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
if(_tblPatient!=null)
{
toReturn.Add(_tblPatient);
}
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblPatient", (!this.MarkedForDeletion?_tblPatient:null));
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblReferralsToRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblPatient' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblPatient()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblPatientFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblReferralsToEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblPatient", _tblPatient);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("AgencyTypeId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("DeathReasonId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("EndDate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Note", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("PatientId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ProvinceId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ReceiveServiceDate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ReferralAgency", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Status", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("TypeId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("UniqueKey", fieldHashtable);
}
#endregion
/// <summary> Removes the sync logic for member _tblPatient</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblPatient(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblReferralsToRelations.TblPatientEntityUsingPatientIdStatic, true, signalRelatedEntity, "TblReferralsTos", resetFKFields, new int[] { (int)TblReferralsToFieldIndex.PatientId } );
_tblPatient = null;
}
/// <summary> setups the sync logic for member _tblPatient</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblPatient(IEntityCore relatedEntity)
{
if(_tblPatient!=relatedEntity)
{
DesetupSyncTblPatient(true, true);
_tblPatient = (TblPatientEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblReferralsToRelations.TblPatientEntityUsingPatientIdStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblPatientPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblReferralsToEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblReferralsToRelations Relations
{
get { return new TblReferralsToRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblPatient' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblPatient
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblPatientEntityFactory))), (IEntityRelation)GetRelationsForField("TblPatient")[0], (int)Datalib.EntityType.TblReferralsToEntity, (int)Datalib.EntityType.TblPatientEntity, 0, null, null, null, null, "TblPatient", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The AgencyTypeId property of the Entity TblReferralsTo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferralsTo"."AgencyTypeID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String AgencyTypeId
{
get { return (System.String)GetValue((int)TblReferralsToFieldIndex.AgencyTypeId, true); }
set { SetValue((int)TblReferralsToFieldIndex.AgencyTypeId, value); }
}
/// <summary> The DeathReasonId property of the Entity TblReferralsTo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferralsTo"."DeathReasonID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String DeathReasonId
{
get { return (System.String)GetValue((int)TblReferralsToFieldIndex.DeathReasonId, true); }
set { SetValue((int)TblReferralsToFieldIndex.DeathReasonId, value); }
}
/// <summary> The EndDate property of the Entity TblReferralsTo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferralsTo"."EndDate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> EndDate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblReferralsToFieldIndex.EndDate, false); }
set { SetValue((int)TblReferralsToFieldIndex.EndDate, value); }
}
/// <summary> The Note property of the Entity TblReferralsTo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferralsTo"."Note"<br/>
/// Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 536870911<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Note
{
get { return (System.String)GetValue((int)TblReferralsToFieldIndex.Note, true); }
set { SetValue((int)TblReferralsToFieldIndex.Note, value); }
}
/// <summary> The PatientId property of the Entity TblReferralsTo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferralsTo"."PatientID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 15<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String PatientId
{
get { return (System.String)GetValue((int)TblReferralsToFieldIndex.PatientId, true); }
set { SetValue((int)TblReferralsToFieldIndex.PatientId, value); }
}
/// <summary> The ProvinceId property of the Entity TblReferralsTo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferralsTo"."ProvinceID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 3<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String ProvinceId
{
get { return (System.String)GetValue((int)TblReferralsToFieldIndex.ProvinceId, true); }
set { SetValue((int)TblReferralsToFieldIndex.ProvinceId, value); }
}
/// <summary> The ReceiveServiceDate property of the Entity TblReferralsTo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferralsTo"."ReceiveServiceDate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> ReceiveServiceDate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblReferralsToFieldIndex.ReceiveServiceDate, false); }
set { SetValue((int)TblReferralsToFieldIndex.ReceiveServiceDate, value); }
}
/// <summary> The ReferralAgency property of the Entity TblReferralsTo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferralsTo"."ReferralAgency"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String ReferralAgency
{
get { return (System.String)GetValue((int)TblReferralsToFieldIndex.ReferralAgency, true); }
set { SetValue((int)TblReferralsToFieldIndex.ReferralAgency, value); }
}
/// <summary> The Status property of the Entity TblReferralsTo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferralsTo"."Status"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Status
{
get { return (Nullable<System.Int16>)GetValue((int)TblReferralsToFieldIndex.Status, false); }
set { SetValue((int)TblReferralsToFieldIndex.Status, value); }
}
/// <summary> The TypeId property of the Entity TblReferralsTo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferralsTo"."TypeID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String TypeId
{
get { return (System.String)GetValue((int)TblReferralsToFieldIndex.TypeId, true); }
set { SetValue((int)TblReferralsToFieldIndex.TypeId, value); }
}
/// <summary> The UniqueKey property of the Entity TblReferralsTo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferralsTo"."UniqueKey"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String UniqueKey
{
get { return (System.String)GetValue((int)TblReferralsToFieldIndex.UniqueKey, true); }
set { SetValue((int)TblReferralsToFieldIndex.UniqueKey, value); }
}
/// <summary> 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..<br/><br/></summary>
[Browsable(false)]
public virtual TblPatientEntity TblPatient
{
get { return _tblPatient; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblPatient(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblReferralsTos", "TblPatient", _tblPatient, true);
}
}
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblReferralsToEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,709 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblReferraltoService'.<br/><br/></summary>
[Serializable]
public partial class TblReferraltoServiceEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private TblAgencyEntity _tblAgency;
private TblPatientEntity _tblPatient;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblAgency</summary>
public static readonly string TblAgency = "TblAgency";
/// <summary>Member name TblPatient</summary>
public static readonly string TblPatient = "TblPatient";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblReferraltoServiceEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblReferraltoServiceEntity():base("TblReferraltoServiceEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblReferraltoServiceEntity(IEntityFields2 fields):base("TblReferraltoServiceEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblReferraltoServiceEntity</param>
public TblReferraltoServiceEntity(IValidator validator):base("TblReferraltoServiceEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblReferraltoService which data should be fetched into this TblReferraltoService object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblReferraltoServiceEntity(System.String uniqueKey):base("TblReferraltoServiceEntity")
{
InitClassEmpty(null, null);
this.UniqueKey = uniqueKey;
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblReferraltoService which data should be fetched into this TblReferraltoService object</param>
/// <param name="validator">The custom validator object for this TblReferraltoServiceEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblReferraltoServiceEntity(System.String uniqueKey, IValidator validator):base("TblReferraltoServiceEntity")
{
InitClassEmpty(validator, null);
this.UniqueKey = uniqueKey;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblReferraltoServiceEntity(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);
}
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>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.</summary>
/// <param name="fieldIndex">The fieldindex.</param>
protected override void PerformDesyncSetupFKFieldChange(int fieldIndex)
{
switch((TblReferraltoServiceFieldIndex)fieldIndex)
{
case TblReferraltoServiceFieldIndex.AgencyTypeId:
DesetupSyncTblAgency(true, false);
break;
case TblReferraltoServiceFieldIndex.PatientId:
DesetupSyncTblPatient(true, false);
break;
default:
base.PerformDesyncSetupFKFieldChange(fieldIndex);
break;
}
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblAgency":
this.TblAgency = (TblAgencyEntity)entity;
break;
case "TblPatient":
this.TblPatient = (TblPatientEntity)entity;
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
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;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblAgency":
SetupSyncTblAgency(relatedEntity);
break;
case "TblPatient":
SetupSyncTblPatient(relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblAgency":
DesetupSyncTblAgency(false, true);
break;
case "TblPatient":
DesetupSyncTblPatient(false, true);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
if(_tblAgency!=null)
{
toReturn.Add(_tblAgency);
}
if(_tblPatient!=null)
{
toReturn.Add(_tblPatient);
}
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[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));
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblReferraltoServiceRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblAgency' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblAgency()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblAgencyFields.AgencyTypeId, null, ComparisonOperator.Equal, this.AgencyTypeId));
return bucket;
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblPatient' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblPatient()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblPatientFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblReferraltoServiceEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblAgency", _tblAgency);
toReturn.Add("TblPatient", _tblPatient);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("AgencyTypeId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Note", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("PatientId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ProvinceId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ReceiveServiceDate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ReferralAgency", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ReferralDate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Status", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("UniqueKey", fieldHashtable);
}
#endregion
/// <summary> Removes the sync logic for member _tblAgency</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblAgency(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblAgency, new PropertyChangedEventHandler( OnTblAgencyPropertyChanged ), "TblAgency", Datalib.RelationClasses.StaticTblReferraltoServiceRelations.TblAgencyEntityUsingAgencyTypeIdStatic, true, signalRelatedEntity, "TblReferraltoServices", resetFKFields, new int[] { (int)TblReferraltoServiceFieldIndex.AgencyTypeId } );
_tblAgency = null;
}
/// <summary> setups the sync logic for member _tblAgency</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblAgency(IEntityCore relatedEntity)
{
if(_tblAgency!=relatedEntity)
{
DesetupSyncTblAgency(true, true);
_tblAgency = (TblAgencyEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblAgency, new PropertyChangedEventHandler( OnTblAgencyPropertyChanged ), "TblAgency", Datalib.RelationClasses.StaticTblReferraltoServiceRelations.TblAgencyEntityUsingAgencyTypeIdStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblAgencyPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Removes the sync logic for member _tblPatient</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblPatient(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblReferraltoServiceRelations.TblPatientEntityUsingPatientIdStatic, true, signalRelatedEntity, "TblReferraltoServices", resetFKFields, new int[] { (int)TblReferraltoServiceFieldIndex.PatientId } );
_tblPatient = null;
}
/// <summary> setups the sync logic for member _tblPatient</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblPatient(IEntityCore relatedEntity)
{
if(_tblPatient!=relatedEntity)
{
DesetupSyncTblPatient(true, true);
_tblPatient = (TblPatientEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblReferraltoServiceRelations.TblPatientEntityUsingPatientIdStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblPatientPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblReferraltoServiceEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblReferraltoServiceRelations Relations
{
get { return new TblReferraltoServiceRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblAgency' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblAgency
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblAgencyEntityFactory))), (IEntityRelation)GetRelationsForField("TblAgency")[0], (int)Datalib.EntityType.TblReferraltoServiceEntity, (int)Datalib.EntityType.TblAgencyEntity, 0, null, null, null, null, "TblAgency", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblPatient' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblPatient
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblPatientEntityFactory))), (IEntityRelation)GetRelationsForField("TblPatient")[0], (int)Datalib.EntityType.TblReferraltoServiceEntity, (int)Datalib.EntityType.TblPatientEntity, 0, null, null, null, null, "TblPatient", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The AgencyTypeId property of the Entity TblReferraltoService<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferraltoServices"."AgencyTypeID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String AgencyTypeId
{
get { return (System.String)GetValue((int)TblReferraltoServiceFieldIndex.AgencyTypeId, true); }
set { SetValue((int)TblReferraltoServiceFieldIndex.AgencyTypeId, value); }
}
/// <summary> The Note property of the Entity TblReferraltoService<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferraltoServices"."Note"<br/>
/// Table field type characteristics (type, precision, scale, length): LongVarWChar, 0, 0, 536870911<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Note
{
get { return (System.String)GetValue((int)TblReferraltoServiceFieldIndex.Note, true); }
set { SetValue((int)TblReferraltoServiceFieldIndex.Note, value); }
}
/// <summary> The PatientId property of the Entity TblReferraltoService<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferraltoServices"."PatientID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 15<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String PatientId
{
get { return (System.String)GetValue((int)TblReferraltoServiceFieldIndex.PatientId, true); }
set { SetValue((int)TblReferraltoServiceFieldIndex.PatientId, value); }
}
/// <summary> The ProvinceId property of the Entity TblReferraltoService<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferraltoServices"."ProvinceID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 3<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String ProvinceId
{
get { return (System.String)GetValue((int)TblReferraltoServiceFieldIndex.ProvinceId, true); }
set { SetValue((int)TblReferraltoServiceFieldIndex.ProvinceId, value); }
}
/// <summary> The ReceiveServiceDate property of the Entity TblReferraltoService<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferraltoServices"."ReceiveServiceDate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> ReceiveServiceDate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblReferraltoServiceFieldIndex.ReceiveServiceDate, false); }
set { SetValue((int)TblReferraltoServiceFieldIndex.ReceiveServiceDate, value); }
}
/// <summary> The ReferralAgency property of the Entity TblReferraltoService<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferraltoServices"."ReferralAgency"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String ReferralAgency
{
get { return (System.String)GetValue((int)TblReferraltoServiceFieldIndex.ReferralAgency, true); }
set { SetValue((int)TblReferraltoServiceFieldIndex.ReferralAgency, value); }
}
/// <summary> The ReferralDate property of the Entity TblReferraltoService<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferraltoServices"."ReferralDate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> ReferralDate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblReferraltoServiceFieldIndex.ReferralDate, false); }
set { SetValue((int)TblReferraltoServiceFieldIndex.ReferralDate, value); }
}
/// <summary> The Status property of the Entity TblReferraltoService<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferraltoServices"."Status"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Status
{
get { return (Nullable<System.Int16>)GetValue((int)TblReferraltoServiceFieldIndex.Status, false); }
set { SetValue((int)TblReferraltoServiceFieldIndex.Status, value); }
}
/// <summary> The UniqueKey property of the Entity TblReferraltoService<br/><br/></summary>
/// <remarks>Mapped on table field: "tblReferraltoServices"."UniqueKey"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String UniqueKey
{
get { return (System.String)GetValue((int)TblReferraltoServiceFieldIndex.UniqueKey, true); }
set { SetValue((int)TblReferraltoServiceFieldIndex.UniqueKey, value); }
}
/// <summary> 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..<br/><br/></summary>
[Browsable(false)]
public virtual TblAgencyEntity TblAgency
{
get { return _tblAgency; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblAgency(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblReferraltoServices", "TblAgency", _tblAgency, true);
}
}
}
/// <summary> 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..<br/><br/></summary>
[Browsable(false)]
public virtual TblPatientEntity TblPatient
{
get { return _tblPatient; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblPatient(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblReferraltoServices", "TblPatient", _tblPatient, true);
}
}
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblReferraltoServiceEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,503 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblRegimen'.<br/><br/></summary>
[Serializable]
public partial class TblRegimenEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private EntityCollection<TblTreatmentInfoEntity> _tblTreatmentInfos;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblTreatmentInfos</summary>
public static readonly string TblTreatmentInfos = "TblTreatmentInfos";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblRegimenEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblRegimenEntity():base("TblRegimenEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblRegimenEntity(IEntityFields2 fields):base("TblRegimenEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblRegimenEntity</param>
public TblRegimenEntity(IValidator validator):base("TblRegimenEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="regimenid">PK value for TblRegimen which data should be fetched into this TblRegimen object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblRegimenEntity(System.String regimenid):base("TblRegimenEntity")
{
InitClassEmpty(null, null);
this.Regimenid = regimenid;
}
/// <summary> CTor</summary>
/// <param name="regimenid">PK value for TblRegimen which data should be fetched into this TblRegimen object</param>
/// <param name="validator">The custom validator object for this TblRegimenEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblRegimenEntity(System.String regimenid, IValidator validator):base("TblRegimenEntity")
{
InitClassEmpty(validator, null);
this.Regimenid = regimenid;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblRegimenEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblTreatmentInfos = (EntityCollection<TblTreatmentInfoEntity>)info.GetValue("_tblTreatmentInfos", typeof(EntityCollection<TblTreatmentInfoEntity>));
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblTreatmentInfos":
this.TblTreatmentInfos.Add((TblTreatmentInfoEntity)entity);
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblTreatmentInfos":
toReturn.Add(Relations.TblTreatmentInfoEntityUsingRegimenid);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblTreatmentInfos":
this.TblTreatmentInfos.Add((TblTreatmentInfoEntity)relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblTreatmentInfos":
this.PerformRelatedEntityRemoval(this.TblTreatmentInfos, relatedEntity, signalRelatedEntityManyToOne);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
toReturn.Add(this.TblTreatmentInfos);
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblTreatmentInfos", ((_tblTreatmentInfos!=null) && (_tblTreatmentInfos.Count>0) && !this.MarkedForDeletion)?_tblTreatmentInfos:null);
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblRegimenRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblTreatmentInfo' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblTreatmentInfos()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblTreatmentInfoFields.Regimenid, null, ComparisonOperator.Equal, this.Regimenid));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblRegimenEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
collectionsQueue.Enqueue(this._tblTreatmentInfos);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
this._tblTreatmentInfos = (EntityCollection<TblTreatmentInfoEntity>) collectionsQueue.Dequeue();
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
toReturn |=(this._tblTreatmentInfos != null);
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection<TblTreatmentInfoEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblTreatmentInfoEntityFactory))) : null);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblTreatmentInfos", _tblTreatmentInfos);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ERegimenName", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Regimenid", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Sign", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Type", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("VRegimenname", fieldHashtable);
}
#endregion
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblRegimenEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblRegimenRelations Relations
{
get { return new TblRegimenRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblTreatmentInfo' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblTreatmentInfos
{
get { return new PrefetchPathElement2( new EntityCollection<TblTreatmentInfoEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblTreatmentInfoEntityFactory))), (IEntityRelation)GetRelationsForField("TblTreatmentInfos")[0], (int)Datalib.EntityType.TblRegimenEntity, (int)Datalib.EntityType.TblTreatmentInfoEntity, 0, null, null, null, null, "TblTreatmentInfos", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The ERegimenName property of the Entity TblRegimen<br/><br/></summary>
/// <remarks>Mapped on table field: "tblRegimens"."eRegimenName"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String ERegimenName
{
get { return (System.String)GetValue((int)TblRegimenFieldIndex.ERegimenName, true); }
set { SetValue((int)TblRegimenFieldIndex.ERegimenName, value); }
}
/// <summary> The Regimenid property of the Entity TblRegimen<br/><br/></summary>
/// <remarks>Mapped on table field: "tblRegimens"."Regimenid"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String Regimenid
{
get { return (System.String)GetValue((int)TblRegimenFieldIndex.Regimenid, true); }
set { SetValue((int)TblRegimenFieldIndex.Regimenid, value); }
}
/// <summary> The Sign property of the Entity TblRegimen<br/><br/></summary>
/// <remarks>Mapped on table field: "tblRegimens"."Sign"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 3<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Sign
{
get { return (System.String)GetValue((int)TblRegimenFieldIndex.Sign, true); }
set { SetValue((int)TblRegimenFieldIndex.Sign, value); }
}
/// <summary> The Type property of the Entity TblRegimen<br/><br/></summary>
/// <remarks>Mapped on table field: "tblRegimens"."Type"<br/>
/// Table field type characteristics (type, precision, scale, length): SmallInt, 5, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.Int16> Type
{
get { return (Nullable<System.Int16>)GetValue((int)TblRegimenFieldIndex.Type, false); }
set { SetValue((int)TblRegimenFieldIndex.Type, value); }
}
/// <summary> The VRegimenname property of the Entity TblRegimen<br/><br/></summary>
/// <remarks>Mapped on table field: "tblRegimens"."vRegimenname"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String VRegimenname
{
get { return (System.String)GetValue((int)TblRegimenFieldIndex.VRegimenname, true); }
set { SetValue((int)TblRegimenFieldIndex.VRegimenname, value); }
}
/// <summary> Gets the EntityCollection with the related entities of type 'TblTreatmentInfoEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblTreatmentInfoEntity))]
public virtual EntityCollection<TblTreatmentInfoEntity> TblTreatmentInfos
{
get { return GetOrCreateEntityCollection<TblTreatmentInfoEntity, TblTreatmentInfoEntityFactory>("TblRegiman", true, false, ref _tblTreatmentInfos); }
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblRegimenEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,491 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblRegimenStopReason'.<br/><br/></summary>
[Serializable]
public partial class TblRegimenStopReasonEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private EntityCollection<TblTreatmentInfoEntity> _tblTreatmentInfos;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblTreatmentInfos</summary>
public static readonly string TblTreatmentInfos = "TblTreatmentInfos";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblRegimenStopReasonEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblRegimenStopReasonEntity():base("TblRegimenStopReasonEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblRegimenStopReasonEntity(IEntityFields2 fields):base("TblRegimenStopReasonEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblRegimenStopReasonEntity</param>
public TblRegimenStopReasonEntity(IValidator validator):base("TblRegimenStopReasonEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="reasonId">PK value for TblRegimenStopReason which data should be fetched into this TblRegimenStopReason object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblRegimenStopReasonEntity(System.String reasonId):base("TblRegimenStopReasonEntity")
{
InitClassEmpty(null, null);
this.ReasonId = reasonId;
}
/// <summary> CTor</summary>
/// <param name="reasonId">PK value for TblRegimenStopReason which data should be fetched into this TblRegimenStopReason object</param>
/// <param name="validator">The custom validator object for this TblRegimenStopReasonEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblRegimenStopReasonEntity(System.String reasonId, IValidator validator):base("TblRegimenStopReasonEntity")
{
InitClassEmpty(validator, null);
this.ReasonId = reasonId;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblRegimenStopReasonEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblTreatmentInfos = (EntityCollection<TblTreatmentInfoEntity>)info.GetValue("_tblTreatmentInfos", typeof(EntityCollection<TblTreatmentInfoEntity>));
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblTreatmentInfos":
this.TblTreatmentInfos.Add((TblTreatmentInfoEntity)entity);
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblTreatmentInfos":
toReturn.Add(Relations.TblTreatmentInfoEntityUsingReasonId);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblTreatmentInfos":
this.TblTreatmentInfos.Add((TblTreatmentInfoEntity)relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblTreatmentInfos":
this.PerformRelatedEntityRemoval(this.TblTreatmentInfos, relatedEntity, signalRelatedEntityManyToOne);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
toReturn.Add(this.TblTreatmentInfos);
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblTreatmentInfos", ((_tblTreatmentInfos!=null) && (_tblTreatmentInfos.Count>0) && !this.MarkedForDeletion)?_tblTreatmentInfos:null);
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblRegimenStopReasonRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblTreatmentInfo' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblTreatmentInfos()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblTreatmentInfoFields.ReasonId, null, ComparisonOperator.Equal, this.ReasonId));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblRegimenStopReasonEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
collectionsQueue.Enqueue(this._tblTreatmentInfos);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
this._tblTreatmentInfos = (EntityCollection<TblTreatmentInfoEntity>) collectionsQueue.Dequeue();
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
toReturn |=(this._tblTreatmentInfos != null);
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection<TblTreatmentInfoEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblTreatmentInfoEntityFactory))) : null);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblTreatmentInfos", _tblTreatmentInfos);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("EReasonDes", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ReasonId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Sign", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("VReasonDes", fieldHashtable);
}
#endregion
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblRegimenStopReasonEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblRegimenStopReasonRelations Relations
{
get { return new TblRegimenStopReasonRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblTreatmentInfo' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblTreatmentInfos
{
get { return new PrefetchPathElement2( new EntityCollection<TblTreatmentInfoEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblTreatmentInfoEntityFactory))), (IEntityRelation)GetRelationsForField("TblTreatmentInfos")[0], (int)Datalib.EntityType.TblRegimenStopReasonEntity, (int)Datalib.EntityType.TblTreatmentInfoEntity, 0, null, null, null, null, "TblTreatmentInfos", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The EReasonDes property of the Entity TblRegimenStopReason<br/><br/></summary>
/// <remarks>Mapped on table field: "tblRegimenStopReasons"."eReasonDes"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String EReasonDes
{
get { return (System.String)GetValue((int)TblRegimenStopReasonFieldIndex.EReasonDes, true); }
set { SetValue((int)TblRegimenStopReasonFieldIndex.EReasonDes, value); }
}
/// <summary> The ReasonId property of the Entity TblRegimenStopReason<br/><br/></summary>
/// <remarks>Mapped on table field: "tblRegimenStopReasons"."ReasonID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String ReasonId
{
get { return (System.String)GetValue((int)TblRegimenStopReasonFieldIndex.ReasonId, true); }
set { SetValue((int)TblRegimenStopReasonFieldIndex.ReasonId, value); }
}
/// <summary> The Sign property of the Entity TblRegimenStopReason<br/><br/></summary>
/// <remarks>Mapped on table field: "tblRegimenStopReasons"."Sign"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Sign
{
get { return (System.String)GetValue((int)TblRegimenStopReasonFieldIndex.Sign, true); }
set { SetValue((int)TblRegimenStopReasonFieldIndex.Sign, value); }
}
/// <summary> The VReasonDes property of the Entity TblRegimenStopReason<br/><br/></summary>
/// <remarks>Mapped on table field: "tblRegimenStopReasons"."vReasonDes"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String VReasonDes
{
get { return (System.String)GetValue((int)TblRegimenStopReasonFieldIndex.VReasonDes, true); }
set { SetValue((int)TblRegimenStopReasonFieldIndex.VReasonDes, value); }
}
/// <summary> Gets the EntityCollection with the related entities of type 'TblTreatmentInfoEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblTreatmentInfoEntity))]
public virtual EntityCollection<TblTreatmentInfoEntity> TblTreatmentInfos
{
get { return GetOrCreateEntityCollection<TblTreatmentInfoEntity, TblTreatmentInfoEntityFactory>("TblRegimenStopReason", true, false, ref _tblTreatmentInfos); }
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblRegimenStopReasonEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,433 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblService'.<br/><br/></summary>
[Serializable]
public partial class TblServiceEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblServiceEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblServiceEntity():base("TblServiceEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblServiceEntity(IEntityFields2 fields):base("TblServiceEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblServiceEntity</param>
public TblServiceEntity(IValidator validator):base("TblServiceEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="serviceId">PK value for TblService which data should be fetched into this TblService object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblServiceEntity(System.String serviceId):base("TblServiceEntity")
{
InitClassEmpty(null, null);
this.ServiceId = serviceId;
}
/// <summary> CTor</summary>
/// <param name="serviceId">PK value for TblService which data should be fetched into this TblService object</param>
/// <param name="validator">The custom validator object for this TblServiceEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblServiceEntity(System.String serviceId, IValidator validator):base("TblServiceEntity")
{
InitClassEmpty(validator, null);
this.ServiceId = serviceId;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblServiceEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblServiceRelations().GetAllRelations();
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblServiceEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("EServiceName", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ServiceId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("VServiceName", fieldHashtable);
}
#endregion
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblServiceEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblServiceRelations Relations
{
get { return new TblServiceRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The EServiceName property of the Entity TblService<br/><br/></summary>
/// <remarks>Mapped on table field: "tblServices"."eServiceName"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String EServiceName
{
get { return (System.String)GetValue((int)TblServiceFieldIndex.EServiceName, true); }
set { SetValue((int)TblServiceFieldIndex.EServiceName, value); }
}
/// <summary> The ServiceId property of the Entity TblService<br/><br/></summary>
/// <remarks>Mapped on table field: "tblServices"."ServiceID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String ServiceId
{
get { return (System.String)GetValue((int)TblServiceFieldIndex.ServiceId, true); }
set { SetValue((int)TblServiceFieldIndex.ServiceId, value); }
}
/// <summary> The VServiceName property of the Entity TblService<br/><br/></summary>
/// <remarks>Mapped on table field: "tblServices"."vServiceName"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String VServiceName
{
get { return (System.String)GetValue((int)TblServiceFieldIndex.VServiceName, true); }
set { SetValue((int)TblServiceFieldIndex.VServiceName, value); }
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblServiceEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,479 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblTest'.<br/><br/></summary>
[Serializable]
public partial class TblTestEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private EntityCollection<TblPreClinicsInfoEntity> _tblPreClinicsInfos;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblPreClinicsInfos</summary>
public static readonly string TblPreClinicsInfos = "TblPreClinicsInfos";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblTestEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblTestEntity():base("TblTestEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblTestEntity(IEntityFields2 fields):base("TblTestEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblTestEntity</param>
public TblTestEntity(IValidator validator):base("TblTestEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="testid">PK value for TblTest which data should be fetched into this TblTest object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblTestEntity(System.String testid):base("TblTestEntity")
{
InitClassEmpty(null, null);
this.Testid = testid;
}
/// <summary> CTor</summary>
/// <param name="testid">PK value for TblTest which data should be fetched into this TblTest object</param>
/// <param name="validator">The custom validator object for this TblTestEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblTestEntity(System.String testid, IValidator validator):base("TblTestEntity")
{
InitClassEmpty(validator, null);
this.Testid = testid;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblTestEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblPreClinicsInfos = (EntityCollection<TblPreClinicsInfoEntity>)info.GetValue("_tblPreClinicsInfos", typeof(EntityCollection<TblPreClinicsInfoEntity>));
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblPreClinicsInfos":
this.TblPreClinicsInfos.Add((TblPreClinicsInfoEntity)entity);
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblPreClinicsInfos":
toReturn.Add(Relations.TblPreClinicsInfoEntityUsingTestid);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblPreClinicsInfos":
this.TblPreClinicsInfos.Add((TblPreClinicsInfoEntity)relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblPreClinicsInfos":
this.PerformRelatedEntityRemoval(this.TblPreClinicsInfos, relatedEntity, signalRelatedEntityManyToOne);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
toReturn.Add(this.TblPreClinicsInfos);
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblPreClinicsInfos", ((_tblPreClinicsInfos!=null) && (_tblPreClinicsInfos.Count>0) && !this.MarkedForDeletion)?_tblPreClinicsInfos:null);
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblTestRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblPreClinicsInfo' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblPreClinicsInfos()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblPreClinicsInfoFields.Testid, null, ComparisonOperator.Equal, this.Testid));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblTestEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
collectionsQueue.Enqueue(this._tblPreClinicsInfos);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
this._tblPreClinicsInfos = (EntityCollection<TblPreClinicsInfoEntity>) collectionsQueue.Dequeue();
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
toReturn |=(this._tblPreClinicsInfos != null);
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection<TblPreClinicsInfoEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblPreClinicsInfoEntityFactory))) : null);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblPreClinicsInfos", _tblPreClinicsInfos);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ETestName", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Testid", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("VTestName", fieldHashtable);
}
#endregion
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblTestEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblTestRelations Relations
{
get { return new TblTestRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblPreClinicsInfo' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblPreClinicsInfos
{
get { return new PrefetchPathElement2( new EntityCollection<TblPreClinicsInfoEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblPreClinicsInfoEntityFactory))), (IEntityRelation)GetRelationsForField("TblPreClinicsInfos")[0], (int)Datalib.EntityType.TblTestEntity, (int)Datalib.EntityType.TblPreClinicsInfoEntity, 0, null, null, null, null, "TblPreClinicsInfos", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The ETestName property of the Entity TblTest<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTests"."eTestName"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String ETestName
{
get { return (System.String)GetValue((int)TblTestFieldIndex.ETestName, true); }
set { SetValue((int)TblTestFieldIndex.ETestName, value); }
}
/// <summary> The Testid property of the Entity TblTest<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTests"."Testid"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String Testid
{
get { return (System.String)GetValue((int)TblTestFieldIndex.Testid, true); }
set { SetValue((int)TblTestFieldIndex.Testid, value); }
}
/// <summary> The VTestName property of the Entity TblTest<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTests"."vTestName"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String VTestName
{
get { return (System.String)GetValue((int)TblTestFieldIndex.VTestName, true); }
set { SetValue((int)TblTestFieldIndex.VTestName, value); }
}
/// <summary> Gets the EntityCollection with the related entities of type 'TblPreClinicsInfoEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblPreClinicsInfoEntity))]
public virtual EntityCollection<TblPreClinicsInfoEntity> TblPreClinicsInfos
{
get { return GetOrCreateEntityCollection<TblPreClinicsInfoEntity, TblPreClinicsInfoEntityFactory>("TblTest", true, false, ref _tblPreClinicsInfos); }
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblTestEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,491 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblTreatment'.<br/><br/></summary>
[Serializable]
public partial class TblTreatmentEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private EntityCollection<TblTreatmentInfoEntity> _tblTreatmentInfos;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblTreatmentInfos</summary>
public static readonly string TblTreatmentInfos = "TblTreatmentInfos";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblTreatmentEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblTreatmentEntity():base("TblTreatmentEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblTreatmentEntity(IEntityFields2 fields):base("TblTreatmentEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblTreatmentEntity</param>
public TblTreatmentEntity(IValidator validator):base("TblTreatmentEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="treatmentId">PK value for TblTreatment which data should be fetched into this TblTreatment object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblTreatmentEntity(System.String treatmentId):base("TblTreatmentEntity")
{
InitClassEmpty(null, null);
this.TreatmentId = treatmentId;
}
/// <summary> CTor</summary>
/// <param name="treatmentId">PK value for TblTreatment which data should be fetched into this TblTreatment object</param>
/// <param name="validator">The custom validator object for this TblTreatmentEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblTreatmentEntity(System.String treatmentId, IValidator validator):base("TblTreatmentEntity")
{
InitClassEmpty(validator, null);
this.TreatmentId = treatmentId;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblTreatmentEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblTreatmentInfos = (EntityCollection<TblTreatmentInfoEntity>)info.GetValue("_tblTreatmentInfos", typeof(EntityCollection<TblTreatmentInfoEntity>));
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblTreatmentInfos":
this.TblTreatmentInfos.Add((TblTreatmentInfoEntity)entity);
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblTreatmentInfos":
toReturn.Add(Relations.TblTreatmentInfoEntityUsingTreatmentId);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblTreatmentInfos":
this.TblTreatmentInfos.Add((TblTreatmentInfoEntity)relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblTreatmentInfos":
this.PerformRelatedEntityRemoval(this.TblTreatmentInfos, relatedEntity, signalRelatedEntityManyToOne);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
toReturn.Add(this.TblTreatmentInfos);
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblTreatmentInfos", ((_tblTreatmentInfos!=null) && (_tblTreatmentInfos.Count>0) && !this.MarkedForDeletion)?_tblTreatmentInfos:null);
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblTreatmentRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entities of type 'TblTreatmentInfo' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblTreatmentInfos()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblTreatmentInfoFields.TreatmentId, null, ComparisonOperator.Equal, this.TreatmentId));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblTreatmentEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
collectionsQueue.Enqueue(this._tblTreatmentInfos);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
this._tblTreatmentInfos = (EntityCollection<TblTreatmentInfoEntity>) collectionsQueue.Dequeue();
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
toReturn |=(this._tblTreatmentInfos != null);
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
collectionsQueue.Enqueue(requiredQueue.Dequeue() ? new EntityCollection<TblTreatmentInfoEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblTreatmentInfoEntityFactory))) : null);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblTreatmentInfos", _tblTreatmentInfos);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ETreatmentDes", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Sign", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("TreatmentId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("VTreatmentDes", fieldHashtable);
}
#endregion
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblTreatmentEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblTreatmentRelations Relations
{
get { return new TblTreatmentRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblTreatmentInfo' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblTreatmentInfos
{
get { return new PrefetchPathElement2( new EntityCollection<TblTreatmentInfoEntity>(EntityFactoryCache2.GetEntityFactory(typeof(TblTreatmentInfoEntityFactory))), (IEntityRelation)GetRelationsForField("TblTreatmentInfos")[0], (int)Datalib.EntityType.TblTreatmentEntity, (int)Datalib.EntityType.TblTreatmentInfoEntity, 0, null, null, null, null, "TblTreatmentInfos", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The ETreatmentDes property of the Entity TblTreatment<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTreatments"."eTreatmentDes"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String ETreatmentDes
{
get { return (System.String)GetValue((int)TblTreatmentFieldIndex.ETreatmentDes, true); }
set { SetValue((int)TblTreatmentFieldIndex.ETreatmentDes, value); }
}
/// <summary> The Sign property of the Entity TblTreatment<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTreatments"."Sign"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 10<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Sign
{
get { return (System.String)GetValue((int)TblTreatmentFieldIndex.Sign, true); }
set { SetValue((int)TblTreatmentFieldIndex.Sign, value); }
}
/// <summary> The TreatmentId property of the Entity TblTreatment<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTreatments"."TreatmentID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String TreatmentId
{
get { return (System.String)GetValue((int)TblTreatmentFieldIndex.TreatmentId, true); }
set { SetValue((int)TblTreatmentFieldIndex.TreatmentId, value); }
}
/// <summary> The VTreatmentDes property of the Entity TblTreatment<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTreatments"."vTreatmentDes"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String VTreatmentDes
{
get { return (System.String)GetValue((int)TblTreatmentFieldIndex.VTreatmentDes, true); }
set { SetValue((int)TblTreatmentFieldIndex.VTreatmentDes, value); }
}
/// <summary> Gets the EntityCollection with the related entities of type 'TblTreatmentInfoEntity' which are related to this entity via a relation of type '1:n'. If the EntityCollection hasn't been fetched yet, the collection returned will be empty.<br/><br/></summary>
[TypeContainedAttribute(typeof(TblTreatmentInfoEntity))]
public virtual EntityCollection<TblTreatmentInfoEntity> TblTreatmentInfos
{
get { return GetOrCreateEntityCollection<TblTreatmentInfoEntity, TblTreatmentInfoEntityFactory>("TblTreatment", true, false, ref _tblTreatmentInfos); }
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblTreatmentEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,877 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblTreatmentInfo'.<br/><br/></summary>
[Serializable]
public partial class TblTreatmentInfoEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private TblPatientEntity _tblPatient;
private TblRegimenEntity _tblRegiman;
private TblRegimenStopReasonEntity _tblRegimenStopReason;
private TblTreatmentEntity _tblTreatment;
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
/// <summary>Member name TblPatient</summary>
public static readonly string TblPatient = "TblPatient";
/// <summary>Member name TblRegiman</summary>
public static readonly string TblRegiman = "TblRegiman";
/// <summary>Member name TblRegimenStopReason</summary>
public static readonly string TblRegimenStopReason = "TblRegimenStopReason";
/// <summary>Member name TblTreatment</summary>
public static readonly string TblTreatment = "TblTreatment";
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblTreatmentInfoEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblTreatmentInfoEntity():base("TblTreatmentInfoEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblTreatmentInfoEntity(IEntityFields2 fields):base("TblTreatmentInfoEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblTreatmentInfoEntity</param>
public TblTreatmentInfoEntity(IValidator validator):base("TblTreatmentInfoEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblTreatmentInfo which data should be fetched into this TblTreatmentInfo object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblTreatmentInfoEntity(System.String uniqueKey):base("TblTreatmentInfoEntity")
{
InitClassEmpty(null, null);
this.UniqueKey = uniqueKey;
}
/// <summary> CTor</summary>
/// <param name="uniqueKey">PK value for TblTreatmentInfo which data should be fetched into this TblTreatmentInfo object</param>
/// <param name="validator">The custom validator object for this TblTreatmentInfoEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblTreatmentInfoEntity(System.String uniqueKey, IValidator validator):base("TblTreatmentInfoEntity")
{
InitClassEmpty(validator, null);
this.UniqueKey = uniqueKey;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblTreatmentInfoEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
_tblPatient = (TblPatientEntity)info.GetValue("_tblPatient", typeof(TblPatientEntity));
if(_tblPatient!=null)
{
_tblPatient.AfterSave+=new EventHandler(OnEntityAfterSave);
}
_tblRegiman = (TblRegimenEntity)info.GetValue("_tblRegiman", typeof(TblRegimenEntity));
if(_tblRegiman!=null)
{
_tblRegiman.AfterSave+=new EventHandler(OnEntityAfterSave);
}
_tblRegimenStopReason = (TblRegimenStopReasonEntity)info.GetValue("_tblRegimenStopReason", typeof(TblRegimenStopReasonEntity));
if(_tblRegimenStopReason!=null)
{
_tblRegimenStopReason.AfterSave+=new EventHandler(OnEntityAfterSave);
}
_tblTreatment = (TblTreatmentEntity)info.GetValue("_tblTreatment", typeof(TblTreatmentEntity));
if(_tblTreatment!=null)
{
_tblTreatment.AfterSave+=new EventHandler(OnEntityAfterSave);
}
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary>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.</summary>
/// <param name="fieldIndex">The fieldindex.</param>
protected override void PerformDesyncSetupFKFieldChange(int fieldIndex)
{
switch((TblTreatmentInfoFieldIndex)fieldIndex)
{
case TblTreatmentInfoFieldIndex.PatientId:
DesetupSyncTblPatient(true, false);
break;
case TblTreatmentInfoFieldIndex.ReasonId:
DesetupSyncTblRegimenStopReason(true, false);
break;
case TblTreatmentInfoFieldIndex.Regimenid:
DesetupSyncTblRegiman(true, false);
break;
case TblTreatmentInfoFieldIndex.TreatmentId:
DesetupSyncTblTreatment(true, false);
break;
default:
base.PerformDesyncSetupFKFieldChange(fieldIndex);
break;
}
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
case "TblPatient":
this.TblPatient = (TblPatientEntity)entity;
break;
case "TblRegiman":
this.TblRegiman = (TblRegimenEntity)entity;
break;
case "TblRegimenStopReason":
this.TblRegimenStopReason = (TblRegimenStopReasonEntity)entity;
break;
case "TblTreatment":
this.TblTreatment = (TblTreatmentEntity)entity;
break;
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
case "TblPatient":
toReturn.Add(Relations.TblPatientEntityUsingPatientId);
break;
case "TblRegiman":
toReturn.Add(Relations.TblRegimenEntityUsingRegimenid);
break;
case "TblRegimenStopReason":
toReturn.Add(Relations.TblRegimenStopReasonEntityUsingReasonId);
break;
case "TblTreatment":
toReturn.Add(Relations.TblTreatmentEntityUsingTreatmentId);
break;
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
case "TblPatient":
SetupSyncTblPatient(relatedEntity);
break;
case "TblRegiman":
SetupSyncTblRegiman(relatedEntity);
break;
case "TblRegimenStopReason":
SetupSyncTblRegimenStopReason(relatedEntity);
break;
case "TblTreatment":
SetupSyncTblTreatment(relatedEntity);
break;
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
case "TblPatient":
DesetupSyncTblPatient(false, true);
break;
case "TblRegiman":
DesetupSyncTblRegiman(false, true);
break;
case "TblRegimenStopReason":
DesetupSyncTblRegimenStopReason(false, true);
break;
case "TblTreatment":
DesetupSyncTblTreatment(false, true);
break;
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
if(_tblPatient!=null)
{
toReturn.Add(_tblPatient);
}
if(_tblRegiman!=null)
{
toReturn.Add(_tblRegiman);
}
if(_tblRegimenStopReason!=null)
{
toReturn.Add(_tblRegimenStopReason);
}
if(_tblTreatment!=null)
{
toReturn.Add(_tblTreatment);
}
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
info.AddValue("_tblPatient", (!this.MarkedForDeletion?_tblPatient:null));
info.AddValue("_tblRegiman", (!this.MarkedForDeletion?_tblRegiman:null));
info.AddValue("_tblRegimenStopReason", (!this.MarkedForDeletion?_tblRegimenStopReason:null));
info.AddValue("_tblTreatment", (!this.MarkedForDeletion?_tblTreatment:null));
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblTreatmentInfoRelations().GetAllRelations();
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblPatient' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblPatient()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblPatientFields.PatientId, null, ComparisonOperator.Equal, this.PatientId));
return bucket;
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblRegimen' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblRegiman()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblRegimenFields.Regimenid, null, ComparisonOperator.Equal, this.Regimenid));
return bucket;
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblRegimenStopReason' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblRegimenStopReason()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblRegimenStopReasonFields.ReasonId, null, ComparisonOperator.Equal, this.ReasonId));
return bucket;
}
/// <summary> Creates a new IRelationPredicateBucket object which contains the predicate expression and relation collection to fetch the related entity of type 'TblTreatment' to this entity.</summary>
/// <returns></returns>
public virtual IRelationPredicateBucket GetRelationInfoTblTreatment()
{
IRelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(new FieldCompareValuePredicate(TblTreatmentFields.TreatmentId, null, ComparisonOperator.Equal, this.TreatmentId));
return bucket;
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblTreatmentInfoEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
toReturn.Add("TblPatient", _tblPatient);
toReturn.Add("TblRegiman", _tblRegiman);
toReturn.Add("TblRegimenStopReason", _tblRegimenStopReason);
toReturn.Add("TblTreatment", _tblTreatment);
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("PatientId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ReasonId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Regimenid", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("TreatmentEdate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("TreatmentId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("TreatmentSdate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("UniqueKey", fieldHashtable);
}
#endregion
/// <summary> Removes the sync logic for member _tblPatient</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblPatient(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblTreatmentInfoRelations.TblPatientEntityUsingPatientIdStatic, true, signalRelatedEntity, "TblTreatmentInfos", resetFKFields, new int[] { (int)TblTreatmentInfoFieldIndex.PatientId } );
_tblPatient = null;
}
/// <summary> setups the sync logic for member _tblPatient</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblPatient(IEntityCore relatedEntity)
{
if(_tblPatient!=relatedEntity)
{
DesetupSyncTblPatient(true, true);
_tblPatient = (TblPatientEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblPatient, new PropertyChangedEventHandler( OnTblPatientPropertyChanged ), "TblPatient", Datalib.RelationClasses.StaticTblTreatmentInfoRelations.TblPatientEntityUsingPatientIdStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblPatientPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Removes the sync logic for member _tblRegiman</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblRegiman(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblRegiman, new PropertyChangedEventHandler( OnTblRegimanPropertyChanged ), "TblRegiman", Datalib.RelationClasses.StaticTblTreatmentInfoRelations.TblRegimenEntityUsingRegimenidStatic, true, signalRelatedEntity, "TblTreatmentInfos", resetFKFields, new int[] { (int)TblTreatmentInfoFieldIndex.Regimenid } );
_tblRegiman = null;
}
/// <summary> setups the sync logic for member _tblRegiman</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblRegiman(IEntityCore relatedEntity)
{
if(_tblRegiman!=relatedEntity)
{
DesetupSyncTblRegiman(true, true);
_tblRegiman = (TblRegimenEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblRegiman, new PropertyChangedEventHandler( OnTblRegimanPropertyChanged ), "TblRegiman", Datalib.RelationClasses.StaticTblTreatmentInfoRelations.TblRegimenEntityUsingRegimenidStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblRegimanPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Removes the sync logic for member _tblRegimenStopReason</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblRegimenStopReason(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblRegimenStopReason, new PropertyChangedEventHandler( OnTblRegimenStopReasonPropertyChanged ), "TblRegimenStopReason", Datalib.RelationClasses.StaticTblTreatmentInfoRelations.TblRegimenStopReasonEntityUsingReasonIdStatic, true, signalRelatedEntity, "TblTreatmentInfos", resetFKFields, new int[] { (int)TblTreatmentInfoFieldIndex.ReasonId } );
_tblRegimenStopReason = null;
}
/// <summary> setups the sync logic for member _tblRegimenStopReason</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblRegimenStopReason(IEntityCore relatedEntity)
{
if(_tblRegimenStopReason!=relatedEntity)
{
DesetupSyncTblRegimenStopReason(true, true);
_tblRegimenStopReason = (TblRegimenStopReasonEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblRegimenStopReason, new PropertyChangedEventHandler( OnTblRegimenStopReasonPropertyChanged ), "TblRegimenStopReason", Datalib.RelationClasses.StaticTblTreatmentInfoRelations.TblRegimenStopReasonEntityUsingReasonIdStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblRegimenStopReasonPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Removes the sync logic for member _tblTreatment</summary>
/// <param name="signalRelatedEntity">If set to true, it will call the related entity's UnsetRelatedEntity method</param>
/// <param name="resetFKFields">if set to true it will also reset the FK fields pointing to the related entity</param>
private void DesetupSyncTblTreatment(bool signalRelatedEntity, bool resetFKFields)
{
this.PerformDesetupSyncRelatedEntity( _tblTreatment, new PropertyChangedEventHandler( OnTblTreatmentPropertyChanged ), "TblTreatment", Datalib.RelationClasses.StaticTblTreatmentInfoRelations.TblTreatmentEntityUsingTreatmentIdStatic, true, signalRelatedEntity, "TblTreatmentInfos", resetFKFields, new int[] { (int)TblTreatmentInfoFieldIndex.TreatmentId } );
_tblTreatment = null;
}
/// <summary> setups the sync logic for member _tblTreatment</summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
private void SetupSyncTblTreatment(IEntityCore relatedEntity)
{
if(_tblTreatment!=relatedEntity)
{
DesetupSyncTblTreatment(true, true);
_tblTreatment = (TblTreatmentEntity)relatedEntity;
this.PerformSetupSyncRelatedEntity( _tblTreatment, new PropertyChangedEventHandler( OnTblTreatmentPropertyChanged ), "TblTreatment", Datalib.RelationClasses.StaticTblTreatmentInfoRelations.TblTreatmentEntityUsingTreatmentIdStatic, true, new string[] { } );
}
}
/// <summary>Handles property change events of properties in a related entity.</summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnTblTreatmentPropertyChanged( object sender, PropertyChangedEventArgs e )
{
switch( e.PropertyName )
{
default:
break;
}
}
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblTreatmentInfoEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblTreatmentInfoRelations Relations
{
get { return new TblTreatmentInfoRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblPatient' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblPatient
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblPatientEntityFactory))), (IEntityRelation)GetRelationsForField("TblPatient")[0], (int)Datalib.EntityType.TblTreatmentInfoEntity, (int)Datalib.EntityType.TblPatientEntity, 0, null, null, null, null, "TblPatient", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblRegimen' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblRegiman
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblRegimenEntityFactory))), (IEntityRelation)GetRelationsForField("TblRegiman")[0], (int)Datalib.EntityType.TblTreatmentInfoEntity, (int)Datalib.EntityType.TblRegimenEntity, 0, null, null, null, null, "TblRegiman", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblRegimenStopReason' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblRegimenStopReason
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblRegimenStopReasonEntityFactory))), (IEntityRelation)GetRelationsForField("TblRegimenStopReason")[0], (int)Datalib.EntityType.TblTreatmentInfoEntity, (int)Datalib.EntityType.TblRegimenStopReasonEntity, 0, null, null, null, null, "TblRegimenStopReason", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> Creates a new PrefetchPathElement2 object which contains all the information to prefetch the related entities of type 'TblTreatment' for this entity.</summary>
/// <returns>Ready to use IPrefetchPathElement2 implementation.</returns>
public static IPrefetchPathElement2 PrefetchPathTblTreatment
{
get { return new PrefetchPathElement2(new EntityCollection(EntityFactoryCache2.GetEntityFactory(typeof(TblTreatmentEntityFactory))), (IEntityRelation)GetRelationsForField("TblTreatment")[0], (int)Datalib.EntityType.TblTreatmentInfoEntity, (int)Datalib.EntityType.TblTreatmentEntity, 0, null, null, null, null, "TblTreatment", SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne); }
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The PatientId property of the Entity TblTreatmentInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTreatmentInfo"."PatientID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 15<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.String PatientId
{
get { return (System.String)GetValue((int)TblTreatmentInfoFieldIndex.PatientId, true); }
set { SetValue((int)TblTreatmentInfoFieldIndex.PatientId, value); }
}
/// <summary> The ReasonId property of the Entity TblTreatmentInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTreatmentInfo"."ReasonID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String ReasonId
{
get { return (System.String)GetValue((int)TblTreatmentInfoFieldIndex.ReasonId, true); }
set { SetValue((int)TblTreatmentInfoFieldIndex.ReasonId, value); }
}
/// <summary> The Regimenid property of the Entity TblTreatmentInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTreatmentInfo"."Regimenid"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Regimenid
{
get { return (System.String)GetValue((int)TblTreatmentInfoFieldIndex.Regimenid, true); }
set { SetValue((int)TblTreatmentInfoFieldIndex.Regimenid, value); }
}
/// <summary> The TreatmentEdate property of the Entity TblTreatmentInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTreatmentInfo"."TreatmentEdate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> TreatmentEdate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblTreatmentInfoFieldIndex.TreatmentEdate, false); }
set { SetValue((int)TblTreatmentInfoFieldIndex.TreatmentEdate, value); }
}
/// <summary> The TreatmentId property of the Entity TblTreatmentInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTreatmentInfo"."TreatmentID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String TreatmentId
{
get { return (System.String)GetValue((int)TblTreatmentInfoFieldIndex.TreatmentId, true); }
set { SetValue((int)TblTreatmentInfoFieldIndex.TreatmentId, value); }
}
/// <summary> The TreatmentSdate property of the Entity TblTreatmentInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTreatmentInfo"."TreatmentSdate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> TreatmentSdate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblTreatmentInfoFieldIndex.TreatmentSdate, false); }
set { SetValue((int)TblTreatmentInfoFieldIndex.TreatmentSdate, value); }
}
/// <summary> The UniqueKey property of the Entity TblTreatmentInfo<br/><br/></summary>
/// <remarks>Mapped on table field: "tblTreatmentInfo"."UniqueKey"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 32<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String UniqueKey
{
get { return (System.String)GetValue((int)TblTreatmentInfoFieldIndex.UniqueKey, true); }
set { SetValue((int)TblTreatmentInfoFieldIndex.UniqueKey, value); }
}
/// <summary> 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..<br/><br/></summary>
[Browsable(false)]
public virtual TblPatientEntity TblPatient
{
get { return _tblPatient; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblPatient(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblTreatmentInfos", "TblPatient", _tblPatient, true);
}
}
}
/// <summary> Gets / sets related entity of type 'TblRegimenEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
[Browsable(false)]
public virtual TblRegimenEntity TblRegiman
{
get { return _tblRegiman; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblRegiman(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblTreatmentInfos", "TblRegiman", _tblRegiman, true);
}
}
}
/// <summary> Gets / sets related entity of type 'TblRegimenStopReasonEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
[Browsable(false)]
public virtual TblRegimenStopReasonEntity TblRegimenStopReason
{
get { return _tblRegimenStopReason; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblRegimenStopReason(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblTreatmentInfos", "TblRegimenStopReason", _tblRegimenStopReason, true);
}
}
}
/// <summary> Gets / sets related entity of type 'TblTreatmentEntity' which has to be set using a fetch action earlier. If no related entity is set for this property, null is returned..<br/><br/></summary>
[Browsable(false)]
public virtual TblTreatmentEntity TblTreatment
{
get { return _tblTreatment; }
set
{
if(this.IsDeserializing)
{
SetupSyncTblTreatment(value);
}
else
{
SetSingleRelatedEntityNavigator(value, "TblTreatmentInfos", "TblTreatment", _tblTreatment, true);
}
}
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblTreatmentInfoEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,517 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// 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
/// <summary>Entity class which represents the entity 'TblWaitingList'.<br/><br/></summary>
[Serializable]
public partial class TblWaitingListEntity : CommonEntityBase
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfaces
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
// __LLBLGENPRO_USER_CODE_REGION_START PrivateMembers
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Statics
private static Dictionary<string, string> _customProperties;
private static Dictionary<string, Dictionary<string, string>> _fieldsCustomProperties;
/// <summary>All names of fields mapped onto a relation. Usable for in-memory filtering</summary>
public static partial class MemberNames
{
}
#endregion
/// <summary> Static CTor for setting up custom property hashtables. Is executed before the first instance of this entity class or derived classes is constructed. </summary>
static TblWaitingListEntity()
{
SetupCustomPropertyHashtables();
}
/// <summary> CTor</summary>
public TblWaitingListEntity():base("TblWaitingListEntity")
{
InitClassEmpty(null, null);
}
/// <summary> CTor</summary>
/// <remarks>For framework usage.</remarks>
/// <param name="fields">Fields object to set as the fields for this entity.</param>
public TblWaitingListEntity(IEntityFields2 fields):base("TblWaitingListEntity")
{
InitClassEmpty(null, fields);
}
/// <summary> CTor</summary>
/// <param name="validator">The custom validator object for this TblWaitingListEntity</param>
public TblWaitingListEntity(IValidator validator):base("TblWaitingListEntity")
{
InitClassEmpty(validator, null);
}
/// <summary> CTor</summary>
/// <param name="patientId">PK value for TblWaitingList which data should be fetched into this TblWaitingList object</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblWaitingListEntity(System.String patientId):base("TblWaitingListEntity")
{
InitClassEmpty(null, null);
this.PatientId = patientId;
}
/// <summary> CTor</summary>
/// <param name="patientId">PK value for TblWaitingList which data should be fetched into this TblWaitingList object</param>
/// <param name="validator">The custom validator object for this TblWaitingListEntity</param>
/// <remarks>The entity is not fetched by this constructor. Use a DataAccessAdapter for that.</remarks>
public TblWaitingListEntity(System.String patientId, IValidator validator):base("TblWaitingListEntity")
{
InitClassEmpty(validator, null);
this.PatientId = patientId;
}
/// <summary> Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected TblWaitingListEntity(SerializationInfo info, StreamingContext context) : base(info, context)
{
if(SerializationHelper.Optimization != SerializationOptimization.Fast)
{
this.FixupDeserialization(FieldInfoProviderSingleton.GetInstance());
}
// __LLBLGENPRO_USER_CODE_REGION_START DeserializationConstructor
// __LLBLGENPRO_USER_CODE_REGION_END
}
/// <summary> Sets the related entity property to the entity specified. If the property is a collection, it will add the entity specified to that collection.</summary>
/// <param name="propertyName">Name of the property.</param>
/// <param name="entity">Entity to set as an related entity</param>
/// <remarks>Used by prefetch path logic.</remarks>
protected override void SetRelatedEntityProperty(string propertyName, IEntityCore entity)
{
switch(propertyName)
{
default:
this.OnSetRelatedEntityProperty(propertyName, entity);
break;
}
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
protected override RelationCollection GetRelationsForFieldOfType(string fieldName)
{
return GetRelationsForField(fieldName);
}
/// <summary>Gets the relation objects which represent the relation the fieldName specified is mapped on. </summary>
/// <param name="fieldName">Name of the field mapped onto the relation of which the relation objects have to be obtained.</param>
/// <returns>RelationCollection with relation object(s) which represent the relation the field is maped on</returns>
internal static RelationCollection GetRelationsForField(string fieldName)
{
RelationCollection toReturn = new RelationCollection();
switch(fieldName)
{
default:
break;
}
return toReturn;
}
#if !CF
/// <summary>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</summary>
/// <param name="propertyName">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</param>
/// <returns>true if the relation is single sided / one way (so the opposite relation isn't present), false otherwise</returns>
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
/// <summary> Sets the internal parameter related to the fieldname passed to the instance relatedEntity. </summary>
/// <param name="relatedEntity">Instance to set as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
protected override void SetRelatedEntity(IEntityCore relatedEntity, string fieldName)
{
switch(fieldName)
{
default:
break;
}
}
/// <summary> Unsets the internal parameter related to the fieldname passed to the instance relatedEntity. Reverses the actions taken by SetRelatedEntity() </summary>
/// <param name="relatedEntity">Instance to unset as the related entity of type entityType</param>
/// <param name="fieldName">Name of field mapped onto the relation which resolves in the instance relatedEntity</param>
/// <param name="signalRelatedEntityManyToOne">if set to true it will notify the manytoone side, if applicable.</param>
protected override void UnsetRelatedEntity(IEntityCore relatedEntity, string fieldName, bool signalRelatedEntityManyToOne)
{
switch(fieldName)
{
default:
break;
}
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependingRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary> 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.</summary>
/// <returns>Collection with 0 or more IEntity2 objects, referenced by this entity</returns>
protected override List<IEntity2> GetDependentRelatedEntities()
{
List<IEntity2> toReturn = new List<IEntity2>();
return toReturn;
}
/// <summary>Gets a list of all entity collections stored as member variables in this entity. Only 1:n related collections are returned.</summary>
/// <returns>Collection with 0 or more IEntityCollection2 objects, referenced by this entity</returns>
protected override List<IEntityCollection2> GetMemberEntityCollections()
{
List<IEntityCollection2> toReturn = new List<IEntityCollection2>();
return toReturn;
}
/// <summary>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.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void GetObjectData(SerializationInfo info, StreamingContext context)
{
if (SerializationHelper.Optimization != SerializationOptimization.Fast)
{
}
// __LLBLGENPRO_USER_CODE_REGION_START GetObjectInfo
// __LLBLGENPRO_USER_CODE_REGION_END
base.GetObjectData(info, context);
}
/// <summary>Gets a list of all the EntityRelation objects the type of this instance has.</summary>
/// <returns>A list of all the EntityRelation objects the type of this instance has. Hierarchy relations are excluded.</returns>
protected override List<IEntityRelation> GetAllRelations()
{
return new TblWaitingListRelations().GetAllRelations();
}
/// <summary>Creates a new instance of the factory related to this entity</summary>
protected override IEntityFactory2 CreateEntityFactory()
{
return EntityFactoryCache2.GetEntityFactory(typeof(TblWaitingListEntityFactory));
}
#if !CF
/// <summary>Adds the member collections to the collections queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void AddToMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.AddToMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Gets the member collections queue from the queue (base first)</summary>
/// <param name="collectionsQueue">The collections queue.</param>
protected override void GetFromMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue)
{
base.GetFromMemberEntityCollectionsQueue(collectionsQueue);
}
/// <summary>Determines whether the entity has populated member collections</summary>
/// <returns>true if the entity has populated member collections.</returns>
protected override bool HasPopulatedMemberEntityCollections()
{
bool toReturn = false;
return toReturn ? true : base.HasPopulatedMemberEntityCollections();
}
/// <summary>Creates the member entity collections queue.</summary>
/// <param name="collectionsQueue">The collections queue.</param>
/// <param name="requiredQueue">The required queue.</param>
protected override void CreateMemberEntityCollectionsQueue(Queue<IEntityCollection2> collectionsQueue, Queue<bool> requiredQueue)
{
base.CreateMemberEntityCollectionsQueue(collectionsQueue, requiredQueue);
}
#endif
/// <summary>Gets all related data objects, stored by name. The name is the field name mapped onto the relation for that particular data element.</summary>
/// <returns>Dictionary with per name the related referenced data element, which can be an entity collection or an entity or null</returns>
protected override Dictionary<string, object> GetRelatedData()
{
Dictionary<string, object> toReturn = new Dictionary<string, object>();
return toReturn;
}
/// <summary> Initializes the class members</summary>
private void InitClassMembers()
{
PerformDependencyInjection();
// __LLBLGENPRO_USER_CODE_REGION_START InitClassMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitClassMembersComplete();
}
#region Custom Property Hashtable Setup
/// <summary> Initializes the hashtables for the entity type and entity field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Dictionary<string, string>();
_fieldsCustomProperties = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> fieldHashtable;
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Arv", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("FollowNum", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("LastFolowResult", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("LateTimes", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("PatientId", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("PatientName", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("ReExamDate", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Selected", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("Status", fieldHashtable);
fieldHashtable = new Dictionary<string, string>();
_fieldsCustomProperties.Add("TelephoneNo", fieldHashtable);
}
#endregion
/// <summary> Initializes the class with empty data, as if it is a new Entity.</summary>
/// <param name="validator">The validator object for this TblWaitingListEntity</param>
/// <param name="fields">Fields of this entity</param>
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
/// <summary> The relations object holding all relations of this entity with other entity classes.</summary>
public static TblWaitingListRelations Relations
{
get { return new TblWaitingListRelations(); }
}
/// <summary> The custom properties for this entity type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, string> CustomProperties
{
get { return _customProperties;}
}
/// <summary> The custom properties for the type of this entity instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, string> CustomPropertiesOfType
{
get { return CustomProperties;}
}
/// <summary> The custom properties for the fields of this entity type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Dictionary<string, Dictionary<string, string>> FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary> 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. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[Browsable(false), XmlIgnore]
protected override Dictionary<string, Dictionary<string, string>> FieldsCustomPropertiesOfType
{
get { return FieldsCustomProperties;}
}
/// <summary> The Arv property of the Entity TblWaitingList<br/><br/></summary>
/// <remarks>Mapped on table field: "tblWaitingList"."ARV"<br/>
/// Table field type characteristics (type, precision, scale, length): Boolean, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.Boolean Arv
{
get { return (System.Boolean)GetValue((int)TblWaitingListFieldIndex.Arv, true); }
set { SetValue((int)TblWaitingListFieldIndex.Arv, value); }
}
/// <summary> The FollowNum property of the Entity TblWaitingList<br/><br/></summary>
/// <remarks>Mapped on table field: "tblWaitingList"."FollowNum"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String FollowNum
{
get { return (System.String)GetValue((int)TblWaitingListFieldIndex.FollowNum, true); }
set { SetValue((int)TblWaitingListFieldIndex.FollowNum, value); }
}
/// <summary> The LastFolowResult property of the Entity TblWaitingList<br/><br/></summary>
/// <remarks>Mapped on table field: "tblWaitingList"."lastFolowResult"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String LastFolowResult
{
get { return (System.String)GetValue((int)TblWaitingListFieldIndex.LastFolowResult, true); }
set { SetValue((int)TblWaitingListFieldIndex.LastFolowResult, value); }
}
/// <summary> The LateTimes property of the Entity TblWaitingList<br/><br/></summary>
/// <remarks>Mapped on table field: "tblWaitingList"."LateTimes"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String LateTimes
{
get { return (System.String)GetValue((int)TblWaitingListFieldIndex.LateTimes, true); }
set { SetValue((int)TblWaitingListFieldIndex.LateTimes, value); }
}
/// <summary> The PatientId property of the Entity TblWaitingList<br/><br/></summary>
/// <remarks>Mapped on table field: "tblWaitingList"."PatientID"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 15<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, true, false</remarks>
public virtual System.String PatientId
{
get { return (System.String)GetValue((int)TblWaitingListFieldIndex.PatientId, true); }
set { SetValue((int)TblWaitingListFieldIndex.PatientId, value); }
}
/// <summary> The PatientName property of the Entity TblWaitingList<br/><br/></summary>
/// <remarks>Mapped on table field: "tblWaitingList"."PatientName"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 255<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String PatientName
{
get { return (System.String)GetValue((int)TblWaitingListFieldIndex.PatientName, true); }
set { SetValue((int)TblWaitingListFieldIndex.PatientName, value); }
}
/// <summary> The ReExamDate property of the Entity TblWaitingList<br/><br/></summary>
/// <remarks>Mapped on table field: "tblWaitingList"."ReExamDate"<br/>
/// Table field type characteristics (type, precision, scale, length): Date, 0, 0, 0<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual Nullable<System.DateTime> ReExamDate
{
get { return (Nullable<System.DateTime>)GetValue((int)TblWaitingListFieldIndex.ReExamDate, false); }
set { SetValue((int)TblWaitingListFieldIndex.ReExamDate, value); }
}
/// <summary> The Selected property of the Entity TblWaitingList<br/><br/></summary>
/// <remarks>Mapped on table field: "tblWaitingList"."Selected"<br/>
/// Table field type characteristics (type, precision, scale, length): Boolean, 0, 0, 2<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): false, false, false</remarks>
public virtual System.Boolean Selected
{
get { return (System.Boolean)GetValue((int)TblWaitingListFieldIndex.Selected, true); }
set { SetValue((int)TblWaitingListFieldIndex.Selected, value); }
}
/// <summary> The Status property of the Entity TblWaitingList<br/><br/></summary>
/// <remarks>Mapped on table field: "tblWaitingList"."Status"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 50<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String Status
{
get { return (System.String)GetValue((int)TblWaitingListFieldIndex.Status, true); }
set { SetValue((int)TblWaitingListFieldIndex.Status, value); }
}
/// <summary> The TelephoneNo property of the Entity TblWaitingList<br/><br/></summary>
/// <remarks>Mapped on table field: "tblWaitingList"."TelephoneNo"<br/>
/// Table field type characteristics (type, precision, scale, length): VarWChar, 0, 0, 20<br/>
/// Table field behavior characteristics (is nullable, is PK, is identity): true, false, false</remarks>
public virtual System.String TelephoneNo
{
get { return (System.String)GetValue((int)TblWaitingListFieldIndex.TelephoneNo, true); }
set { SetValue((int)TblWaitingListFieldIndex.TelephoneNo, value); }
}
/// <summary> Gets the type of the hierarchy this entity is in. </summary>
protected override InheritanceHierarchyType LLBLGenProIsInHierarchyOfType
{
get { return InheritanceHierarchyType.None;}
}
/// <summary> Gets or sets a value indicating whether this entity is a subtype</summary>
protected override bool LLBLGenProIsSubType
{
get { return false;}
}
/// <summary>Returns the Datalib.EntityType enum value for this entity.</summary>
[Browsable(false), XmlIgnore]
protected override int LLBLGenProEntityTypeValue
{
get { return (int)Datalib.EntityType.TblWaitingListEntity; }
}
#endregion
#region Custom Entity code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included code
#endregion
}
}

View File

@@ -0,0 +1,811 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using Datalib.EntityClasses;
using Datalib.HelperClasses;
using Datalib.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.FactoryClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>general base class for the generated factories</summary>
[Serializable]
public partial class EntityFactoryBase2<TEntity> : EntityFactoryCore2
where TEntity : EntityBase2, IEntity2
{
private readonly Datalib.EntityType _typeOfEntity;
private readonly bool _isInHierarchy;
/// <summary>CTor</summary>
/// <param name="entityName">Name of the entity.</param>
/// <param name="typeOfEntity">The type of entity.</param>
/// <param name="isInHierarchy">If true, the entity of this factory is in an inheritance hierarchy, false otherwise</param>
public EntityFactoryBase2(string entityName, Datalib.EntityType typeOfEntity, bool isInHierarchy) : base(entityName)
{
_typeOfEntity = typeOfEntity;
_isInHierarchy = isInHierarchy;
}
/// <summary>Creates, using the generated EntityFieldsFactory, the IEntityFields2 object for the entity to create.</summary>
/// <returns>Empty IEntityFields2 object.</returns>
public override IEntityFields2 CreateFields()
{
return EntityFieldsFactory.CreateEntityFieldsObject(_typeOfEntity);
}
/// <summary>Creates a new entity instance using the GeneralEntityFactory in the generated code, using the passed in entitytype value</summary>
/// <param name="entityTypeValue">The entity type value of the entity to create an instance for.</param>
/// <returns>new IEntity instance</returns>
public override IEntity2 CreateEntityFromEntityTypeValue(int entityTypeValue)
{
return GeneralEntityFactory.Create((Datalib.EntityType)entityTypeValue);
}
/// <summary>Creates the relations collection to the entity to join all targets so this entity can be fetched. </summary>
/// <param name="objectAlias">The object alias to use for the elements in the relations.</param>
/// <returns>null if the entity isn't in a hierarchy of type TargetPerEntity, otherwise the relations collection needed to join all targets together to fetch all subtypes of this entity and this entity itself</returns>
public override IRelationCollection CreateHierarchyRelations(string objectAlias)
{
return InheritanceInfoProviderSingleton.GetInstance().GetHierarchyRelations(this.ForEntityName, objectAlias);
}
/// <summary>This method retrieves, using the InheritanceInfoprovider, the factory for the entity represented by the values passed in.</summary>
/// <param name="fieldValues">Field values read from the db, to determine which factory to return, based on the field values passed in.</param>
/// <param name="entityFieldStartIndexesPerEntity">indexes into values where per entity type their own fields start.</param>
/// <returns>the factory for the entity which is represented by the values passed in.</returns>
public override IEntityFactory2 GetEntityFactory(object[] fieldValues, Dictionary<string, int> entityFieldStartIndexesPerEntity)
{
IEntityFactory2 toReturn = (IEntityFactory2)InheritanceInfoProviderSingleton.GetInstance().GetEntityFactory(this.ForEntityName, fieldValues, entityFieldStartIndexesPerEntity);
if(toReturn == null)
{
toReturn = this;
}
return toReturn;
}
/// <summary>Gets a predicateexpression which filters on the entity with type belonging to this factory.</summary>
/// <param name="negate">Flag to produce a NOT filter, (true), or a normal filter (false). </param>
/// <param name="objectAlias">The object alias to use for the predicate(s).</param>
/// <returns>ready to use predicateexpression, or an empty predicate expression if the belonging entity isn't a hierarchical type.</returns>
public override IPredicateExpression GetEntityTypeFilter(bool negate, string objectAlias)
{
return InheritanceInfoProviderSingleton.GetInstance().GetEntityTypeFilter(this.ForEntityName, objectAlias, negate);
}
/// <summary>Creates a new generic EntityCollection(Of T) for the entity which this factory belongs to.</summary>
/// <returns>ready to use generic EntityCollection(Of T) with this factory set as the factory</returns>
public override IEntityCollection2 CreateEntityCollection()
{
return new EntityCollection<TEntity>(this);
}
/// <summary>Creates the hierarchy fields for the entity to which this factory belongs.</summary>
/// <returns>IEntityFields2 object with the fields of all the entities in teh hierarchy of this entity or the fields of this entity if the entity isn't in a hierarchy.</returns>
public override IEntityFields2 CreateHierarchyFields()
{
return _isInHierarchy ? new EntityFields2(InheritanceInfoProviderSingleton.GetInstance().GetHierarchyFields(this.ForEntityName), InheritanceInfoProviderSingleton.GetInstance(), null) : base.CreateHierarchyFields();
}
}
/// <summary>Factory to create new, empty TblAgeGroupEntity objects.</summary>
[Serializable]
public partial class TblAgeGroupEntityFactory : EntityFactoryBase2<TblAgeGroupEntity> {
/// <summary>CTor</summary>
public TblAgeGroupEntityFactory() : base("TblAgeGroupEntity", Datalib.EntityType.TblAgeGroupEntity, false) { }
/// <summary>Creates a new TblAgeGroupEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblAgeGroupEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblAgeGroupUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblAgencyEntity objects.</summary>
[Serializable]
public partial class TblAgencyEntityFactory : EntityFactoryBase2<TblAgencyEntity> {
/// <summary>CTor</summary>
public TblAgencyEntityFactory() : base("TblAgencyEntity", Datalib.EntityType.TblAgencyEntity, false) { }
/// <summary>Creates a new TblAgencyEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblAgencyEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblAgencyUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblChildEntity objects.</summary>
[Serializable]
public partial class TblChildEntityFactory : EntityFactoryBase2<TblChildEntity> {
/// <summary>CTor</summary>
public TblChildEntityFactory() : base("TblChildEntity", Datalib.EntityType.TblChildEntity, false) { }
/// <summary>Creates a new TblChildEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblChildEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblChildUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblClinicInfoEntity objects.</summary>
[Serializable]
public partial class TblClinicInfoEntityFactory : EntityFactoryBase2<TblClinicInfoEntity> {
/// <summary>CTor</summary>
public TblClinicInfoEntityFactory() : base("TblClinicInfoEntity", Datalib.EntityType.TblClinicInfoEntity, false) { }
/// <summary>Creates a new TblClinicInfoEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblClinicInfoEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblClinicInfoUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblCommuneEntity objects.</summary>
[Serializable]
public partial class TblCommuneEntityFactory : EntityFactoryBase2<TblCommuneEntity> {
/// <summary>CTor</summary>
public TblCommuneEntityFactory() : base("TblCommuneEntity", Datalib.EntityType.TblCommuneEntity, false) { }
/// <summary>Creates a new TblCommuneEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblCommuneEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblCommuneUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblDiaryEntity objects.</summary>
[Serializable]
public partial class TblDiaryEntityFactory : EntityFactoryBase2<TblDiaryEntity> {
/// <summary>CTor</summary>
public TblDiaryEntityFactory() : base("TblDiaryEntity", Datalib.EntityType.TblDiaryEntity, false) { }
/// <summary>Creates a new TblDiaryEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblDiaryEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblDiaryUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblDistrictEntity objects.</summary>
[Serializable]
public partial class TblDistrictEntityFactory : EntityFactoryBase2<TblDistrictEntity> {
/// <summary>CTor</summary>
public TblDistrictEntityFactory() : base("TblDistrictEntity", Datalib.EntityType.TblDistrictEntity, false) { }
/// <summary>Creates a new TblDistrictEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblDistrictEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblDistrictUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblExaminationInfoEntity objects.</summary>
[Serializable]
public partial class TblExaminationInfoEntityFactory : EntityFactoryBase2<TblExaminationInfoEntity> {
/// <summary>CTor</summary>
public TblExaminationInfoEntityFactory() : base("TblExaminationInfoEntity", Datalib.EntityType.TblExaminationInfoEntity, false) { }
/// <summary>Creates a new TblExaminationInfoEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblExaminationInfoEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblExaminationInfoUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblPatientEntity objects.</summary>
[Serializable]
public partial class TblPatientEntityFactory : EntityFactoryBase2<TblPatientEntity> {
/// <summary>CTor</summary>
public TblPatientEntityFactory() : base("TblPatientEntity", Datalib.EntityType.TblPatientEntity, false) { }
/// <summary>Creates a new TblPatientEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblPatientEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblPatientUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblPreClinicsInfoEntity objects.</summary>
[Serializable]
public partial class TblPreClinicsInfoEntityFactory : EntityFactoryBase2<TblPreClinicsInfoEntity> {
/// <summary>CTor</summary>
public TblPreClinicsInfoEntityFactory() : base("TblPreClinicsInfoEntity", Datalib.EntityType.TblPreClinicsInfoEntity, false) { }
/// <summary>Creates a new TblPreClinicsInfoEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblPreClinicsInfoEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblPreClinicsInfoUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblPregnanceInfoEntity objects.</summary>
[Serializable]
public partial class TblPregnanceInfoEntityFactory : EntityFactoryBase2<TblPregnanceInfoEntity> {
/// <summary>CTor</summary>
public TblPregnanceInfoEntityFactory() : base("TblPregnanceInfoEntity", Datalib.EntityType.TblPregnanceInfoEntity, false) { }
/// <summary>Creates a new TblPregnanceInfoEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblPregnanceInfoEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblPregnanceInfoUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblProvinceEntity objects.</summary>
[Serializable]
public partial class TblProvinceEntityFactory : EntityFactoryBase2<TblProvinceEntity> {
/// <summary>CTor</summary>
public TblProvinceEntityFactory() : base("TblProvinceEntity", Datalib.EntityType.TblProvinceEntity, false) { }
/// <summary>Creates a new TblProvinceEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblProvinceEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblProvinceUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblReferralFromPlaceEntity objects.</summary>
[Serializable]
public partial class TblReferralFromPlaceEntityFactory : EntityFactoryBase2<TblReferralFromPlaceEntity> {
/// <summary>CTor</summary>
public TblReferralFromPlaceEntityFactory() : base("TblReferralFromPlaceEntity", Datalib.EntityType.TblReferralFromPlaceEntity, false) { }
/// <summary>Creates a new TblReferralFromPlaceEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblReferralFromPlaceEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblReferralFromPlaceUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblReferralsToEntity objects.</summary>
[Serializable]
public partial class TblReferralsToEntityFactory : EntityFactoryBase2<TblReferralsToEntity> {
/// <summary>CTor</summary>
public TblReferralsToEntityFactory() : base("TblReferralsToEntity", Datalib.EntityType.TblReferralsToEntity, false) { }
/// <summary>Creates a new TblReferralsToEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblReferralsToEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblReferralsToUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblReferraltoServiceEntity objects.</summary>
[Serializable]
public partial class TblReferraltoServiceEntityFactory : EntityFactoryBase2<TblReferraltoServiceEntity> {
/// <summary>CTor</summary>
public TblReferraltoServiceEntityFactory() : base("TblReferraltoServiceEntity", Datalib.EntityType.TblReferraltoServiceEntity, false) { }
/// <summary>Creates a new TblReferraltoServiceEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblReferraltoServiceEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblReferraltoServiceUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblRegimenEntity objects.</summary>
[Serializable]
public partial class TblRegimenEntityFactory : EntityFactoryBase2<TblRegimenEntity> {
/// <summary>CTor</summary>
public TblRegimenEntityFactory() : base("TblRegimenEntity", Datalib.EntityType.TblRegimenEntity, false) { }
/// <summary>Creates a new TblRegimenEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblRegimenEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblRegimenUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblRegimenStopReasonEntity objects.</summary>
[Serializable]
public partial class TblRegimenStopReasonEntityFactory : EntityFactoryBase2<TblRegimenStopReasonEntity> {
/// <summary>CTor</summary>
public TblRegimenStopReasonEntityFactory() : base("TblRegimenStopReasonEntity", Datalib.EntityType.TblRegimenStopReasonEntity, false) { }
/// <summary>Creates a new TblRegimenStopReasonEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblRegimenStopReasonEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblRegimenStopReasonUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblServiceEntity objects.</summary>
[Serializable]
public partial class TblServiceEntityFactory : EntityFactoryBase2<TblServiceEntity> {
/// <summary>CTor</summary>
public TblServiceEntityFactory() : base("TblServiceEntity", Datalib.EntityType.TblServiceEntity, false) { }
/// <summary>Creates a new TblServiceEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblServiceEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblServiceUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblTestEntity objects.</summary>
[Serializable]
public partial class TblTestEntityFactory : EntityFactoryBase2<TblTestEntity> {
/// <summary>CTor</summary>
public TblTestEntityFactory() : base("TblTestEntity", Datalib.EntityType.TblTestEntity, false) { }
/// <summary>Creates a new TblTestEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblTestEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblTestUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblTreatmentEntity objects.</summary>
[Serializable]
public partial class TblTreatmentEntityFactory : EntityFactoryBase2<TblTreatmentEntity> {
/// <summary>CTor</summary>
public TblTreatmentEntityFactory() : base("TblTreatmentEntity", Datalib.EntityType.TblTreatmentEntity, false) { }
/// <summary>Creates a new TblTreatmentEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblTreatmentEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblTreatmentUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblTreatmentInfoEntity objects.</summary>
[Serializable]
public partial class TblTreatmentInfoEntityFactory : EntityFactoryBase2<TblTreatmentInfoEntity> {
/// <summary>CTor</summary>
public TblTreatmentInfoEntityFactory() : base("TblTreatmentInfoEntity", Datalib.EntityType.TblTreatmentInfoEntity, false) { }
/// <summary>Creates a new TblTreatmentInfoEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblTreatmentInfoEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblTreatmentInfoUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty TblWaitingListEntity objects.</summary>
[Serializable]
public partial class TblWaitingListEntityFactory : EntityFactoryBase2<TblWaitingListEntity> {
/// <summary>CTor</summary>
public TblWaitingListEntityFactory() : base("TblWaitingListEntity", Datalib.EntityType.TblWaitingListEntity, false) { }
/// <summary>Creates a new TblWaitingListEntity instance but uses a special constructor which will set the Fields object of the new IEntity2 instance to the passed in fields object.</summary>
/// <param name="fields">Populated IEntityFields2 object for the new IEntity2 to create</param>
/// <returns>Fully created and populated (due to the IEntityFields2 object) IEntity2 object</returns>
public override IEntity2 Create(IEntityFields2 fields) {
IEntity2 toReturn = new TblWaitingListEntity(fields);
// __LLBLGENPRO_USER_CODE_REGION_START CreateNewTblWaitingListUsingFields
// __LLBLGENPRO_USER_CODE_REGION_END
return toReturn;
}
#region Included Code
#endregion
}
/// <summary>Factory to create new, empty Entity objects based on the entity type specified. Uses entity specific factory objects</summary>
[Serializable]
public partial class GeneralEntityFactory
{
/// <summary>Creates a new, empty Entity object of the type specified</summary>
/// <param name="entityTypeToCreate">The entity type to create.</param>
/// <returns>A new, empty Entity object.</returns>
public static IEntity2 Create(Datalib.EntityType entityTypeToCreate)
{
IEntityFactory2 factoryToUse = null;
switch(entityTypeToCreate)
{
case Datalib.EntityType.TblAgeGroupEntity:
factoryToUse = new TblAgeGroupEntityFactory();
break;
case Datalib.EntityType.TblAgencyEntity:
factoryToUse = new TblAgencyEntityFactory();
break;
case Datalib.EntityType.TblChildEntity:
factoryToUse = new TblChildEntityFactory();
break;
case Datalib.EntityType.TblClinicInfoEntity:
factoryToUse = new TblClinicInfoEntityFactory();
break;
case Datalib.EntityType.TblCommuneEntity:
factoryToUse = new TblCommuneEntityFactory();
break;
case Datalib.EntityType.TblDiaryEntity:
factoryToUse = new TblDiaryEntityFactory();
break;
case Datalib.EntityType.TblDistrictEntity:
factoryToUse = new TblDistrictEntityFactory();
break;
case Datalib.EntityType.TblExaminationInfoEntity:
factoryToUse = new TblExaminationInfoEntityFactory();
break;
case Datalib.EntityType.TblPatientEntity:
factoryToUse = new TblPatientEntityFactory();
break;
case Datalib.EntityType.TblPreClinicsInfoEntity:
factoryToUse = new TblPreClinicsInfoEntityFactory();
break;
case Datalib.EntityType.TblPregnanceInfoEntity:
factoryToUse = new TblPregnanceInfoEntityFactory();
break;
case Datalib.EntityType.TblProvinceEntity:
factoryToUse = new TblProvinceEntityFactory();
break;
case Datalib.EntityType.TblReferralFromPlaceEntity:
factoryToUse = new TblReferralFromPlaceEntityFactory();
break;
case Datalib.EntityType.TblReferralsToEntity:
factoryToUse = new TblReferralsToEntityFactory();
break;
case Datalib.EntityType.TblReferraltoServiceEntity:
factoryToUse = new TblReferraltoServiceEntityFactory();
break;
case Datalib.EntityType.TblRegimenEntity:
factoryToUse = new TblRegimenEntityFactory();
break;
case Datalib.EntityType.TblRegimenStopReasonEntity:
factoryToUse = new TblRegimenStopReasonEntityFactory();
break;
case Datalib.EntityType.TblServiceEntity:
factoryToUse = new TblServiceEntityFactory();
break;
case Datalib.EntityType.TblTestEntity:
factoryToUse = new TblTestEntityFactory();
break;
case Datalib.EntityType.TblTreatmentEntity:
factoryToUse = new TblTreatmentEntityFactory();
break;
case Datalib.EntityType.TblTreatmentInfoEntity:
factoryToUse = new TblTreatmentInfoEntityFactory();
break;
case Datalib.EntityType.TblWaitingListEntity:
factoryToUse = new TblWaitingListEntityFactory();
break;
}
IEntity2 toReturn = null;
if(factoryToUse != null)
{
toReturn = factoryToUse.Create();
}
return toReturn;
}
}
/// <summary>Class which is used to obtain the entity factory based on the .NET type of the entity. </summary>
[Serializable]
public static class EntityFactoryFactory
{
private static Dictionary<Type, IEntityFactory2> _factoryPerType = new Dictionary<Type, IEntityFactory2>();
/// <summary>Initializes the <see cref="EntityFactoryFactory"/> class.</summary>
static EntityFactoryFactory()
{
Array entityTypeValues = Enum.GetValues(typeof(Datalib.EntityType));
foreach(int entityTypeValue in entityTypeValues)
{
IEntity2 dummy = GeneralEntityFactory.Create((Datalib.EntityType)entityTypeValue);
_factoryPerType.Add(dummy.GetType(), dummy.GetEntityFactory());
}
}
/// <summary>Gets the factory of the entity with the .NET type specified</summary>
/// <param name="typeOfEntity">The type of entity.</param>
/// <returns>factory to use or null if not found</returns>
public static IEntityFactory2 GetFactory(Type typeOfEntity)
{
IEntityFactory2 toReturn = null;
_factoryPerType.TryGetValue(typeOfEntity, out toReturn);
return toReturn;
}
/// <summary>Gets the factory of the entity with the Datalib.EntityType specified</summary>
/// <param name="typeOfEntity">The type of entity.</param>
/// <returns>factory to use or null if not found</returns>
public static IEntityFactory2 GetFactory(Datalib.EntityType typeOfEntity)
{
return GetFactory(GeneralEntityFactory.Create(typeOfEntity).GetType());
}
}
/// <summary>Element creator for creating project elements from somewhere else, like inside Linq providers.</summary>
public class ElementCreator : ElementCreatorBase, IElementCreator2
{
/// <summary>Gets the factory of the Entity type with the Datalib.EntityType value passed in</summary>
/// <param name="entityTypeValue">The entity type value.</param>
/// <returns>the entity factory of the entity type or null if not found</returns>
public IEntityFactory2 GetFactory(int entityTypeValue)
{
return (IEntityFactory2)this.GetFactoryImpl(entityTypeValue);
}
/// <summary>Gets the factory of the Entity type with the .NET type passed in</summary>
/// <param name="typeOfEntity">The type of entity.</param>
/// <returns>the entity factory of the entity type or null if not found</returns>
public IEntityFactory2 GetFactory(Type typeOfEntity)
{
return (IEntityFactory2)this.GetFactoryImpl(typeOfEntity);
}
/// <summary>Creates a new resultset fields object with the number of field slots reserved as specified</summary>
/// <param name="numberOfFields">The number of fields.</param>
/// <returns>ready to use resultsetfields object</returns>
public IEntityFields2 CreateResultsetFields(int numberOfFields)
{
return new ResultsetFields(numberOfFields);
}
/// <summary>Obtains the inheritance info provider instance from the singleton </summary>
/// <returns>The singleton instance of the inheritance info provider</returns>
public override IInheritanceInfoProvider ObtainInheritanceInfoProviderInstance()
{
return InheritanceInfoProviderSingleton.GetInstance();
}
/// <summary>Creates a new dynamic relation instance</summary>
/// <param name="leftOperand">The left operand.</param>
/// <returns>ready to use dynamic relation</returns>
public override IDynamicRelation CreateDynamicRelation(DerivedTableDefinition leftOperand)
{
return new DynamicRelation(leftOperand);
}
/// <summary>Creates a new dynamic relation instance</summary>
/// <param name="leftOperand">The left operand.</param>
/// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param>
/// <param name="rightOperand">The right operand.</param>
/// <param name="onClause">The on clause for the join.</param>
/// <returns>ready to use dynamic relation</returns>
public override IDynamicRelation CreateDynamicRelation(DerivedTableDefinition leftOperand, JoinHint joinType, DerivedTableDefinition rightOperand, IPredicate onClause)
{
return new DynamicRelation(leftOperand, joinType, rightOperand, onClause);
}
/// <summary>Creates a new dynamic relation instance</summary>
/// <param name="leftOperand">The left operand.</param>
/// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param>
/// <param name="rightOperand">The right operand.</param>
/// <param name="aliasLeftOperand">The alias of the left operand. If you don't want to / need to alias the right operand (only alias if you have to), specify string.Empty.</param>
/// <param name="onClause">The on clause for the join.</param>
/// <returns>ready to use dynamic relation</returns>
public override IDynamicRelation CreateDynamicRelation(IEntityFieldCore leftOperand, JoinHint joinType, DerivedTableDefinition rightOperand, string aliasLeftOperand, IPredicate onClause)
{
return new DynamicRelation(leftOperand, joinType, rightOperand, aliasLeftOperand, onClause);
}
/// <summary>Creates a new dynamic relation instance</summary>
/// <param name="leftOperand">The left operand.</param>
/// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param>
/// <param name="rightOperandEntityName">Name of the entity, which is used as the right operand.</param>
/// <param name="aliasRightOperand">The alias of the right operand. If you don't want to / need to alias the right operand (only alias if you have to), specify string.Empty.</param>
/// <param name="onClause">The on clause for the join.</param>
/// <returns>ready to use dynamic relation</returns>
public override IDynamicRelation CreateDynamicRelation(DerivedTableDefinition leftOperand, JoinHint joinType, string rightOperandEntityName, string aliasRightOperand, IPredicate onClause)
{
return new DynamicRelation(leftOperand, joinType, (Datalib.EntityType)Enum.Parse(typeof(Datalib.EntityType), rightOperandEntityName, false), aliasRightOperand, onClause);
}
/// <summary>Creates a new dynamic relation instance</summary>
/// <param name="leftOperandEntityName">Name of the entity which is used as the left operand.</param>
/// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param>
/// <param name="rightOperandEntityName">Name of the entity, which is used as the right operand.</param>
/// <param name="aliasLeftOperand">The alias of the left operand. If you don't want to / need to alias the right operand (only alias if you have to), specify string.Empty.</param>
/// <param name="aliasRightOperand">The alias of the right operand. If you don't want to / need to alias the right operand (only alias if you have to), specify string.Empty.</param>
/// <param name="onClause">The on clause for the join.</param>
/// <returns>ready to use dynamic relation</returns>
public override IDynamicRelation CreateDynamicRelation(string leftOperandEntityName, JoinHint joinType, string rightOperandEntityName, string aliasLeftOperand, string aliasRightOperand, IPredicate onClause)
{
return new DynamicRelation((Datalib.EntityType)Enum.Parse(typeof(Datalib.EntityType), leftOperandEntityName, false), joinType, (Datalib.EntityType)Enum.Parse(typeof(Datalib.EntityType), rightOperandEntityName, false), aliasLeftOperand, aliasRightOperand, onClause);
}
/// <summary>Creates a new dynamic relation instance</summary>
/// <param name="leftOperand">The left operand.</param>
/// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param>
/// <param name="rightOperandEntityName">Name of the entity, which is used as the right operand.</param>
/// <param name="aliasLeftOperand">The alias of the left operand. If you don't want to / need to alias the right operand (only alias if you have to), specify string.Empty.</param>
/// <param name="aliasRightOperand">The alias of the right operand. If you don't want to / need to alias the right operand (only alias if you have to), specify string.Empty.</param>
/// <param name="onClause">The on clause for the join.</param>
/// <returns>ready to use dynamic relation</returns>
public override IDynamicRelation CreateDynamicRelation(IEntityFieldCore leftOperand, JoinHint joinType, string rightOperandEntityName, string aliasLeftOperand, string aliasRightOperand, IPredicate onClause)
{
return new DynamicRelation(leftOperand, joinType, (Datalib.EntityType)Enum.Parse(typeof(Datalib.EntityType), rightOperandEntityName, false), aliasLeftOperand, aliasRightOperand, onClause);
}
/// <summary>Implementation of the routine which gets the factory of the Entity type with the Datalib.EntityType value passed in</summary>
/// <param name="entityTypeValue">The entity type value.</param>
/// <returns>the entity factory of the entity type or null if not found</returns>
protected override IEntityFactoryCore GetFactoryImpl(int entityTypeValue)
{
return EntityFactoryFactory.GetFactory((Datalib.EntityType)entityTypeValue);
}
/// <summary>Implementation of the routine which gets the factory of the Entity type with the .NET type passed in</summary>
/// <param name="typeOfEntity">The type of entity.</param>
/// <returns>the entity factory of the entity type or null if not found</returns>
protected override IEntityFactoryCore GetFactoryImpl(Type typeOfEntity)
{
return EntityFactoryFactory.GetFactory(typeOfEntity);
}
}
}

View File

@@ -0,0 +1,42 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using Datalib;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.FactoryClasses
{
/// <summary>Factory class for IEntityField2 instances, used in IEntityFields2 instances.</summary>
public static partial class EntityFieldFactory
{
/// <summary>Creates a new IEntityField2 instance for usage in the EntityFields object for the entity related to the field index specified.</summary>
/// <param name="fieldIndex">The field which IEntityField2 instance should be created</param>
/// <returns>The IEntityField2 instance for the field specified in fieldIndex</returns>
public static IEntityField2 Create(Enum fieldIndex)
{
return new EntityField2(FieldInfoProviderSingleton.GetInstance().GetFieldInfo(fieldIndex));
}
/// <summary>Creates a new IEntityField2 instance, which represents the field objectName.fieldName</summary>
/// <param name="objectName">the name of the object the field belongs to, like CustomerEntity or OrdersTypedView</param>
/// <param name="fieldName">the name of the field to create</param>
public static IEntityField2 Create(string objectName, string fieldName)
{
return new EntityField2(FieldInfoProviderSingleton.GetInstance().GetFieldInfo(objectName, fieldName));
}
#region Included Code
#endregion
}
}

View File

@@ -0,0 +1,53 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using Datalib;
using Datalib.HelperClasses;
using System.Collections.Generic;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.FactoryClasses
{
/// <summary>Generates IEntityFields2 instances for different kind of Entities.</summary>
public static partial class EntityFieldsFactory
{
private static readonly Dictionary<Datalib.EntityType, string> _entityTypeNamesCache = new Dictionary<Datalib.EntityType, string>();
/// <summary>static ctor which initializes the static entity type cache.</summary>
static EntityFieldsFactory()
{
foreach(Datalib.EntityType value in Enum.GetValues(typeof(Datalib.EntityType)))
{
_entityTypeNamesCache.Add(value, Enum.GetName(typeof(Datalib.EntityType), value));
}
}
/// <summary>General factory entrance method which will return an EntityFields2 object with the format generated by the factory specified</summary>
/// <param name="relatedEntityType">The type of entity the fields are for</param>
/// <returns>The IEntityFields instance requested</returns>
public static IEntityFields2 CreateEntityFieldsObject(Datalib.EntityType relatedEntityType)
{
return FieldInfoProviderSingleton.GetInstance().GetEntityFields(InheritanceInfoProviderSingleton.GetInstance(), _entityTypeNamesCache[relatedEntityType]);
}
/// <summary>General method which will return an array of IEntityFieldCore objects, used by the InheritanceInfoProvider. Only the fields defined in the entity are returned, no inherited fields.</summary>
/// <param name="entityName">the name of the entity to get the fields for. Example: "CustomerEntity"</param>
/// <returns>array of IEntityFieldCore fields, defined in the entity with the name specified</returns>
internal static IEntityFieldCore[] CreateFields(string entityName)
{
return FieldInfoProviderSingleton.GetInstance().GetEntityFieldsArray(entityName);
}
#region Included Code
#endregion
}
}

View File

@@ -0,0 +1,244 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
//////////////////////////////////////////////////////////////
using System;
using System.Linq;
using Datalib.EntityClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
using SD.LLBLGen.Pro.QuerySpec;
namespace Datalib.FactoryClasses
{
/// <summary>Factory class to produce DynamicQuery instances and EntityQuery instances</summary>
public partial class QueryFactory
{
private int _aliasCounter = 0;
/// <summary>Creates a new DynamicQuery instance with no alias set.</summary>
/// <returns>Ready to use DynamicQuery instance</returns>
public DynamicQuery Create()
{
return Create(string.Empty);
}
/// <summary>Creates a new DynamicQuery instance with the alias specified as the alias set.</summary>
/// <param name="alias">The alias.</param>
/// <returns>Ready to use DynamicQuery instance</returns>
public DynamicQuery Create(string alias)
{
return new DynamicQuery(new ElementCreator(), alias, this.GetNextAliasCounterValue());
}
/// <summary>Creates a new DynamicQuery which wraps the specified TableValuedFunction call</summary>
/// <param name="toWrap">The table valued function call to wrap.</param>
/// <returns>toWrap wrapped in a DynamicQuery.</returns>
public DynamicQuery Create(TableValuedFunctionCall toWrap)
{
return this.Create().From(new TvfCallWrapper(toWrap)).Select(toWrap.GetFieldsAsArray().Select(f => this.Field(toWrap.Alias, f.Alias)).ToArray());
}
/// <summary>Creates a new EntityQuery for the entity of the type specified with no alias set.</summary>
/// <typeparam name="TEntity">The type of the entity to produce the query for.</typeparam>
/// <returns>ready to use EntityQuery instance</returns>
public EntityQuery<TEntity> Create<TEntity>()
where TEntity : IEntityCore
{
return Create<TEntity>(string.Empty);
}
/// <summary>Creates a new EntityQuery for the entity of the type specified with the alias specified as the alias set.</summary>
/// <typeparam name="TEntity">The type of the entity to produce the query for.</typeparam>
/// <param name="alias">The alias.</param>
/// <returns>ready to use EntityQuery instance</returns>
public EntityQuery<TEntity> Create<TEntity>(string alias)
where TEntity : IEntityCore
{
return new EntityQuery<TEntity>(new ElementCreator(), alias, this.GetNextAliasCounterValue());
}
/// <summary>Creates a new field object with the name specified and of resulttype 'object'. Used for referring to aliased fields in another projection.</summary>
/// <param name="fieldName">Name of the field.</param>
/// <returns>Ready to use field object</returns>
public EntityField2 Field(string fieldName)
{
return Field<object>(string.Empty, fieldName);
}
/// <summary>Creates a new field object with the name specified and of resulttype 'object'. Used for referring to aliased fields in another projection.</summary>
/// <param name="targetAlias">The alias of the table/query to target.</param>
/// <param name="fieldName">Name of the field.</param>
/// <returns>Ready to use field object</returns>
public EntityField2 Field(string targetAlias, string fieldName)
{
return Field<object>(targetAlias, fieldName);
}
/// <summary>Creates a new field object with the name specified and of resulttype 'TValue'. Used for referring to aliased fields in another projection.</summary>
/// <typeparam name="TValue">The type of the value represented by the field.</typeparam>
/// <param name="fieldName">Name of the field.</param>
/// <returns>Ready to use field object</returns>
public EntityField2 Field<TValue>(string fieldName)
{
return Field<TValue>(string.Empty, fieldName);
}
/// <summary>Creates a new field object with the name specified and of resulttype 'TValue'. Used for referring to aliased fields in another projection.</summary>
/// <typeparam name="TValue">The type of the value.</typeparam>
/// <param name="targetAlias">The alias of the table/query to target.</param>
/// <param name="fieldName">Name of the field.</param>
/// <returns>Ready to use field object</returns>
public EntityField2 Field<TValue>(string targetAlias, string fieldName)
{
return new EntityField2(fieldName, targetAlias, typeof(TValue));
}
/// <summary>Gets the next alias counter value to produce artifical aliases with</summary>
private int GetNextAliasCounterValue()
{
_aliasCounter++;
return _aliasCounter;
}
/// <summary>Creates and returns a new EntityQuery for the TblAgeGroup entity</summary>
public EntityQuery<TblAgeGroupEntity> TblAgeGroup
{
get { return Create<TblAgeGroupEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblAgency entity</summary>
public EntityQuery<TblAgencyEntity> TblAgency
{
get { return Create<TblAgencyEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblChild entity</summary>
public EntityQuery<TblChildEntity> TblChild
{
get { return Create<TblChildEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblClinicInfo entity</summary>
public EntityQuery<TblClinicInfoEntity> TblClinicInfo
{
get { return Create<TblClinicInfoEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblCommune entity</summary>
public EntityQuery<TblCommuneEntity> TblCommune
{
get { return Create<TblCommuneEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblDiary entity</summary>
public EntityQuery<TblDiaryEntity> TblDiary
{
get { return Create<TblDiaryEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblDistrict entity</summary>
public EntityQuery<TblDistrictEntity> TblDistrict
{
get { return Create<TblDistrictEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblExaminationInfo entity</summary>
public EntityQuery<TblExaminationInfoEntity> TblExaminationInfo
{
get { return Create<TblExaminationInfoEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblPatient entity</summary>
public EntityQuery<TblPatientEntity> TblPatient
{
get { return Create<TblPatientEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblPreClinicsInfo entity</summary>
public EntityQuery<TblPreClinicsInfoEntity> TblPreClinicsInfo
{
get { return Create<TblPreClinicsInfoEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblPregnanceInfo entity</summary>
public EntityQuery<TblPregnanceInfoEntity> TblPregnanceInfo
{
get { return Create<TblPregnanceInfoEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblProvince entity</summary>
public EntityQuery<TblProvinceEntity> TblProvince
{
get { return Create<TblProvinceEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblReferralFromPlace entity</summary>
public EntityQuery<TblReferralFromPlaceEntity> TblReferralFromPlace
{
get { return Create<TblReferralFromPlaceEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblReferralsTo entity</summary>
public EntityQuery<TblReferralsToEntity> TblReferralsTo
{
get { return Create<TblReferralsToEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblReferraltoService entity</summary>
public EntityQuery<TblReferraltoServiceEntity> TblReferraltoService
{
get { return Create<TblReferraltoServiceEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblRegimen entity</summary>
public EntityQuery<TblRegimenEntity> TblRegimen
{
get { return Create<TblRegimenEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblRegimenStopReason entity</summary>
public EntityQuery<TblRegimenStopReasonEntity> TblRegimenStopReason
{
get { return Create<TblRegimenStopReasonEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblService entity</summary>
public EntityQuery<TblServiceEntity> TblService
{
get { return Create<TblServiceEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblTest entity</summary>
public EntityQuery<TblTestEntity> TblTest
{
get { return Create<TblTestEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblTreatment entity</summary>
public EntityQuery<TblTreatmentEntity> TblTreatment
{
get { return Create<TblTreatmentEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblTreatmentInfo entity</summary>
public EntityQuery<TblTreatmentInfoEntity> TblTreatmentInfo
{
get { return Create<TblTreatmentInfoEntity>(); }
}
/// <summary>Creates and returns a new EntityQuery for the TblWaitingList entity</summary>
public EntityQuery<TblWaitingListEntity> TblWaitingList
{
get { return Create<TblWaitingListEntity>(); }
}
}
}

View File

@@ -0,0 +1,107 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
#if !CF
using System.Runtime.Serialization;
#endif
using System.Xml.Serialization;
using System.Xml;
using System.Xml.Schema;
using Datalib.EntityClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.HelperClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>EntityCollection implementation which is used for backwards compatibility and for design time databinding. This EntityCollection is an EntityCollection(Of EntityBase2)
/// </summary>
[Serializable]
public partial class EntityCollection : EntityCollectionNonGeneric
{
/// <summary>CTor</summary>
public EntityCollection():base()
{
}
/// <summary>CTor</summary>
/// <param name="entityFactoryToUse">The entity factory object to use when this collection has to construct new objects.</param>
public EntityCollection(IEntityFactory2 entityFactoryToUse):base(entityFactoryToUse)
{
}
/// <summary>Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected EntityCollection(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
#region Custom EntityCollection code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCollectionCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included Code
#endregion
}
/// <summary>Generic entity collection class which replaces the original generated, non strongly typed EntityCollection variant.</summary>
/// <remarks>Use the generated, non-generic EntityCollection class for design-time databinding for winforms, as winforms doesn't support
/// design time databinding (runtime-databinding works fine) with generic classes</remarks>
[Serializable]
public partial class EntityCollection<TEntity> : EntityCollectionBase2<TEntity>
where TEntity : EntityBase2, IEntity2
{
/// <summary>CTor which determines the factory to use from the generic type argument, unless TEntity is an abstract entity. If possible use the ctor which accepts a factory</summary>
public EntityCollection() : base( (IEntityFactory2)null )
{
}
/// <summary>CTor</summary>
/// <param name="entityFactoryToUse">The entity factory object to use when this collection has to construct new objects.</param>
public EntityCollection( IEntityFactory2 entityFactoryToUse) : base( entityFactoryToUse )
{
}
/// <summary>CTor</summary>
/// <param name="initialContents">initial contents for this collection</param>
public EntityCollection(IEnumerable<TEntity> initialContents ) : base( initialContents )
{
}
/// <summary>Protected CTor for deserialization</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected EntityCollection( SerializationInfo info, StreamingContext context) : base( info, context )
{
}
#region Custom EntityCollection code
// __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCollectionCodeGeneric
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included Code
#endregion
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,387 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.HelperClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>Singleton implementation of the FieldInfoProvider. This class is the singleton wrapper through which the actual instance is retrieved.</summary>
/// <remarks>It uses a single instance of an internal class. The access isn't marked with locks as the FieldInfoProviderBase class is threadsafe.</remarks>
internal static class FieldInfoProviderSingleton
{
#region Class Member Declarations
private static readonly IFieldInfoProvider _providerInstance = new FieldInfoProviderCore();
#endregion
/// <summary>Dummy static constructor to make sure threadsafe initialization is performed.</summary>
static FieldInfoProviderSingleton()
{
}
/// <summary>Gets the singleton instance of the FieldInfoProviderCore</summary>
/// <returns>Instance of the FieldInfoProvider.</returns>
public static IFieldInfoProvider GetInstance()
{
return _providerInstance;
}
}
/// <summary>Actual implementation of the FieldInfoProvider. Used by singleton wrapper.</summary>
internal class FieldInfoProviderCore : FieldInfoProviderBase
{
/// <summary>Initializes a new instance of the <see cref="FieldInfoProviderCore"/> class.</summary>
internal FieldInfoProviderCore()
{
Init();
}
/// <summary>Method which initializes the internal datastores.</summary>
private void Init()
{
this.InitClass( (22 + 0));
InitTblAgeGroupEntityInfos();
InitTblAgencyEntityInfos();
InitTblChildEntityInfos();
InitTblClinicInfoEntityInfos();
InitTblCommuneEntityInfos();
InitTblDiaryEntityInfos();
InitTblDistrictEntityInfos();
InitTblExaminationInfoEntityInfos();
InitTblPatientEntityInfos();
InitTblPreClinicsInfoEntityInfos();
InitTblPregnanceInfoEntityInfos();
InitTblProvinceEntityInfos();
InitTblReferralFromPlaceEntityInfos();
InitTblReferralsToEntityInfos();
InitTblReferraltoServiceEntityInfos();
InitTblRegimenEntityInfos();
InitTblRegimenStopReasonEntityInfos();
InitTblServiceEntityInfos();
InitTblTestEntityInfos();
InitTblTreatmentEntityInfos();
InitTblTreatmentInfoEntityInfos();
InitTblWaitingListEntityInfos();
this.ConstructElementFieldStructures(InheritanceInfoProviderSingleton.GetInstance());
}
/// <summary>Inits TblAgeGroupEntity's FieldInfo objects</summary>
private void InitTblAgeGroupEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblAgeGroupFieldIndex), "TblAgeGroupEntity");
this.AddElementFieldInfo("TblAgeGroupEntity", "Age", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblAgeGroupFieldIndex.Age, 0, 0, 5);
this.AddElementFieldInfo("TblAgeGroupEntity", "Grp1", typeof(System.String), false, false, false, true, (int)TblAgeGroupFieldIndex.Grp1, 10, 0, 0);
this.AddElementFieldInfo("TblAgeGroupEntity", "Grp2", typeof(System.String), false, false, false, true, (int)TblAgeGroupFieldIndex.Grp2, 10, 0, 0);
this.AddElementFieldInfo("TblAgeGroupEntity", "Id", typeof(System.Int16), true, false, false, false, (int)TblAgeGroupFieldIndex.Id, 0, 0, 5);
}
/// <summary>Inits TblAgencyEntity's FieldInfo objects</summary>
private void InitTblAgencyEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblAgencyFieldIndex), "TblAgencyEntity");
this.AddElementFieldInfo("TblAgencyEntity", "AgencyTypeId", typeof(System.String), true, false, false, false, (int)TblAgencyFieldIndex.AgencyTypeId, 2, 0, 0);
this.AddElementFieldInfo("TblAgencyEntity", "EAgencyTypeName", typeof(System.String), false, false, false, true, (int)TblAgencyFieldIndex.EAgencyTypeName, 255, 0, 0);
this.AddElementFieldInfo("TblAgencyEntity", "VAgencyTypeName", typeof(System.String), false, false, false, true, (int)TblAgencyFieldIndex.VAgencyTypeName, 255, 0, 0);
}
/// <summary>Inits TblChildEntity's FieldInfo objects</summary>
private void InitTblChildEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblChildFieldIndex), "TblChildEntity");
this.AddElementFieldInfo("TblChildEntity", "ChildId", typeof(System.String), false, false, false, true, (int)TblChildFieldIndex.ChildId, 15, 0, 0);
this.AddElementFieldInfo("TblChildEntity", "ChildName", typeof(System.String), false, false, false, true, (int)TblChildFieldIndex.ChildName, 25, 0, 0);
this.AddElementFieldInfo("TblChildEntity", "Ctxdate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblChildFieldIndex.Ctxdate, 0, 0, 0);
this.AddElementFieldInfo("TblChildEntity", "FeedingType", typeof(System.Int16), false, false, false, false, (int)TblChildFieldIndex.FeedingType, 0, 0, 5);
this.AddElementFieldInfo("TblChildEntity", "Hiv18Date", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblChildFieldIndex.Hiv18Date, 0, 0, 0);
this.AddElementFieldInfo("TblChildEntity", "Hiv18Result", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblChildFieldIndex.Hiv18Result, 0, 0, 5);
this.AddElementFieldInfo("TblChildEntity", "Pcrcdate1", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblChildFieldIndex.Pcrcdate1, 0, 0, 0);
this.AddElementFieldInfo("TblChildEntity", "Pcrcdate2", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblChildFieldIndex.Pcrcdate2, 0, 0, 0);
this.AddElementFieldInfo("TblChildEntity", "Pcrresult1", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblChildFieldIndex.Pcrresult1, 0, 0, 5);
this.AddElementFieldInfo("TblChildEntity", "Pcrresult2", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblChildFieldIndex.Pcrresult2, 0, 0, 5);
this.AddElementFieldInfo("TblChildEntity", "PreganceId", typeof(System.String), false, true, false, true, (int)TblChildFieldIndex.PreganceId, 32, 0, 0);
this.AddElementFieldInfo("TblChildEntity", "Sex", typeof(System.Int16), false, false, false, false, (int)TblChildFieldIndex.Sex, 0, 0, 5);
this.AddElementFieldInfo("TblChildEntity", "UniqueKey", typeof(System.String), true, false, false, false, (int)TblChildFieldIndex.UniqueKey, 32, 0, 0);
}
/// <summary>Inits TblClinicInfoEntity's FieldInfo objects</summary>
private void InitTblClinicInfoEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblClinicInfoFieldIndex), "TblClinicInfoEntity");
this.AddElementFieldInfo("TblClinicInfoEntity", "Anemia", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblClinicInfoFieldIndex.Anemia, 0, 0, 5);
this.AddElementFieldInfo("TblClinicInfoEntity", "Blackouts", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblClinicInfoFieldIndex.Blackouts, 0, 0, 5);
this.AddElementFieldInfo("TblClinicInfoEntity", "Burning", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblClinicInfoFieldIndex.Burning, 0, 0, 5);
this.AddElementFieldInfo("TblClinicInfoEntity", "ClinicDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblClinicInfoFieldIndex.ClinicDate, 0, 0, 0);
this.AddElementFieldInfo("TblClinicInfoEntity", "ClinicStage", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblClinicInfoFieldIndex.ClinicStage, 0, 0, 5);
this.AddElementFieldInfo("TblClinicInfoEntity", "Colic", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblClinicInfoFieldIndex.Colic, 0, 0, 5);
this.AddElementFieldInfo("TblClinicInfoEntity", "Depression", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblClinicInfoFieldIndex.Depression, 0, 0, 5);
this.AddElementFieldInfo("TblClinicInfoEntity", "Diarrhea", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblClinicInfoFieldIndex.Diarrhea, 0, 0, 5);
this.AddElementFieldInfo("TblClinicInfoEntity", "FatDistributionChanges", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblClinicInfoFieldIndex.FatDistributionChanges, 0, 0, 5);
this.AddElementFieldInfo("TblClinicInfoEntity", "Headache", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblClinicInfoFieldIndex.Headache, 0, 0, 5);
this.AddElementFieldInfo("TblClinicInfoEntity", "Height", typeof(Nullable<System.Double>), false, false, false, true, (int)TblClinicInfoFieldIndex.Height, 0, 0, 15);
this.AddElementFieldInfo("TblClinicInfoEntity", "Jaundice", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblClinicInfoFieldIndex.Jaundice, 0, 0, 5);
this.AddElementFieldInfo("TblClinicInfoEntity", "Motion", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblClinicInfoFieldIndex.Motion, 0, 0, 5);
this.AddElementFieldInfo("TblClinicInfoEntity", "Nausea", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblClinicInfoFieldIndex.Nausea, 0, 0, 5);
this.AddElementFieldInfo("TblClinicInfoEntity", "PatientId", typeof(System.String), false, true, false, false, (int)TblClinicInfoFieldIndex.PatientId, 15, 0, 0);
this.AddElementFieldInfo("TblClinicInfoEntity", "Poisoning", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblClinicInfoFieldIndex.Poisoning, 0, 0, 5);
this.AddElementFieldInfo("TblClinicInfoEntity", "ProgressTb", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblClinicInfoFieldIndex.ProgressTb, 0, 0, 5);
this.AddElementFieldInfo("TblClinicInfoEntity", "Rash", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblClinicInfoFieldIndex.Rash, 0, 0, 5);
this.AddElementFieldInfo("TblClinicInfoEntity", "UniqueKey", typeof(System.String), true, false, false, false, (int)TblClinicInfoFieldIndex.UniqueKey, 32, 0, 0);
this.AddElementFieldInfo("TblClinicInfoEntity", "Weight", typeof(Nullable<System.Double>), false, false, false, true, (int)TblClinicInfoFieldIndex.Weight, 0, 0, 15);
}
/// <summary>Inits TblCommuneEntity's FieldInfo objects</summary>
private void InitTblCommuneEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblCommuneFieldIndex), "TblCommuneEntity");
this.AddElementFieldInfo("TblCommuneEntity", "Communeid", typeof(System.String), true, false, false, false, (int)TblCommuneFieldIndex.Communeid, 7, 0, 0);
this.AddElementFieldInfo("TblCommuneEntity", "Communename", typeof(System.String), false, false, false, true, (int)TblCommuneFieldIndex.Communename, 255, 0, 0);
this.AddElementFieldInfo("TblCommuneEntity", "Districtid", typeof(System.String), false, true, false, true, (int)TblCommuneFieldIndex.Districtid, 5, 0, 0);
}
/// <summary>Inits TblDiaryEntity's FieldInfo objects</summary>
private void InitTblDiaryEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblDiaryFieldIndex), "TblDiaryEntity");
this.AddElementFieldInfo("TblDiaryEntity", "EventDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblDiaryFieldIndex.EventDate, 0, 0, 0);
this.AddElementFieldInfo("TblDiaryEntity", "OtherResult", typeof(System.String), false, false, false, true, (int)TblDiaryFieldIndex.OtherResult, 255, 0, 0);
this.AddElementFieldInfo("TblDiaryEntity", "PatientId", typeof(System.String), false, true, false, true, (int)TblDiaryFieldIndex.PatientId, 15, 0, 0);
this.AddElementFieldInfo("TblDiaryEntity", "Reason", typeof(System.String), false, false, false, true, (int)TblDiaryFieldIndex.Reason, 255, 0, 0);
this.AddElementFieldInfo("TblDiaryEntity", "Result", typeof(System.String), false, false, false, true, (int)TblDiaryFieldIndex.Result, 1, 0, 0);
this.AddElementFieldInfo("TblDiaryEntity", "UniqueKey", typeof(System.String), true, false, false, false, (int)TblDiaryFieldIndex.UniqueKey, 32, 0, 0);
}
/// <summary>Inits TblDistrictEntity's FieldInfo objects</summary>
private void InitTblDistrictEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblDistrictFieldIndex), "TblDistrictEntity");
this.AddElementFieldInfo("TblDistrictEntity", "Districtid", typeof(System.String), true, false, false, false, (int)TblDistrictFieldIndex.Districtid, 5, 0, 0);
this.AddElementFieldInfo("TblDistrictEntity", "Districtname", typeof(System.String), false, false, false, true, (int)TblDistrictFieldIndex.Districtname, 26, 0, 0);
this.AddElementFieldInfo("TblDistrictEntity", "Provinceid", typeof(System.String), false, true, false, true, (int)TblDistrictFieldIndex.Provinceid, 3, 0, 0);
}
/// <summary>Inits TblExaminationInfoEntity's FieldInfo objects</summary>
private void InitTblExaminationInfoEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblExaminationInfoFieldIndex), "TblExaminationInfoEntity");
this.AddElementFieldInfo("TblExaminationInfoEntity", "Anemia", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Anemia, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "Blackouts", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Blackouts, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "Burning", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Burning, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "Calc", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Calc, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "ClinicStage", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.ClinicStage, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "Colic", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Colic, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "CommuneId", typeof(System.String), false, false, false, true, (int)TblExaminationInfoFieldIndex.CommuneId, 7, 0, 0);
this.AddElementFieldInfo("TblExaminationInfoEntity", "DayDiff", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.DayDiff, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "Depression", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Depression, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "Diarrhea", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Diarrhea, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "DistrictId", typeof(System.String), false, false, false, true, (int)TblExaminationInfoFieldIndex.DistrictId, 5, 0, 0);
this.AddElementFieldInfo("TblExaminationInfoEntity", "EndExamDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblExaminationInfoFieldIndex.EndExamDate, 0, 0, 0);
this.AddElementFieldInfo("TblExaminationInfoEntity", "ExamDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblExaminationInfoFieldIndex.ExamDate, 0, 0, 0);
this.AddElementFieldInfo("TblExaminationInfoEntity", "FatDistributionChanges", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.FatDistributionChanges, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "Headache", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Headache, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "Height", typeof(Nullable<System.Double>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Height, 0, 0, 15);
this.AddElementFieldInfo("TblExaminationInfoEntity", "IsClinic", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.IsClinic, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "Jaundice", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Jaundice, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "LateAppointmentReason", typeof(System.String), false, false, false, true, (int)TblExaminationInfoFieldIndex.LateAppointmentReason, 536870911, 0, 0);
this.AddElementFieldInfo("TblExaminationInfoEntity", "LateTimes", typeof(System.String), false, false, false, true, (int)TblExaminationInfoFieldIndex.LateTimes, 10, 0, 0);
this.AddElementFieldInfo("TblExaminationInfoEntity", "Motion", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Motion, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "Nausea", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Nausea, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "NoSelfExam", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.NoSelfExam, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "OutPatientTreatment", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.OutPatientTreatment, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "PatientId", typeof(System.String), false, true, false, false, (int)TblExaminationInfoFieldIndex.PatientId, 15, 0, 0);
this.AddElementFieldInfo("TblExaminationInfoEntity", "Poisoning", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Poisoning, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "ProgressTb", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.ProgressTb, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "ProvinceId", typeof(System.String), false, false, false, true, (int)TblExaminationInfoFieldIndex.ProvinceId, 3, 0, 0);
this.AddElementFieldInfo("TblExaminationInfoEntity", "Rash", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Rash, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "ReasonEnd", typeof(System.String), false, false, false, true, (int)TblExaminationInfoFieldIndex.ReasonEnd, 2, 0, 0);
this.AddElementFieldInfo("TblExaminationInfoEntity", "ReExamDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblExaminationInfoFieldIndex.ReExamDate, 0, 0, 0);
this.AddElementFieldInfo("TblExaminationInfoEntity", "ReTreatment", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.ReTreatment, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "Status", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Status, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "TbScreen", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.TbScreen, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "TbScreenResult", typeof(System.String), false, false, false, true, (int)TblExaminationInfoFieldIndex.TbScreenResult, 2, 0, 0);
this.AddElementFieldInfo("TblExaminationInfoEntity", "TreatmentFollow", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblExaminationInfoFieldIndex.TreatmentFollow, 0, 0, 5);
this.AddElementFieldInfo("TblExaminationInfoEntity", "UniqueKey", typeof(System.String), true, false, false, false, (int)TblExaminationInfoFieldIndex.UniqueKey, 32, 0, 0);
this.AddElementFieldInfo("TblExaminationInfoEntity", "Weight", typeof(Nullable<System.Double>), false, false, false, true, (int)TblExaminationInfoFieldIndex.Weight, 0, 0, 15);
}
/// <summary>Inits TblPatientEntity's FieldInfo objects</summary>
private void InitTblPatientEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblPatientFieldIndex), "TblPatientEntity");
this.AddElementFieldInfo("TblPatientEntity", "Address", typeof(System.String), false, false, false, true, (int)TblPatientFieldIndex.Address, 255, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "BirthYear", typeof(System.Int32), false, false, false, false, (int)TblPatientFieldIndex.BirthYear, 0, 0, 10);
this.AddElementFieldInfo("TblPatientEntity", "CommuneId", typeof(System.String), false, false, false, true, (int)TblPatientFieldIndex.CommuneId, 7, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "CreateDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblPatientFieldIndex.CreateDate, 0, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "DateofArv", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblPatientFieldIndex.DateofArv, 0, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "DateofReceivingDrug", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblPatientFieldIndex.DateofReceivingDrug, 0, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "Dateofreferral", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblPatientFieldIndex.Dateofreferral, 0, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "DateofRegistration", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblPatientFieldIndex.DateofRegistration, 0, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "DeathDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblPatientFieldIndex.DeathDate, 0, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "DistrictId", typeof(System.String), false, false, false, true, (int)TblPatientFieldIndex.DistrictId, 5, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "HaveArvBefore", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblPatientFieldIndex.HaveArvBefore, 0, 0, 5);
this.AddElementFieldInfo("TblPatientEntity", "HivConfirmedDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblPatientFieldIndex.HivConfirmedDate, 0, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "IdentityCardNo", typeof(System.String), false, false, false, true, (int)TblPatientFieldIndex.IdentityCardNo, 20, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "Insuranceid", typeof(System.String), false, false, false, true, (int)TblPatientFieldIndex.Insuranceid, 50, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "ModifyDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblPatientFieldIndex.ModifyDate, 0, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "OldPatientId", typeof(System.String), false, false, false, true, (int)TblPatientFieldIndex.OldPatientId, 15, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "PatientId", typeof(System.String), true, false, false, false, (int)TblPatientFieldIndex.PatientId, 15, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "PatientName", typeof(System.String), false, false, false, true, (int)TblPatientFieldIndex.PatientName, 255, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "ProvinceId", typeof(System.String), false, false, false, true, (int)TblPatientFieldIndex.ProvinceId, 3, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "ReferralId", typeof(System.String), false, true, false, true, (int)TblPatientFieldIndex.ReferralId, 2, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "ReferralName", typeof(System.String), false, false, false, true, (int)TblPatientFieldIndex.ReferralName, 255, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "ReferralProvinceId", typeof(System.String), false, false, false, true, (int)TblPatientFieldIndex.ReferralProvinceId, 3, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "Regimenid", typeof(System.String), false, false, false, true, (int)TblPatientFieldIndex.Regimenid, 2, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "Sex", typeof(System.Int16), false, false, false, false, (int)TblPatientFieldIndex.Sex, 0, 0, 5);
this.AddElementFieldInfo("TblPatientEntity", "Sms", typeof(Nullable<System.Boolean>), false, false, false, true, (int)TblPatientFieldIndex.Sms, 2, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "Status", typeof(System.String), false, false, false, true, (int)TblPatientFieldIndex.Status, 2, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "SupporterInfo", typeof(System.String), false, false, false, true, (int)TblPatientFieldIndex.SupporterInfo, 536870911, 0, 0);
this.AddElementFieldInfo("TblPatientEntity", "TelephoneNo", typeof(System.String), false, false, false, true, (int)TblPatientFieldIndex.TelephoneNo, 20, 0, 0);
}
/// <summary>Inits TblPreClinicsInfoEntity's FieldInfo objects</summary>
private void InitTblPreClinicsInfoEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblPreClinicsInfoFieldIndex), "TblPreClinicsInfoEntity");
this.AddElementFieldInfo("TblPreClinicsInfoEntity", "PatientId", typeof(System.String), false, true, false, false, (int)TblPreClinicsInfoFieldIndex.PatientId, 15, 0, 0);
this.AddElementFieldInfo("TblPreClinicsInfoEntity", "QualityResult", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblPreClinicsInfoFieldIndex.QualityResult, 0, 0, 5);
this.AddElementFieldInfo("TblPreClinicsInfoEntity", "QuantityResult", typeof(Nullable<System.Double>), false, false, false, true, (int)TblPreClinicsInfoFieldIndex.QuantityResult, 0, 0, 15);
this.AddElementFieldInfo("TblPreClinicsInfoEntity", "Status", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblPreClinicsInfoFieldIndex.Status, 0, 0, 5);
this.AddElementFieldInfo("TblPreClinicsInfoEntity", "TestDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblPreClinicsInfoFieldIndex.TestDate, 0, 0, 0);
this.AddElementFieldInfo("TblPreClinicsInfoEntity", "Testid", typeof(System.String), false, true, false, false, (int)TblPreClinicsInfoFieldIndex.Testid, 2, 0, 0);
this.AddElementFieldInfo("TblPreClinicsInfoEntity", "UniqueKey", typeof(System.String), true, false, false, false, (int)TblPreClinicsInfoFieldIndex.UniqueKey, 32, 0, 0);
}
/// <summary>Inits TblPregnanceInfoEntity's FieldInfo objects</summary>
private void InitTblPregnanceInfoEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblPregnanceInfoFieldIndex), "TblPregnanceInfoEntity");
this.AddElementFieldInfo("TblPregnanceInfoEntity", "EstimatedDelivery", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblPregnanceInfoFieldIndex.EstimatedDelivery, 0, 0, 0);
this.AddElementFieldInfo("TblPregnanceInfoEntity", "Note", typeof(System.String), false, false, false, true, (int)TblPregnanceInfoFieldIndex.Note, 536870911, 0, 0);
this.AddElementFieldInfo("TblPregnanceInfoEntity", "PatientId", typeof(System.String), false, true, false, true, (int)TblPregnanceInfoFieldIndex.PatientId, 15, 0, 0);
this.AddElementFieldInfo("TblPregnanceInfoEntity", "PregnanceDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblPregnanceInfoFieldIndex.PregnanceDate, 0, 0, 0);
this.AddElementFieldInfo("TblPregnanceInfoEntity", "UniqueKey", typeof(System.String), true, false, false, false, (int)TblPregnanceInfoFieldIndex.UniqueKey, 32, 0, 0);
}
/// <summary>Inits TblProvinceEntity's FieldInfo objects</summary>
private void InitTblProvinceEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblProvinceFieldIndex), "TblProvinceEntity");
this.AddElementFieldInfo("TblProvinceEntity", "Provinceid", typeof(System.String), true, false, false, false, (int)TblProvinceFieldIndex.Provinceid, 3, 0, 0);
this.AddElementFieldInfo("TblProvinceEntity", "Provincename", typeof(System.String), false, false, false, true, (int)TblProvinceFieldIndex.Provincename, 30, 0, 0);
}
/// <summary>Inits TblReferralFromPlaceEntity's FieldInfo objects</summary>
private void InitTblReferralFromPlaceEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblReferralFromPlaceFieldIndex), "TblReferralFromPlaceEntity");
this.AddElementFieldInfo("TblReferralFromPlaceEntity", "EReferralName", typeof(System.String), false, false, false, true, (int)TblReferralFromPlaceFieldIndex.EReferralName, 255, 0, 0);
this.AddElementFieldInfo("TblReferralFromPlaceEntity", "ReferralId", typeof(System.String), true, false, false, false, (int)TblReferralFromPlaceFieldIndex.ReferralId, 2, 0, 0);
this.AddElementFieldInfo("TblReferralFromPlaceEntity", "VReferralName", typeof(System.String), false, false, false, true, (int)TblReferralFromPlaceFieldIndex.VReferralName, 255, 0, 0);
}
/// <summary>Inits TblReferralsToEntity's FieldInfo objects</summary>
private void InitTblReferralsToEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblReferralsToFieldIndex), "TblReferralsToEntity");
this.AddElementFieldInfo("TblReferralsToEntity", "AgencyTypeId", typeof(System.String), false, false, false, true, (int)TblReferralsToFieldIndex.AgencyTypeId, 2, 0, 0);
this.AddElementFieldInfo("TblReferralsToEntity", "DeathReasonId", typeof(System.String), false, false, false, true, (int)TblReferralsToFieldIndex.DeathReasonId, 2, 0, 0);
this.AddElementFieldInfo("TblReferralsToEntity", "EndDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblReferralsToFieldIndex.EndDate, 0, 0, 0);
this.AddElementFieldInfo("TblReferralsToEntity", "Note", typeof(System.String), false, false, false, true, (int)TblReferralsToFieldIndex.Note, 536870911, 0, 0);
this.AddElementFieldInfo("TblReferralsToEntity", "PatientId", typeof(System.String), false, true, false, true, (int)TblReferralsToFieldIndex.PatientId, 15, 0, 0);
this.AddElementFieldInfo("TblReferralsToEntity", "ProvinceId", typeof(System.String), false, false, false, true, (int)TblReferralsToFieldIndex.ProvinceId, 3, 0, 0);
this.AddElementFieldInfo("TblReferralsToEntity", "ReceiveServiceDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblReferralsToFieldIndex.ReceiveServiceDate, 0, 0, 0);
this.AddElementFieldInfo("TblReferralsToEntity", "ReferralAgency", typeof(System.String), false, false, false, true, (int)TblReferralsToFieldIndex.ReferralAgency, 255, 0, 0);
this.AddElementFieldInfo("TblReferralsToEntity", "Status", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblReferralsToFieldIndex.Status, 0, 0, 5);
this.AddElementFieldInfo("TblReferralsToEntity", "TypeId", typeof(System.String), false, false, false, true, (int)TblReferralsToFieldIndex.TypeId, 2, 0, 0);
this.AddElementFieldInfo("TblReferralsToEntity", "UniqueKey", typeof(System.String), true, false, false, false, (int)TblReferralsToFieldIndex.UniqueKey, 32, 0, 0);
}
/// <summary>Inits TblReferraltoServiceEntity's FieldInfo objects</summary>
private void InitTblReferraltoServiceEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblReferraltoServiceFieldIndex), "TblReferraltoServiceEntity");
this.AddElementFieldInfo("TblReferraltoServiceEntity", "AgencyTypeId", typeof(System.String), false, true, false, true, (int)TblReferraltoServiceFieldIndex.AgencyTypeId, 2, 0, 0);
this.AddElementFieldInfo("TblReferraltoServiceEntity", "Note", typeof(System.String), false, false, false, true, (int)TblReferraltoServiceFieldIndex.Note, 536870911, 0, 0);
this.AddElementFieldInfo("TblReferraltoServiceEntity", "PatientId", typeof(System.String), false, true, false, true, (int)TblReferraltoServiceFieldIndex.PatientId, 15, 0, 0);
this.AddElementFieldInfo("TblReferraltoServiceEntity", "ProvinceId", typeof(System.String), false, false, false, true, (int)TblReferraltoServiceFieldIndex.ProvinceId, 3, 0, 0);
this.AddElementFieldInfo("TblReferraltoServiceEntity", "ReceiveServiceDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblReferraltoServiceFieldIndex.ReceiveServiceDate, 0, 0, 0);
this.AddElementFieldInfo("TblReferraltoServiceEntity", "ReferralAgency", typeof(System.String), false, false, false, true, (int)TblReferraltoServiceFieldIndex.ReferralAgency, 255, 0, 0);
this.AddElementFieldInfo("TblReferraltoServiceEntity", "ReferralDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblReferraltoServiceFieldIndex.ReferralDate, 0, 0, 0);
this.AddElementFieldInfo("TblReferraltoServiceEntity", "Status", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblReferraltoServiceFieldIndex.Status, 0, 0, 5);
this.AddElementFieldInfo("TblReferraltoServiceEntity", "UniqueKey", typeof(System.String), true, false, false, false, (int)TblReferraltoServiceFieldIndex.UniqueKey, 32, 0, 0);
}
/// <summary>Inits TblRegimenEntity's FieldInfo objects</summary>
private void InitTblRegimenEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblRegimenFieldIndex), "TblRegimenEntity");
this.AddElementFieldInfo("TblRegimenEntity", "ERegimenName", typeof(System.String), false, false, false, true, (int)TblRegimenFieldIndex.ERegimenName, 255, 0, 0);
this.AddElementFieldInfo("TblRegimenEntity", "Regimenid", typeof(System.String), true, false, false, false, (int)TblRegimenFieldIndex.Regimenid, 2, 0, 0);
this.AddElementFieldInfo("TblRegimenEntity", "Sign", typeof(System.String), false, false, false, true, (int)TblRegimenFieldIndex.Sign, 3, 0, 0);
this.AddElementFieldInfo("TblRegimenEntity", "Type", typeof(Nullable<System.Int16>), false, false, false, true, (int)TblRegimenFieldIndex.Type, 0, 0, 5);
this.AddElementFieldInfo("TblRegimenEntity", "VRegimenname", typeof(System.String), false, false, false, true, (int)TblRegimenFieldIndex.VRegimenname, 255, 0, 0);
}
/// <summary>Inits TblRegimenStopReasonEntity's FieldInfo objects</summary>
private void InitTblRegimenStopReasonEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblRegimenStopReasonFieldIndex), "TblRegimenStopReasonEntity");
this.AddElementFieldInfo("TblRegimenStopReasonEntity", "EReasonDes", typeof(System.String), false, false, false, true, (int)TblRegimenStopReasonFieldIndex.EReasonDes, 255, 0, 0);
this.AddElementFieldInfo("TblRegimenStopReasonEntity", "ReasonId", typeof(System.String), true, false, false, false, (int)TblRegimenStopReasonFieldIndex.ReasonId, 2, 0, 0);
this.AddElementFieldInfo("TblRegimenStopReasonEntity", "Sign", typeof(System.String), false, false, false, true, (int)TblRegimenStopReasonFieldIndex.Sign, 2, 0, 0);
this.AddElementFieldInfo("TblRegimenStopReasonEntity", "VReasonDes", typeof(System.String), false, false, false, true, (int)TblRegimenStopReasonFieldIndex.VReasonDes, 255, 0, 0);
}
/// <summary>Inits TblServiceEntity's FieldInfo objects</summary>
private void InitTblServiceEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblServiceFieldIndex), "TblServiceEntity");
this.AddElementFieldInfo("TblServiceEntity", "EServiceName", typeof(System.String), false, false, false, true, (int)TblServiceFieldIndex.EServiceName, 255, 0, 0);
this.AddElementFieldInfo("TblServiceEntity", "ServiceId", typeof(System.String), true, false, false, false, (int)TblServiceFieldIndex.ServiceId, 2, 0, 0);
this.AddElementFieldInfo("TblServiceEntity", "VServiceName", typeof(System.String), false, false, false, true, (int)TblServiceFieldIndex.VServiceName, 255, 0, 0);
}
/// <summary>Inits TblTestEntity's FieldInfo objects</summary>
private void InitTblTestEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblTestFieldIndex), "TblTestEntity");
this.AddElementFieldInfo("TblTestEntity", "ETestName", typeof(System.String), false, false, false, true, (int)TblTestFieldIndex.ETestName, 255, 0, 0);
this.AddElementFieldInfo("TblTestEntity", "Testid", typeof(System.String), true, false, false, false, (int)TblTestFieldIndex.Testid, 2, 0, 0);
this.AddElementFieldInfo("TblTestEntity", "VTestName", typeof(System.String), false, false, false, true, (int)TblTestFieldIndex.VTestName, 255, 0, 0);
}
/// <summary>Inits TblTreatmentEntity's FieldInfo objects</summary>
private void InitTblTreatmentEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblTreatmentFieldIndex), "TblTreatmentEntity");
this.AddElementFieldInfo("TblTreatmentEntity", "ETreatmentDes", typeof(System.String), false, false, false, true, (int)TblTreatmentFieldIndex.ETreatmentDes, 255, 0, 0);
this.AddElementFieldInfo("TblTreatmentEntity", "Sign", typeof(System.String), false, false, false, true, (int)TblTreatmentFieldIndex.Sign, 10, 0, 0);
this.AddElementFieldInfo("TblTreatmentEntity", "TreatmentId", typeof(System.String), true, false, false, false, (int)TblTreatmentFieldIndex.TreatmentId, 2, 0, 0);
this.AddElementFieldInfo("TblTreatmentEntity", "VTreatmentDes", typeof(System.String), false, false, false, true, (int)TblTreatmentFieldIndex.VTreatmentDes, 255, 0, 0);
}
/// <summary>Inits TblTreatmentInfoEntity's FieldInfo objects</summary>
private void InitTblTreatmentInfoEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblTreatmentInfoFieldIndex), "TblTreatmentInfoEntity");
this.AddElementFieldInfo("TblTreatmentInfoEntity", "PatientId", typeof(System.String), false, true, false, false, (int)TblTreatmentInfoFieldIndex.PatientId, 15, 0, 0);
this.AddElementFieldInfo("TblTreatmentInfoEntity", "ReasonId", typeof(System.String), false, true, false, true, (int)TblTreatmentInfoFieldIndex.ReasonId, 2, 0, 0);
this.AddElementFieldInfo("TblTreatmentInfoEntity", "Regimenid", typeof(System.String), false, true, false, true, (int)TblTreatmentInfoFieldIndex.Regimenid, 2, 0, 0);
this.AddElementFieldInfo("TblTreatmentInfoEntity", "TreatmentEdate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblTreatmentInfoFieldIndex.TreatmentEdate, 0, 0, 0);
this.AddElementFieldInfo("TblTreatmentInfoEntity", "TreatmentId", typeof(System.String), false, true, false, true, (int)TblTreatmentInfoFieldIndex.TreatmentId, 2, 0, 0);
this.AddElementFieldInfo("TblTreatmentInfoEntity", "TreatmentSdate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblTreatmentInfoFieldIndex.TreatmentSdate, 0, 0, 0);
this.AddElementFieldInfo("TblTreatmentInfoEntity", "UniqueKey", typeof(System.String), true, false, false, false, (int)TblTreatmentInfoFieldIndex.UniqueKey, 32, 0, 0);
}
/// <summary>Inits TblWaitingListEntity's FieldInfo objects</summary>
private void InitTblWaitingListEntityInfos()
{
this.AddFieldIndexEnumForElementName(typeof(TblWaitingListFieldIndex), "TblWaitingListEntity");
this.AddElementFieldInfo("TblWaitingListEntity", "Arv", typeof(System.Boolean), false, false, false, false, (int)TblWaitingListFieldIndex.Arv, 2, 0, 0);
this.AddElementFieldInfo("TblWaitingListEntity", "FollowNum", typeof(System.String), false, false, false, true, (int)TblWaitingListFieldIndex.FollowNum, 255, 0, 0);
this.AddElementFieldInfo("TblWaitingListEntity", "LastFolowResult", typeof(System.String), false, false, false, true, (int)TblWaitingListFieldIndex.LastFolowResult, 255, 0, 0);
this.AddElementFieldInfo("TblWaitingListEntity", "LateTimes", typeof(System.String), false, false, false, true, (int)TblWaitingListFieldIndex.LateTimes, 255, 0, 0);
this.AddElementFieldInfo("TblWaitingListEntity", "PatientId", typeof(System.String), true, false, false, false, (int)TblWaitingListFieldIndex.PatientId, 15, 0, 0);
this.AddElementFieldInfo("TblWaitingListEntity", "PatientName", typeof(System.String), false, false, false, true, (int)TblWaitingListFieldIndex.PatientName, 255, 0, 0);
this.AddElementFieldInfo("TblWaitingListEntity", "ReExamDate", typeof(Nullable<System.DateTime>), false, false, false, true, (int)TblWaitingListFieldIndex.ReExamDate, 0, 0, 0);
this.AddElementFieldInfo("TblWaitingListEntity", "Selected", typeof(System.Boolean), false, false, false, false, (int)TblWaitingListFieldIndex.Selected, 2, 0, 0);
this.AddElementFieldInfo("TblWaitingListEntity", "Status", typeof(System.String), false, false, false, true, (int)TblWaitingListFieldIndex.Status, 50, 0, 0);
this.AddElementFieldInfo("TblWaitingListEntity", "TelephoneNo", typeof(System.String), false, false, false, true, (int)TblWaitingListFieldIndex.TelephoneNo, 20, 0, 0);
}
}
}

View File

@@ -0,0 +1,74 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using Datalib.FactoryClasses;
using Datalib.RelationClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.HelperClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>Singleton implementation of the inheritanceInfoProvider. This class is the singleton wrapper through which the actual instance is retrieved.</summary>
/// <remarks>It uses a single instance of an internal class. The access isn't marked with locks as the InheritanceInfoProviderBase class is threadsafe.</remarks>
public static class InheritanceInfoProviderSingleton
{
#region Class Member Declarations
private static readonly IInheritanceInfoProvider _providerInstance = new InheritanceInfoProviderCore();
#endregion
/// <summary>Dummy static constructor to make sure threadsafe initialization is performed.</summary>
static InheritanceInfoProviderSingleton() { }
/// <summary>Gets the singleton instance of the InheritanceInfoProviderCore</summary>
/// <returns>Instance of the InheritanceInfoProvider.</returns>
public static IInheritanceInfoProvider GetInstance()
{
return _providerInstance;
}
#region Custom InheritanceInfoProviderSingleton code
// __LLBLGENPRO_USER_CODE_REGION_START CustomInheritanceInfoProviderSingletonCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
}
/// <summary>Actual implementation of the InheritanceInfoProvider. Used by singleton wrapper.</summary>
internal class InheritanceInfoProviderCore : InheritanceInfoProviderBase
{
/// <summary>Initializes a new instance of the <see cref="InheritanceInfoProviderCore"/> class.</summary>
internal InheritanceInfoProviderCore()
{
Init();
}
/// <summary>Method which initializes the internal datastores with the structure of hierarchical types.</summary>
private void Init()
{
base.BuildHierarchyInfoStore();
}
/// <summary>Gets the entity fields for the entity passed in. Only the fields defined in the entity are returned</summary>
/// <param name="entityName">Name of the entity to grab the fields for</param>
/// <returns>array of IEntityFieldCore fields</returns>
public override IEntityFieldCore[] GetEntityFields(string entityName)
{
return EntityFieldsFactory.CreateFields(entityName);
}
}
}

View File

@@ -0,0 +1,62 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
#if !CF
using System.Runtime.Serialization;
#endif
using System.Collections.Generic;
using Datalib.FactoryClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.HelperClasses
{
/// <summary>
/// Helper class which will eases the creation of custom made resultsets. Usable in typed lists
/// and dynamic lists created using the dynamic query engine.
/// </summary>
[Serializable]
public partial class ResultsetFields : EntityFields2, ISerializable
{
/// <summary>CTor</summary>
public ResultsetFields(int amountFields) : base(amountFields, InheritanceInfoProviderSingleton.GetInstance(), null)
{
}
/// <summary>Deserialization constructor</summary>
/// <param name="info">Info.</param>
/// <param name="context">Context.</param>
protected ResultsetFields(SerializationInfo info, StreamingContext context) : base(info.GetInt32("_amountFields"), InheritanceInfoProviderSingleton.GetInstance(), null)
{
List<IEntityField2> fields = (List<IEntityField2>)info.GetValue("_fields", typeof(List<IEntityField2>));
for (int i = 0; i < fields.Count; i++)
{
this[i] = fields[i];
}
}
/// <summary>Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"/>with the data needed to serialize the target object.</summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> to populate with data.</param>
/// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"/>) for this serialization.</param>
public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
{
info.AddValue("_amountFields", this.Count);
List<IEntityField2> fields = new List<IEntityField2>(this.Count);
for (int i = 0; i < this.Count; i++)
{
fields.Add(this[i]);
}
info.AddValue("_fields", fields, typeof(List<IEntityField2>));
}
#region Included Code
#endregion
}
}

View File

@@ -0,0 +1,130 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.HelperClasses
{
/// <summary>
/// Class for the returning of a default value when a type is given. These
/// Default values are used for EntityFields which have a NULL value in the database.
/// In Business Logic it's impractical to work with NULL values. If you want different values
/// as default values for NULL values for a given type, alter the DefaultValue method below.
/// If you want to keep your values when regenerating the code, make this file read-only, or bind a different
/// template to the template ID: SD_TypeDefaultValueIncludeTemplate, or alter the template file currently
/// bound to that template ID.
/// </summary>
[Serializable]
public partial class TypeDefaultValue : ITypeDefaultValue
{
/// <summary>
/// Ctor
/// </summary>
public TypeDefaultValue()
{
}
/// <summary>
/// Returns a default value for the type specified
/// </summary>
/// <param name="defaultValueType">The type which default value should be returned.</param>
/// <returns>The default value for the type specified.</returns>
public object DefaultValue(System.Type defaultValueType)
{
return TypeDefaultValue.GetDefaultValue(defaultValueType);
}
/// <summary>
/// Returns a default value for the type specified
/// </summary>
/// <param name="defaultValueType">The type which default value should be returned.</param>
/// <returns>The default value for the type specified.</returns>
public static object GetDefaultValue(System.Type defaultValueType)
{
object valueToReturn=null;
switch(Type.GetTypeCode(defaultValueType))
{
case TypeCode.String:
valueToReturn=string.Empty;
break;
case TypeCode.Boolean:
valueToReturn = false;
break;
case TypeCode.Byte:
valueToReturn = (byte)0;
break;
case TypeCode.DateTime:
valueToReturn = DateTime.MinValue;
break;
case TypeCode.Decimal:
valueToReturn = 0.0M;
break;
case TypeCode.Double:
valueToReturn = 0.0;
break;
case TypeCode.Int16:
valueToReturn = (short)0;
break;
case TypeCode.Int32:
valueToReturn = (int)0;
break;
case TypeCode.Int64:
valueToReturn = (long)0;
break;
case TypeCode.Object:
switch(defaultValueType.UnderlyingSystemType.FullName)
{
case "System.Guid":
valueToReturn = Guid.Empty;
break;
case "System.Byte[]":
valueToReturn = new byte[0];
break;
case "System.DateTimeOffset":
valueToReturn = DateTimeOffset.MinValue;
break;
case "System.TimeSpan":
valueToReturn = TimeSpan.MinValue;
break;
}
break;
case TypeCode.Single:
valueToReturn = 0.0f;
break;
case TypeCode.UInt16:
valueToReturn = (ushort)0;
break;
case TypeCode.UInt32:
valueToReturn = (uint)0;
break;
case TypeCode.UInt64:
valueToReturn = (ulong)0;
break;
case TypeCode.SByte:
valueToReturn = (SByte)0;
break;
default:
// do nothing, return null.
break;
}
return valueToReturn;
}
#region Included Code
#endregion
}
}

View File

@@ -0,0 +1,305 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
//////////////////////////////////////////////////////////////
using System;
using System.Linq;
using System.Collections.Generic;
using SD.LLBLGen.Pro.LinqSupportClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
using Datalib;
using Datalib.EntityClasses;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using Datalib.RelationClasses;
namespace Datalib.Linq
{
/// <summary>Meta-data class for the construction of Linq queries which are to be executed using LLBLGen Pro code.</summary>
public partial class LinqMetaData: ILinqMetaData
{
#region Class Member Declarations
private IDataAccessAdapter _adapterToUse;
private FunctionMappingStore _customFunctionMappings;
private Context _contextToUse;
#endregion
/// <summary>CTor. Using this ctor will leave the IDataAccessAdapter object to use empty. To be able to execute the query, an IDataAccessAdapter instance
/// is required, and has to be set on the LLBLGenProProvider2 object in the query to execute. </summary>
public LinqMetaData() : this(null, null)
{
}
/// <summary>CTor which accepts an IDataAccessAdapter implementing object, which will be used to execute queries created with this metadata class.</summary>
/// <param name="adapterToUse">the IDataAccessAdapter to use in queries created with this meta data</param>
/// <remarks> Be aware that the IDataAccessAdapter object set via this property is kept alive by the LLBLGenProQuery objects created with this meta data
/// till they go out of scope.</remarks>
public LinqMetaData(IDataAccessAdapter adapterToUse) : this (adapterToUse, null)
{
}
/// <summary>CTor which accepts an IDataAccessAdapter implementing object, which will be used to execute queries created with this metadata class.</summary>
/// <param name="adapterToUse">the IDataAccessAdapter to use in queries created with this meta data</param>
/// <param name="customFunctionMappings">The custom function mappings to use. These take higher precedence than the ones in the DQE to use.</param>
/// <remarks> Be aware that the IDataAccessAdapter object set via this property is kept alive by the LLBLGenProQuery objects created with this meta data
/// till they go out of scope.</remarks>
public LinqMetaData(IDataAccessAdapter adapterToUse, FunctionMappingStore customFunctionMappings)
{
_adapterToUse = adapterToUse;
_customFunctionMappings = customFunctionMappings;
}
/// <summary>returns the datasource to use in a Linq query for the entity type specified</summary>
/// <param name="typeOfEntity">the type of the entity to get the datasource for</param>
/// <returns>the requested datasource</returns>
public IDataSource GetQueryableForEntity(int typeOfEntity)
{
IDataSource toReturn = null;
switch((Datalib.EntityType)typeOfEntity)
{
case Datalib.EntityType.TblAgeGroupEntity:
toReturn = this.TblAgeGroup;
break;
case Datalib.EntityType.TblAgencyEntity:
toReturn = this.TblAgency;
break;
case Datalib.EntityType.TblChildEntity:
toReturn = this.TblChild;
break;
case Datalib.EntityType.TblClinicInfoEntity:
toReturn = this.TblClinicInfo;
break;
case Datalib.EntityType.TblCommuneEntity:
toReturn = this.TblCommune;
break;
case Datalib.EntityType.TblDiaryEntity:
toReturn = this.TblDiary;
break;
case Datalib.EntityType.TblDistrictEntity:
toReturn = this.TblDistrict;
break;
case Datalib.EntityType.TblExaminationInfoEntity:
toReturn = this.TblExaminationInfo;
break;
case Datalib.EntityType.TblPatientEntity:
toReturn = this.TblPatient;
break;
case Datalib.EntityType.TblPreClinicsInfoEntity:
toReturn = this.TblPreClinicsInfo;
break;
case Datalib.EntityType.TblPregnanceInfoEntity:
toReturn = this.TblPregnanceInfo;
break;
case Datalib.EntityType.TblProvinceEntity:
toReturn = this.TblProvince;
break;
case Datalib.EntityType.TblReferralFromPlaceEntity:
toReturn = this.TblReferralFromPlace;
break;
case Datalib.EntityType.TblReferralsToEntity:
toReturn = this.TblReferralsTo;
break;
case Datalib.EntityType.TblReferraltoServiceEntity:
toReturn = this.TblReferraltoService;
break;
case Datalib.EntityType.TblRegimenEntity:
toReturn = this.TblRegimen;
break;
case Datalib.EntityType.TblRegimenStopReasonEntity:
toReturn = this.TblRegimenStopReason;
break;
case Datalib.EntityType.TblServiceEntity:
toReturn = this.TblService;
break;
case Datalib.EntityType.TblTestEntity:
toReturn = this.TblTest;
break;
case Datalib.EntityType.TblTreatmentEntity:
toReturn = this.TblTreatment;
break;
case Datalib.EntityType.TblTreatmentInfoEntity:
toReturn = this.TblTreatmentInfo;
break;
case Datalib.EntityType.TblWaitingListEntity:
toReturn = this.TblWaitingList;
break;
default:
toReturn = null;
break;
}
return toReturn;
}
/// <summary>returns the datasource to use in a Linq query for the entity type specified</summary>
/// <typeparam name="TEntity">the type of the entity to get the datasource for</typeparam>
/// <returns>the requested datasource</returns>
public DataSource2<TEntity> GetQueryableForEntity<TEntity>()
where TEntity : class
{
return new DataSource2<TEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse);
}
/// <summary>returns the datasource to use in a Linq query when targeting TblAgeGroupEntity instances in the database.</summary>
public DataSource2<TblAgeGroupEntity> TblAgeGroup
{
get { return new DataSource2<TblAgeGroupEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblAgencyEntity instances in the database.</summary>
public DataSource2<TblAgencyEntity> TblAgency
{
get { return new DataSource2<TblAgencyEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblChildEntity instances in the database.</summary>
public DataSource2<TblChildEntity> TblChild
{
get { return new DataSource2<TblChildEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblClinicInfoEntity instances in the database.</summary>
public DataSource2<TblClinicInfoEntity> TblClinicInfo
{
get { return new DataSource2<TblClinicInfoEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblCommuneEntity instances in the database.</summary>
public DataSource2<TblCommuneEntity> TblCommune
{
get { return new DataSource2<TblCommuneEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblDiaryEntity instances in the database.</summary>
public DataSource2<TblDiaryEntity> TblDiary
{
get { return new DataSource2<TblDiaryEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblDistrictEntity instances in the database.</summary>
public DataSource2<TblDistrictEntity> TblDistrict
{
get { return new DataSource2<TblDistrictEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblExaminationInfoEntity instances in the database.</summary>
public DataSource2<TblExaminationInfoEntity> TblExaminationInfo
{
get { return new DataSource2<TblExaminationInfoEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblPatientEntity instances in the database.</summary>
public DataSource2<TblPatientEntity> TblPatient
{
get { return new DataSource2<TblPatientEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblPreClinicsInfoEntity instances in the database.</summary>
public DataSource2<TblPreClinicsInfoEntity> TblPreClinicsInfo
{
get { return new DataSource2<TblPreClinicsInfoEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblPregnanceInfoEntity instances in the database.</summary>
public DataSource2<TblPregnanceInfoEntity> TblPregnanceInfo
{
get { return new DataSource2<TblPregnanceInfoEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblProvinceEntity instances in the database.</summary>
public DataSource2<TblProvinceEntity> TblProvince
{
get { return new DataSource2<TblProvinceEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblReferralFromPlaceEntity instances in the database.</summary>
public DataSource2<TblReferralFromPlaceEntity> TblReferralFromPlace
{
get { return new DataSource2<TblReferralFromPlaceEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblReferralsToEntity instances in the database.</summary>
public DataSource2<TblReferralsToEntity> TblReferralsTo
{
get { return new DataSource2<TblReferralsToEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblReferraltoServiceEntity instances in the database.</summary>
public DataSource2<TblReferraltoServiceEntity> TblReferraltoService
{
get { return new DataSource2<TblReferraltoServiceEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblRegimenEntity instances in the database.</summary>
public DataSource2<TblRegimenEntity> TblRegimen
{
get { return new DataSource2<TblRegimenEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblRegimenStopReasonEntity instances in the database.</summary>
public DataSource2<TblRegimenStopReasonEntity> TblRegimenStopReason
{
get { return new DataSource2<TblRegimenStopReasonEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblServiceEntity instances in the database.</summary>
public DataSource2<TblServiceEntity> TblService
{
get { return new DataSource2<TblServiceEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblTestEntity instances in the database.</summary>
public DataSource2<TblTestEntity> TblTest
{
get { return new DataSource2<TblTestEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblTreatmentEntity instances in the database.</summary>
public DataSource2<TblTreatmentEntity> TblTreatment
{
get { return new DataSource2<TblTreatmentEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblTreatmentInfoEntity instances in the database.</summary>
public DataSource2<TblTreatmentInfoEntity> TblTreatmentInfo
{
get { return new DataSource2<TblTreatmentInfoEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
/// <summary>returns the datasource to use in a Linq query when targeting TblWaitingListEntity instances in the database.</summary>
public DataSource2<TblWaitingListEntity> TblWaitingList
{
get { return new DataSource2<TblWaitingListEntity>(_adapterToUse, new ElementCreator(), _customFunctionMappings, _contextToUse); }
}
#region Class Property Declarations
/// <summary> Gets / sets the IDataAccessAdapter to use for the queries created with this meta data object.</summary>
/// <remarks> Be aware that the IDataAccessAdapter object set via this property is kept alive by the LLBLGenProQuery objects created with this meta data
/// till they go out of scope.</remarks>
public IDataAccessAdapter AdapterToUse
{
get { return _adapterToUse;}
set { _adapterToUse = value;}
}
/// <summary>Gets or sets the custom function mappings to use. These take higher precedence than the ones in the DQE to use</summary>
public FunctionMappingStore CustomFunctionMappings
{
get { return _customFunctionMappings; }
set { _customFunctionMappings = value; }
}
/// <summary>Gets or sets the Context instance to use for entity fetches.</summary>
public Context ContextToUse
{
get { return _contextToUse;}
set { _contextToUse = value;}
}
#endregion
}
}

View File

@@ -0,0 +1,95 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
//////////////////////////////////////////////////////////////
using System;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Class to define dynamic relations for queries.</summary>
/// <remarks>Dynamic relations are only supported in ansi joins so if you're using Oracle on 8i, you can't use Dynamic Relations. </remarks>
[Serializable]
public class DynamicRelation : DynamicRelationBase
{
/// <summary>Initializes a new instance of the <see cref="DynamicRelation"/> class.</summary>
/// <param name="leftOperand">The left operand, which can only be a derived table definition. No join will take place. </param>
/// <remarks>If a DynamicRelation is created with this CTor, it has to be the only one. It will be ignored if there are more
/// relations in the relation collection.</remarks>
public DynamicRelation(DerivedTableDefinition leftOperand)
{
this.InitClass(JoinHint.None, string.Empty, string.Empty, null, leftOperand, null);
}
/// <summary>Initializes a new instance of the <see cref="DynamicRelation"/> class.</summary>
/// <param name="leftOperand">The left operand.</param>
/// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param>
/// <param name="rightOperand">The right operand.</param>
/// <param name="onClause">The on clause for the join.</param>
public DynamicRelation(DerivedTableDefinition leftOperand, JoinHint joinType, DerivedTableDefinition rightOperand, IPredicate onClause)
{
this.InitClass(joinType, string.Empty, string.Empty, onClause, leftOperand, rightOperand);
}
/// <summary>Initializes a new instance of the <see cref="DynamicRelation"/> class.</summary>
/// <param name="leftOperand">The left operand which is a field.</param>
/// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param>
/// <param name="rightOperand">The right operand which is a derived table.</param>
/// <param name="aliasLeftOperand">The alias of the left operand. If you don't want to / need to alias the left operand (only alias if you have to), specify string.Empty.</param>
/// <param name="onClause">The on clause for the join.</param>
public DynamicRelation(IEntityFieldCore leftOperand, JoinHint joinType, DerivedTableDefinition rightOperand, string aliasLeftOperand, IPredicate onClause)
{
this.InitClass(joinType, aliasLeftOperand, string.Empty, onClause, leftOperand, rightOperand);
}
/// <summary>Initializes a new instance of the <see cref="DynamicRelation"/> class.</summary>
/// <param name="leftOperand">The left operand.</param>
/// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param>
/// <param name="rightOperand">The right operand which is an entity type.</param>
/// <param name="aliasRightOperand">The alias of the right operand. If you don't want to / need to alias the right operand (only alias if you have to), specify string.Empty.</param>
/// <param name="onClause">The on clause for the join.</param>
public DynamicRelation(DerivedTableDefinition leftOperand, JoinHint joinType, Datalib.EntityType rightOperand, string aliasRightOperand, IPredicate onClause)
{
this.InitClass(joinType, string.Empty, aliasRightOperand, onClause, leftOperand, GeneralEntityFactory.Create(rightOperand));
}
/// <summary>Initializes a new instance of the <see cref="DynamicRelation"/> class.</summary>
/// <param name="leftOperand">The left operand, which is an entity.</param>
/// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param>
/// <param name="rightOperand">The right operand which is an entity.</param>
/// <param name="aliasLeftOperand">The alias of the left operand. If you don't want to / need to alias the left operand (only alias if you have to), specify string.Empty.</param>
/// <param name="aliasRightOperand">The alias of the right operand. If you don't want to / need to alias the right operand (only alias if you have to), specify string.Empty.</param>
/// <param name="onClause">The on clause for the join.</param>
public DynamicRelation(Datalib.EntityType leftOperand, JoinHint joinType, Datalib.EntityType rightOperand, string aliasLeftOperand, string aliasRightOperand, IPredicate onClause)
{
this.InitClass(joinType, aliasLeftOperand, aliasRightOperand, onClause, GeneralEntityFactory.Create(leftOperand), GeneralEntityFactory.Create(rightOperand));
}
/// <summary>Initializes a new instance of the <see cref="DynamicRelation"/> class.</summary>
/// <param name="leftOperand">The left operand which is a field.</param>
/// <param name="joinType">Type of the join. If None is specified, Inner is assumed.</param>
/// <param name="rightOperand">The right operand which is an entity.</param>
/// <param name="aliasLeftOperand">The alias of the left operand. If you don't want to / need to alias the left operand (only alias if you have to), specify string.Empty.</param>
/// <param name="aliasRightOperand">The alias of the right operand. If you don't want to / need to alias the right operand (only alias if you have to), specify string.Empty.</param>
/// <param name="onClause">The on clause for the join.</param>
public DynamicRelation(IEntityFieldCore leftOperand, JoinHint joinType, Datalib.EntityType rightOperand, string aliasLeftOperand, string aliasRightOperand, IPredicate onClause)
{
this.InitClass(joinType, aliasLeftOperand, aliasRightOperand, onClause, leftOperand, GeneralEntityFactory.Create(rightOperand));
}
/// <summary>Gets the inheritance provider for inheritance info retrieval for entity operands</summary>
/// <returns>The inheritance info provider</returns>
protected override IInheritanceInfoProvider GetInheritanceProvider()
{
return InheritanceInfoProviderSingleton.GetInstance();
}
}
}

View File

@@ -0,0 +1,60 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblAgeGroup. </summary>
public partial class TblAgeGroupRelations
{
/// <summary>CTor</summary>
public TblAgeGroupRelations()
{
}
/// <summary>Gets all relations of the TblAgeGroupEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
return toReturn;
}
#region Class Property Declarations
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblAgeGroupRelations
{
/// <summary>CTor</summary>
static StaticTblAgeGroupRelations()
{
}
}
}

View File

@@ -0,0 +1,76 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblAgency. </summary>
public partial class TblAgencyRelations
{
/// <summary>CTor</summary>
public TblAgencyRelations()
{
}
/// <summary>Gets all relations of the TblAgencyEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblReferraltoServiceEntityUsingAgencyTypeId);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblAgencyEntity and TblReferraltoServiceEntity over the 1:n relation they have, using the relation between the fields:
/// TblAgency.AgencyTypeId - TblReferraltoService.AgencyTypeId
/// </summary>
public virtual IEntityRelation TblReferraltoServiceEntityUsingAgencyTypeId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblReferraltoServices" , true);
relation.AddEntityFieldPair(TblAgencyFields.AgencyTypeId, TblReferraltoServiceFields.AgencyTypeId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblAgencyEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblReferraltoServiceEntity", false);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblAgencyRelations
{
internal static readonly IEntityRelation TblReferraltoServiceEntityUsingAgencyTypeIdStatic = new TblAgencyRelations().TblReferraltoServiceEntityUsingAgencyTypeId;
/// <summary>CTor</summary>
static StaticTblAgencyRelations()
{
}
}
}

View File

@@ -0,0 +1,76 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblChild. </summary>
public partial class TblChildRelations
{
/// <summary>CTor</summary>
public TblChildRelations()
{
}
/// <summary>Gets all relations of the TblChildEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblPregnanceInfoEntityUsingPreganceId);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblChildEntity and TblPregnanceInfoEntity over the m:1 relation they have, using the relation between the fields:
/// TblChild.PreganceId - TblPregnanceInfo.UniqueKey
/// </summary>
public virtual IEntityRelation TblPregnanceInfoEntityUsingPreganceId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblPregnanceInfo", false);
relation.AddEntityFieldPair(TblPregnanceInfoFields.UniqueKey, TblChildFields.PreganceId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPregnanceInfoEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblChildEntity", true);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblChildRelations
{
internal static readonly IEntityRelation TblPregnanceInfoEntityUsingPreganceIdStatic = new TblChildRelations().TblPregnanceInfoEntityUsingPreganceId;
/// <summary>CTor</summary>
static StaticTblChildRelations()
{
}
}
}

View File

@@ -0,0 +1,76 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblClinicInfo. </summary>
public partial class TblClinicInfoRelations
{
/// <summary>CTor</summary>
public TblClinicInfoRelations()
{
}
/// <summary>Gets all relations of the TblClinicInfoEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblPatientEntityUsingPatientId);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblClinicInfoEntity and TblPatientEntity over the m:1 relation they have, using the relation between the fields:
/// TblClinicInfo.PatientId - TblPatient.PatientId
/// </summary>
public virtual IEntityRelation TblPatientEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblPatient", false);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblClinicInfoFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblClinicInfoEntity", true);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblClinicInfoRelations
{
internal static readonly IEntityRelation TblPatientEntityUsingPatientIdStatic = new TblClinicInfoRelations().TblPatientEntityUsingPatientId;
/// <summary>CTor</summary>
static StaticTblClinicInfoRelations()
{
}
}
}

View File

@@ -0,0 +1,76 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblCommune. </summary>
public partial class TblCommuneRelations
{
/// <summary>CTor</summary>
public TblCommuneRelations()
{
}
/// <summary>Gets all relations of the TblCommuneEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblDistrictEntityUsingDistrictid);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblCommuneEntity and TblDistrictEntity over the m:1 relation they have, using the relation between the fields:
/// TblCommune.Districtid - TblDistrict.Districtid
/// </summary>
public virtual IEntityRelation TblDistrictEntityUsingDistrictid
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblDistrict", false);
relation.AddEntityFieldPair(TblDistrictFields.Districtid, TblCommuneFields.Districtid);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblDistrictEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblCommuneEntity", true);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblCommuneRelations
{
internal static readonly IEntityRelation TblDistrictEntityUsingDistrictidStatic = new TblCommuneRelations().TblDistrictEntityUsingDistrictid;
/// <summary>CTor</summary>
static StaticTblCommuneRelations()
{
}
}
}

View File

@@ -0,0 +1,76 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblDiary. </summary>
public partial class TblDiaryRelations
{
/// <summary>CTor</summary>
public TblDiaryRelations()
{
}
/// <summary>Gets all relations of the TblDiaryEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblPatientEntityUsingPatientId);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblDiaryEntity and TblPatientEntity over the m:1 relation they have, using the relation between the fields:
/// TblDiary.PatientId - TblPatient.PatientId
/// </summary>
public virtual IEntityRelation TblPatientEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblPatient", false);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblDiaryFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblDiaryEntity", true);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblDiaryRelations
{
internal static readonly IEntityRelation TblPatientEntityUsingPatientIdStatic = new TblDiaryRelations().TblPatientEntityUsingPatientId;
/// <summary>CTor</summary>
static StaticTblDiaryRelations()
{
}
}
}

View File

@@ -0,0 +1,92 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblDistrict. </summary>
public partial class TblDistrictRelations
{
/// <summary>CTor</summary>
public TblDistrictRelations()
{
}
/// <summary>Gets all relations of the TblDistrictEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblCommuneEntityUsingDistrictid);
toReturn.Add(this.TblProvinceEntityUsingProvinceid);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblDistrictEntity and TblCommuneEntity over the 1:n relation they have, using the relation between the fields:
/// TblDistrict.Districtid - TblCommune.Districtid
/// </summary>
public virtual IEntityRelation TblCommuneEntityUsingDistrictid
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblCommunes" , true);
relation.AddEntityFieldPair(TblDistrictFields.Districtid, TblCommuneFields.Districtid);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblDistrictEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblCommuneEntity", false);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblDistrictEntity and TblProvinceEntity over the m:1 relation they have, using the relation between the fields:
/// TblDistrict.Provinceid - TblProvince.Provinceid
/// </summary>
public virtual IEntityRelation TblProvinceEntityUsingProvinceid
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblProvince", false);
relation.AddEntityFieldPair(TblProvinceFields.Provinceid, TblDistrictFields.Provinceid);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblProvinceEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblDistrictEntity", true);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblDistrictRelations
{
internal static readonly IEntityRelation TblCommuneEntityUsingDistrictidStatic = new TblDistrictRelations().TblCommuneEntityUsingDistrictid;
internal static readonly IEntityRelation TblProvinceEntityUsingProvinceidStatic = new TblDistrictRelations().TblProvinceEntityUsingProvinceid;
/// <summary>CTor</summary>
static StaticTblDistrictRelations()
{
}
}
}

View File

@@ -0,0 +1,76 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblExaminationInfo. </summary>
public partial class TblExaminationInfoRelations
{
/// <summary>CTor</summary>
public TblExaminationInfoRelations()
{
}
/// <summary>Gets all relations of the TblExaminationInfoEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblPatientEntityUsingPatientId);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblExaminationInfoEntity and TblPatientEntity over the m:1 relation they have, using the relation between the fields:
/// TblExaminationInfo.PatientId - TblPatient.PatientId
/// </summary>
public virtual IEntityRelation TblPatientEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblPatient", false);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblExaminationInfoFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblExaminationInfoEntity", true);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblExaminationInfoRelations
{
internal static readonly IEntityRelation TblPatientEntityUsingPatientIdStatic = new TblExaminationInfoRelations().TblPatientEntityUsingPatientId;
/// <summary>CTor</summary>
static StaticTblExaminationInfoRelations()
{
}
}
}

View File

@@ -0,0 +1,211 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblPatient. </summary>
public partial class TblPatientRelations
{
/// <summary>CTor</summary>
public TblPatientRelations()
{
}
/// <summary>Gets all relations of the TblPatientEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblClinicInfoEntityUsingPatientId);
toReturn.Add(this.TblDiaryEntityUsingPatientId);
toReturn.Add(this.TblExaminationInfoEntityUsingPatientId);
toReturn.Add(this.TblPreClinicsInfoEntityUsingPatientId);
toReturn.Add(this.TblPregnanceInfoEntityUsingPatientId);
toReturn.Add(this.TblReferralsToEntityUsingPatientId);
toReturn.Add(this.TblReferraltoServiceEntityUsingPatientId);
toReturn.Add(this.TblTreatmentInfoEntityUsingPatientId);
toReturn.Add(this.TblReferralFromPlaceEntityUsingReferralId);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblPatientEntity and TblClinicInfoEntity over the 1:n relation they have, using the relation between the fields:
/// TblPatient.PatientId - TblClinicInfo.PatientId
/// </summary>
public virtual IEntityRelation TblClinicInfoEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblClinicInfos" , true);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblClinicInfoFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblClinicInfoEntity", false);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblPatientEntity and TblDiaryEntity over the 1:n relation they have, using the relation between the fields:
/// TblPatient.PatientId - TblDiary.PatientId
/// </summary>
public virtual IEntityRelation TblDiaryEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblDiaries" , true);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblDiaryFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblDiaryEntity", false);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblPatientEntity and TblExaminationInfoEntity over the 1:n relation they have, using the relation between the fields:
/// TblPatient.PatientId - TblExaminationInfo.PatientId
/// </summary>
public virtual IEntityRelation TblExaminationInfoEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblExaminationInfos" , true);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblExaminationInfoFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblExaminationInfoEntity", false);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblPatientEntity and TblPreClinicsInfoEntity over the 1:n relation they have, using the relation between the fields:
/// TblPatient.PatientId - TblPreClinicsInfo.PatientId
/// </summary>
public virtual IEntityRelation TblPreClinicsInfoEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblPreClinicsInfos" , true);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblPreClinicsInfoFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPreClinicsInfoEntity", false);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblPatientEntity and TblPregnanceInfoEntity over the 1:n relation they have, using the relation between the fields:
/// TblPatient.PatientId - TblPregnanceInfo.PatientId
/// </summary>
public virtual IEntityRelation TblPregnanceInfoEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblPregnanceInfos" , true);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblPregnanceInfoFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPregnanceInfoEntity", false);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblPatientEntity and TblReferralsToEntity over the 1:n relation they have, using the relation between the fields:
/// TblPatient.PatientId - TblReferralsTo.PatientId
/// </summary>
public virtual IEntityRelation TblReferralsToEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblReferralsTos" , true);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblReferralsToFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblReferralsToEntity", false);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblPatientEntity and TblReferraltoServiceEntity over the 1:n relation they have, using the relation between the fields:
/// TblPatient.PatientId - TblReferraltoService.PatientId
/// </summary>
public virtual IEntityRelation TblReferraltoServiceEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblReferraltoServices" , true);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblReferraltoServiceFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblReferraltoServiceEntity", false);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblPatientEntity and TblTreatmentInfoEntity over the 1:n relation they have, using the relation between the fields:
/// TblPatient.PatientId - TblTreatmentInfo.PatientId
/// </summary>
public virtual IEntityRelation TblTreatmentInfoEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblTreatmentInfos" , true);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblTreatmentInfoFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTreatmentInfoEntity", false);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblPatientEntity and TblReferralFromPlaceEntity over the m:1 relation they have, using the relation between the fields:
/// TblPatient.ReferralId - TblReferralFromPlace.ReferralId
/// </summary>
public virtual IEntityRelation TblReferralFromPlaceEntityUsingReferralId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblReferralFromPlace", false);
relation.AddEntityFieldPair(TblReferralFromPlaceFields.ReferralId, TblPatientFields.ReferralId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblReferralFromPlaceEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", true);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblPatientRelations
{
internal static readonly IEntityRelation TblClinicInfoEntityUsingPatientIdStatic = new TblPatientRelations().TblClinicInfoEntityUsingPatientId;
internal static readonly IEntityRelation TblDiaryEntityUsingPatientIdStatic = new TblPatientRelations().TblDiaryEntityUsingPatientId;
internal static readonly IEntityRelation TblExaminationInfoEntityUsingPatientIdStatic = new TblPatientRelations().TblExaminationInfoEntityUsingPatientId;
internal static readonly IEntityRelation TblPreClinicsInfoEntityUsingPatientIdStatic = new TblPatientRelations().TblPreClinicsInfoEntityUsingPatientId;
internal static readonly IEntityRelation TblPregnanceInfoEntityUsingPatientIdStatic = new TblPatientRelations().TblPregnanceInfoEntityUsingPatientId;
internal static readonly IEntityRelation TblReferralsToEntityUsingPatientIdStatic = new TblPatientRelations().TblReferralsToEntityUsingPatientId;
internal static readonly IEntityRelation TblReferraltoServiceEntityUsingPatientIdStatic = new TblPatientRelations().TblReferraltoServiceEntityUsingPatientId;
internal static readonly IEntityRelation TblTreatmentInfoEntityUsingPatientIdStatic = new TblPatientRelations().TblTreatmentInfoEntityUsingPatientId;
internal static readonly IEntityRelation TblReferralFromPlaceEntityUsingReferralIdStatic = new TblPatientRelations().TblReferralFromPlaceEntityUsingReferralId;
/// <summary>CTor</summary>
static StaticTblPatientRelations()
{
}
}
}

View File

@@ -0,0 +1,92 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblPreClinicsInfo. </summary>
public partial class TblPreClinicsInfoRelations
{
/// <summary>CTor</summary>
public TblPreClinicsInfoRelations()
{
}
/// <summary>Gets all relations of the TblPreClinicsInfoEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblPatientEntityUsingPatientId);
toReturn.Add(this.TblTestEntityUsingTestid);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblPreClinicsInfoEntity and TblPatientEntity over the m:1 relation they have, using the relation between the fields:
/// TblPreClinicsInfo.PatientId - TblPatient.PatientId
/// </summary>
public virtual IEntityRelation TblPatientEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblPatient", false);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblPreClinicsInfoFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPreClinicsInfoEntity", true);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblPreClinicsInfoEntity and TblTestEntity over the m:1 relation they have, using the relation between the fields:
/// TblPreClinicsInfo.Testid - TblTest.Testid
/// </summary>
public virtual IEntityRelation TblTestEntityUsingTestid
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblTest", false);
relation.AddEntityFieldPair(TblTestFields.Testid, TblPreClinicsInfoFields.Testid);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTestEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPreClinicsInfoEntity", true);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblPreClinicsInfoRelations
{
internal static readonly IEntityRelation TblPatientEntityUsingPatientIdStatic = new TblPreClinicsInfoRelations().TblPatientEntityUsingPatientId;
internal static readonly IEntityRelation TblTestEntityUsingTestidStatic = new TblPreClinicsInfoRelations().TblTestEntityUsingTestid;
/// <summary>CTor</summary>
static StaticTblPreClinicsInfoRelations()
{
}
}
}

View File

@@ -0,0 +1,92 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblPregnanceInfo. </summary>
public partial class TblPregnanceInfoRelations
{
/// <summary>CTor</summary>
public TblPregnanceInfoRelations()
{
}
/// <summary>Gets all relations of the TblPregnanceInfoEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblChildEntityUsingPreganceId);
toReturn.Add(this.TblPatientEntityUsingPatientId);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblPregnanceInfoEntity and TblChildEntity over the 1:n relation they have, using the relation between the fields:
/// TblPregnanceInfo.UniqueKey - TblChild.PreganceId
/// </summary>
public virtual IEntityRelation TblChildEntityUsingPreganceId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblChildren" , true);
relation.AddEntityFieldPair(TblPregnanceInfoFields.UniqueKey, TblChildFields.PreganceId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPregnanceInfoEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblChildEntity", false);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblPregnanceInfoEntity and TblPatientEntity over the m:1 relation they have, using the relation between the fields:
/// TblPregnanceInfo.PatientId - TblPatient.PatientId
/// </summary>
public virtual IEntityRelation TblPatientEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblPatient", false);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblPregnanceInfoFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPregnanceInfoEntity", true);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblPregnanceInfoRelations
{
internal static readonly IEntityRelation TblChildEntityUsingPreganceIdStatic = new TblPregnanceInfoRelations().TblChildEntityUsingPreganceId;
internal static readonly IEntityRelation TblPatientEntityUsingPatientIdStatic = new TblPregnanceInfoRelations().TblPatientEntityUsingPatientId;
/// <summary>CTor</summary>
static StaticTblPregnanceInfoRelations()
{
}
}
}

View File

@@ -0,0 +1,76 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblProvince. </summary>
public partial class TblProvinceRelations
{
/// <summary>CTor</summary>
public TblProvinceRelations()
{
}
/// <summary>Gets all relations of the TblProvinceEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblDistrictEntityUsingProvinceid);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblProvinceEntity and TblDistrictEntity over the 1:n relation they have, using the relation between the fields:
/// TblProvince.Provinceid - TblDistrict.Provinceid
/// </summary>
public virtual IEntityRelation TblDistrictEntityUsingProvinceid
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblDistricts" , true);
relation.AddEntityFieldPair(TblProvinceFields.Provinceid, TblDistrictFields.Provinceid);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblProvinceEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblDistrictEntity", false);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblProvinceRelations
{
internal static readonly IEntityRelation TblDistrictEntityUsingProvinceidStatic = new TblProvinceRelations().TblDistrictEntityUsingProvinceid;
/// <summary>CTor</summary>
static StaticTblProvinceRelations()
{
}
}
}

View File

@@ -0,0 +1,76 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblReferralFromPlace. </summary>
public partial class TblReferralFromPlaceRelations
{
/// <summary>CTor</summary>
public TblReferralFromPlaceRelations()
{
}
/// <summary>Gets all relations of the TblReferralFromPlaceEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblPatientEntityUsingReferralId);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblReferralFromPlaceEntity and TblPatientEntity over the 1:n relation they have, using the relation between the fields:
/// TblReferralFromPlace.ReferralId - TblPatient.ReferralId
/// </summary>
public virtual IEntityRelation TblPatientEntityUsingReferralId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblPatients" , true);
relation.AddEntityFieldPair(TblReferralFromPlaceFields.ReferralId, TblPatientFields.ReferralId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblReferralFromPlaceEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", false);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblReferralFromPlaceRelations
{
internal static readonly IEntityRelation TblPatientEntityUsingReferralIdStatic = new TblReferralFromPlaceRelations().TblPatientEntityUsingReferralId;
/// <summary>CTor</summary>
static StaticTblReferralFromPlaceRelations()
{
}
}
}

View File

@@ -0,0 +1,108 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 3.1
// Code is generated on: Sunday, February 23, 2014 10:56:42 AM
// Code is generated using templates: SD.TemplateBindings.SharedTemplates.NET20
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblReferral. </summary>
public partial class TblReferralRelations
{
/// <summary>CTor</summary>
public TblReferralRelations()
{
}
/// <summary>Gets all relations of the TblReferralEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblAgencyEntityUsingAgencyTypeId);
toReturn.Add(this.TblPatientEntityUsingPatientId);
toReturn.Add(this.TblServiceEntityUsingServiceId);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblReferralEntity and TblAgencyEntity over the m:1 relation they have, using the relation between the fields:
/// TblReferral.AgencyTypeId - TblAgency.AgencyTypeId
/// </summary>
public virtual IEntityRelation TblAgencyEntityUsingAgencyTypeId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblAgency", false);
relation.AddEntityFieldPair(TblAgencyFields.AgencyTypeId, TblReferralFields.AgencyTypeId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblAgencyEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblReferralEntity", true);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblReferralEntity and TblPatientEntity over the m:1 relation they have, using the relation between the fields:
/// TblReferral.PatientId - TblPatient.PatientId
/// </summary>
public virtual IEntityRelation TblPatientEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblPatient", false);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblReferralFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblReferralEntity", true);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblReferralEntity and TblServiceEntity over the m:1 relation they have, using the relation between the fields:
/// TblReferral.ServiceId - TblService.ServiceId
/// </summary>
public virtual IEntityRelation TblServiceEntityUsingServiceId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblService", false);
relation.AddEntityFieldPair(TblServiceFields.ServiceId, TblReferralFields.ServiceId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblServiceEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblReferralEntity", true);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblReferralRelations
{
internal static readonly IEntityRelation TblAgencyEntityUsingAgencyTypeIdStatic = new TblReferralRelations().TblAgencyEntityUsingAgencyTypeId;
internal static readonly IEntityRelation TblPatientEntityUsingPatientIdStatic = new TblReferralRelations().TblPatientEntityUsingPatientId;
internal static readonly IEntityRelation TblServiceEntityUsingServiceIdStatic = new TblReferralRelations().TblServiceEntityUsingServiceId;
/// <summary>CTor</summary>
static StaticTblReferralRelations()
{
}
}
}

View File

@@ -0,0 +1,76 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblReferralsTo. </summary>
public partial class TblReferralsToRelations
{
/// <summary>CTor</summary>
public TblReferralsToRelations()
{
}
/// <summary>Gets all relations of the TblReferralsToEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblPatientEntityUsingPatientId);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblReferralsToEntity and TblPatientEntity over the m:1 relation they have, using the relation between the fields:
/// TblReferralsTo.PatientId - TblPatient.PatientId
/// </summary>
public virtual IEntityRelation TblPatientEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblPatient", false);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblReferralsToFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblReferralsToEntity", true);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblReferralsToRelations
{
internal static readonly IEntityRelation TblPatientEntityUsingPatientIdStatic = new TblReferralsToRelations().TblPatientEntityUsingPatientId;
/// <summary>CTor</summary>
static StaticTblReferralsToRelations()
{
}
}
}

View File

@@ -0,0 +1,92 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblReferraltoService. </summary>
public partial class TblReferraltoServiceRelations
{
/// <summary>CTor</summary>
public TblReferraltoServiceRelations()
{
}
/// <summary>Gets all relations of the TblReferraltoServiceEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblAgencyEntityUsingAgencyTypeId);
toReturn.Add(this.TblPatientEntityUsingPatientId);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblReferraltoServiceEntity and TblAgencyEntity over the m:1 relation they have, using the relation between the fields:
/// TblReferraltoService.AgencyTypeId - TblAgency.AgencyTypeId
/// </summary>
public virtual IEntityRelation TblAgencyEntityUsingAgencyTypeId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblAgency", false);
relation.AddEntityFieldPair(TblAgencyFields.AgencyTypeId, TblReferraltoServiceFields.AgencyTypeId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblAgencyEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblReferraltoServiceEntity", true);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblReferraltoServiceEntity and TblPatientEntity over the m:1 relation they have, using the relation between the fields:
/// TblReferraltoService.PatientId - TblPatient.PatientId
/// </summary>
public virtual IEntityRelation TblPatientEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblPatient", false);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblReferraltoServiceFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblReferraltoServiceEntity", true);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblReferraltoServiceRelations
{
internal static readonly IEntityRelation TblAgencyEntityUsingAgencyTypeIdStatic = new TblReferraltoServiceRelations().TblAgencyEntityUsingAgencyTypeId;
internal static readonly IEntityRelation TblPatientEntityUsingPatientIdStatic = new TblReferraltoServiceRelations().TblPatientEntityUsingPatientId;
/// <summary>CTor</summary>
static StaticTblReferraltoServiceRelations()
{
}
}
}

View File

@@ -0,0 +1,76 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblRegimen. </summary>
public partial class TblRegimenRelations
{
/// <summary>CTor</summary>
public TblRegimenRelations()
{
}
/// <summary>Gets all relations of the TblRegimenEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblTreatmentInfoEntityUsingRegimenid);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblRegimenEntity and TblTreatmentInfoEntity over the 1:n relation they have, using the relation between the fields:
/// TblRegimen.Regimenid - TblTreatmentInfo.Regimenid
/// </summary>
public virtual IEntityRelation TblTreatmentInfoEntityUsingRegimenid
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblTreatmentInfos" , true);
relation.AddEntityFieldPair(TblRegimenFields.Regimenid, TblTreatmentInfoFields.Regimenid);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblRegimenEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTreatmentInfoEntity", false);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblRegimenRelations
{
internal static readonly IEntityRelation TblTreatmentInfoEntityUsingRegimenidStatic = new TblRegimenRelations().TblTreatmentInfoEntityUsingRegimenid;
/// <summary>CTor</summary>
static StaticTblRegimenRelations()
{
}
}
}

View File

@@ -0,0 +1,76 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblRegimenStopReason. </summary>
public partial class TblRegimenStopReasonRelations
{
/// <summary>CTor</summary>
public TblRegimenStopReasonRelations()
{
}
/// <summary>Gets all relations of the TblRegimenStopReasonEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblTreatmentInfoEntityUsingReasonId);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblRegimenStopReasonEntity and TblTreatmentInfoEntity over the 1:n relation they have, using the relation between the fields:
/// TblRegimenStopReason.ReasonId - TblTreatmentInfo.ReasonId
/// </summary>
public virtual IEntityRelation TblTreatmentInfoEntityUsingReasonId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblTreatmentInfos" , true);
relation.AddEntityFieldPair(TblRegimenStopReasonFields.ReasonId, TblTreatmentInfoFields.ReasonId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblRegimenStopReasonEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTreatmentInfoEntity", false);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblRegimenStopReasonRelations
{
internal static readonly IEntityRelation TblTreatmentInfoEntityUsingReasonIdStatic = new TblRegimenStopReasonRelations().TblTreatmentInfoEntityUsingReasonId;
/// <summary>CTor</summary>
static StaticTblRegimenStopReasonRelations()
{
}
}
}

View File

@@ -0,0 +1,60 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblService. </summary>
public partial class TblServiceRelations
{
/// <summary>CTor</summary>
public TblServiceRelations()
{
}
/// <summary>Gets all relations of the TblServiceEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
return toReturn;
}
#region Class Property Declarations
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblServiceRelations
{
/// <summary>CTor</summary>
static StaticTblServiceRelations()
{
}
}
}

View File

@@ -0,0 +1,76 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblTest. </summary>
public partial class TblTestRelations
{
/// <summary>CTor</summary>
public TblTestRelations()
{
}
/// <summary>Gets all relations of the TblTestEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblPreClinicsInfoEntityUsingTestid);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblTestEntity and TblPreClinicsInfoEntity over the 1:n relation they have, using the relation between the fields:
/// TblTest.Testid - TblPreClinicsInfo.Testid
/// </summary>
public virtual IEntityRelation TblPreClinicsInfoEntityUsingTestid
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblPreClinicsInfos" , true);
relation.AddEntityFieldPair(TblTestFields.Testid, TblPreClinicsInfoFields.Testid);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTestEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPreClinicsInfoEntity", false);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblTestRelations
{
internal static readonly IEntityRelation TblPreClinicsInfoEntityUsingTestidStatic = new TblTestRelations().TblPreClinicsInfoEntityUsingTestid;
/// <summary>CTor</summary>
static StaticTblTestRelations()
{
}
}
}

View File

@@ -0,0 +1,124 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblTreatmentInfo. </summary>
public partial class TblTreatmentInfoRelations
{
/// <summary>CTor</summary>
public TblTreatmentInfoRelations()
{
}
/// <summary>Gets all relations of the TblTreatmentInfoEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblPatientEntityUsingPatientId);
toReturn.Add(this.TblRegimenEntityUsingRegimenid);
toReturn.Add(this.TblRegimenStopReasonEntityUsingReasonId);
toReturn.Add(this.TblTreatmentEntityUsingTreatmentId);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblTreatmentInfoEntity and TblPatientEntity over the m:1 relation they have, using the relation between the fields:
/// TblTreatmentInfo.PatientId - TblPatient.PatientId
/// </summary>
public virtual IEntityRelation TblPatientEntityUsingPatientId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblPatient", false);
relation.AddEntityFieldPair(TblPatientFields.PatientId, TblTreatmentInfoFields.PatientId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblPatientEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTreatmentInfoEntity", true);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblTreatmentInfoEntity and TblRegimenEntity over the m:1 relation they have, using the relation between the fields:
/// TblTreatmentInfo.Regimenid - TblRegimen.Regimenid
/// </summary>
public virtual IEntityRelation TblRegimenEntityUsingRegimenid
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblRegiman", false);
relation.AddEntityFieldPair(TblRegimenFields.Regimenid, TblTreatmentInfoFields.Regimenid);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblRegimenEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTreatmentInfoEntity", true);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblTreatmentInfoEntity and TblRegimenStopReasonEntity over the m:1 relation they have, using the relation between the fields:
/// TblTreatmentInfo.ReasonId - TblRegimenStopReason.ReasonId
/// </summary>
public virtual IEntityRelation TblRegimenStopReasonEntityUsingReasonId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblRegimenStopReason", false);
relation.AddEntityFieldPair(TblRegimenStopReasonFields.ReasonId, TblTreatmentInfoFields.ReasonId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblRegimenStopReasonEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTreatmentInfoEntity", true);
return relation;
}
}
/// <summary>Returns a new IEntityRelation object, between TblTreatmentInfoEntity and TblTreatmentEntity over the m:1 relation they have, using the relation between the fields:
/// TblTreatmentInfo.TreatmentId - TblTreatment.TreatmentId
/// </summary>
public virtual IEntityRelation TblTreatmentEntityUsingTreatmentId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.ManyToOne, "TblTreatment", false);
relation.AddEntityFieldPair(TblTreatmentFields.TreatmentId, TblTreatmentInfoFields.TreatmentId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTreatmentEntity", false);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTreatmentInfoEntity", true);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblTreatmentInfoRelations
{
internal static readonly IEntityRelation TblPatientEntityUsingPatientIdStatic = new TblTreatmentInfoRelations().TblPatientEntityUsingPatientId;
internal static readonly IEntityRelation TblRegimenEntityUsingRegimenidStatic = new TblTreatmentInfoRelations().TblRegimenEntityUsingRegimenid;
internal static readonly IEntityRelation TblRegimenStopReasonEntityUsingReasonIdStatic = new TblTreatmentInfoRelations().TblRegimenStopReasonEntityUsingReasonId;
internal static readonly IEntityRelation TblTreatmentEntityUsingTreatmentIdStatic = new TblTreatmentInfoRelations().TblTreatmentEntityUsingTreatmentId;
/// <summary>CTor</summary>
static StaticTblTreatmentInfoRelations()
{
}
}
}

View File

@@ -0,0 +1,76 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblTreatment. </summary>
public partial class TblTreatmentRelations
{
/// <summary>CTor</summary>
public TblTreatmentRelations()
{
}
/// <summary>Gets all relations of the TblTreatmentEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
toReturn.Add(this.TblTreatmentInfoEntityUsingTreatmentId);
return toReturn;
}
#region Class Property Declarations
/// <summary>Returns a new IEntityRelation object, between TblTreatmentEntity and TblTreatmentInfoEntity over the 1:n relation they have, using the relation between the fields:
/// TblTreatment.TreatmentId - TblTreatmentInfo.TreatmentId
/// </summary>
public virtual IEntityRelation TblTreatmentInfoEntityUsingTreatmentId
{
get
{
IEntityRelation relation = new EntityRelation(SD.LLBLGen.Pro.ORMSupportClasses.RelationType.OneToMany, "TblTreatmentInfos" , true);
relation.AddEntityFieldPair(TblTreatmentFields.TreatmentId, TblTreatmentInfoFields.TreatmentId);
relation.InheritanceInfoPkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTreatmentEntity", true);
relation.InheritanceInfoFkSideEntity = InheritanceInfoProviderSingleton.GetInstance().GetInheritanceInfo("TblTreatmentInfoEntity", false);
return relation;
}
}
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblTreatmentRelations
{
internal static readonly IEntityRelation TblTreatmentInfoEntityUsingTreatmentIdStatic = new TblTreatmentRelations().TblTreatmentInfoEntityUsingTreatmentId;
/// <summary>CTor</summary>
static StaticTblTreatmentRelations()
{
}
}
}

View File

@@ -0,0 +1,60 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Collections.Generic;
using Datalib;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.RelationClasses
{
/// <summary>Implements the relations factory for the entity: TblWaitingList. </summary>
public partial class TblWaitingListRelations
{
/// <summary>CTor</summary>
public TblWaitingListRelations()
{
}
/// <summary>Gets all relations of the TblWaitingListEntity as a list of IEntityRelation objects.</summary>
/// <returns>a list of IEntityRelation objects</returns>
public virtual List<IEntityRelation> GetAllRelations()
{
List<IEntityRelation> toReturn = new List<IEntityRelation>();
return toReturn;
}
#region Class Property Declarations
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSubTypeRelation(string subTypeEntityName) { return null; }
/// <summary>stub, not used in this entity, only for TargetPerEntity entities.</summary>
public virtual IEntityRelation GetSuperTypeRelation() { return null;}
#endregion
#region Included Code
#endregion
}
/// <summary>Static class which is used for providing relationship instances which are re-used internally for syncing</summary>
internal static class StaticTblWaitingListRelations
{
/// <summary>CTor</summary>
static StaticTblWaitingListRelations()
{
}
}
}

View File

@@ -0,0 +1,355 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 3.1
// Code is generated on: Monday, March 03, 2014 10:11:45 AM
// Code is generated using templates: SD.TemplateBindings.SharedTemplates.NET20
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.ComponentModel;
using System.Data;
using System.Collections;
#if !CF
using System.Runtime.Serialization;
#endif
using Datalib.EntityClasses;
using Datalib.HelperClasses;
using Datalib.FactoryClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.TypedListClasses
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>Typed datatable for the list 'TblWaitingLists'.<br/><br/></summary>
#if !CF
[Serializable, System.ComponentModel.DesignerCategory("Code")]
[ToolboxItem(true)]
[DesignTimeVisible(true)]
#endif
public partial class TblWaitingListsTypedList : TypedListBase2<TblWaitingListsRow>, ITypedListLgp2
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfacesList
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private DataColumn _columnExamDate;
private DataColumn _columnReExamDate;
private DataColumn _columnPatientId;
private ResultsetFields _fields;
private IRelationPredicateBucket _filterBucket;
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalMembers
// __LLBLGENPRO_USER_CODE_REGION_END
private static Hashtable _customProperties;
private static Hashtable _fieldsCustomProperties;
#endregion
#region Class Constants
/// <summary>The amount of fields in the resultset.</summary>
private const int AmountOfFields = 3;
#endregion
/// <summary>Static CTor for setting up custom property hashtables.</summary>
static TblWaitingListsTypedList()
{
SetupCustomPropertyHashtables();
}
/// <summary>CTor</summary>
public TblWaitingListsTypedList():base("TblWaitingLists")
{
InitClass(false);
}
/// <summary>CTor</summary>
/// <param name="obeyWeakRelations">The flag to signal the collection what kind of join statements to generate in the query statement. </param>
public TblWaitingListsTypedList(bool obeyWeakRelations):base("TblWaitingLists")
{
InitClass(obeyWeakRelations);
}
#if !CF
/// <summary>Protected constructor for deserialization.</summary>
/// <param name="info"></param>
/// <param name="context"></param>
protected TblWaitingListsTypedList(SerializationInfo info, StreamingContext context):base(info, context)
{
if(SerializationHelper.Optimization == SerializationOptimization.None)
{
InitMembers();
BuildResultset();
}
}
#endif
/// <summary>Gets the IEntityFields2 collection of fields of this typed list. </summary>
/// <returns>Ready to use IEntityFields2 collection object.</returns>
public virtual IEntityFields2 GetFieldsInfo()
{
return _fields;
}
/// <summary>Gets the IRelationPredicateBucket object which contains the relation information for this Typed List. </summary>
/// <returns>Ready to use IRelationPredicateBucket object.</returns>
public virtual IRelationPredicateBucket GetRelationInfo()
{
_filterBucket = new RelationPredicateBucket();
BuildRelationSet();
return _filterBucket;
}
/// <summary>Creates a new typed row during the build of the datatable during a Fill session by a dataadapter.</summary>
/// <param name="rowBuilder">supplied row builder to pass to the typed row</param>
/// <returns>the new typed datarow</returns>
protected override DataRow NewRowFromBuilder(DataRowBuilder rowBuilder)
{
return new TblWaitingListsRow(rowBuilder);
}
/// <summary>Initializes the hashtables for the typed list type and typed list field custom properties. </summary>
private static void SetupCustomPropertyHashtables()
{
_customProperties = new Hashtable();
_fieldsCustomProperties = new Hashtable();
Hashtable fieldHashtable;
fieldHashtable = new Hashtable();
_fieldsCustomProperties.Add("ExamDate", fieldHashtable);
fieldHashtable = new Hashtable();
_fieldsCustomProperties.Add("ReExamDate", fieldHashtable);
fieldHashtable = new Hashtable();
_fieldsCustomProperties.Add("PatientId", fieldHashtable);
}
/// <summary>Builds the relation set for this typed list, inside the filterBucket object.</summary>
private void BuildRelationSet()
{
_filterBucket.Relations.ObeyWeakRelations = base.ObeyWeakRelations;
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalRelations
// __LLBLGENPRO_USER_CODE_REGION_END
OnRelationSetBuilt(_filterBucket.Relations);
}
/// <summary>Builds the resultset fields, stored in the private _fields object</summary>
private void BuildResultset()
{
_fields = new ResultsetFields(AmountOfFields);
_fields.DefineField(TblExaminationInfoFields.ExamDate, 0, "ExamDate", "", AggregateFunction.Max);
_fields.DefineField(TblExaminationInfoFields.ReExamDate, 1, "ReExamDate", "", AggregateFunction.None);
_fields.DefineField(TblExaminationInfoFields.PatientId, 2, "PatientId", "", AggregateFunction.None);
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalFields
// be sure to call _fields.Expand(number of new fields) first.
// __LLBLGENPRO_USER_CODE_REGION_END
OnResultsetBuilt(_fields);
}
/// <summary>Initialize the datastructures.</summary>
/// <param name="obeyWeakRelations">flag for the internal used relations object</param>
protected override void InitClass(bool obeyWeakRelations)
{
TableName = "TblWaitingLists";
this.ObeyWeakRelations = obeyWeakRelations;
_columnExamDate = GeneralUtils.CreateTypedDataTableColumn("ExamDate", @"ExamDate", typeof(System.DateTime), this.Columns);
_columnReExamDate = GeneralUtils.CreateTypedDataTableColumn("ReExamDate", @"ReExamDate", typeof(System.DateTime), this.Columns);
_columnPatientId = GeneralUtils.CreateTypedDataTableColumn("PatientId", @"PatientId", typeof(System.String), this.Columns);
// __LLBLGENPRO_USER_CODE_REGION_START InitClass
// __LLBLGENPRO_USER_CODE_REGION_END
BuildResultset();
_filterBucket = new RelationPredicateBucket();
BuildRelationSet();
OnInitialized();
}
/// <summary>Initializes the members, after a clone action.</summary>
private void InitMembers()
{
_columnExamDate = this.Columns["ExamDate"];
_columnReExamDate = this.Columns["ReExamDate"];
_columnPatientId = this.Columns["PatientId"];
// __LLBLGENPRO_USER_CODE_REGION_START InitMembers
// __LLBLGENPRO_USER_CODE_REGION_END
OnInitialized();
}
/// <summary>Clones this instance.</summary>
/// <returns>A clone of this instance</returns>
public override DataTable Clone()
{
TblWaitingListsTypedList cloneToReturn = ((TblWaitingListsTypedList)(base.Clone()));
cloneToReturn.InitMembers();
return cloneToReturn;
}
#if !CF
/// <summary>Creates a new instance of the DataTable class.</summary>
/// <returns>a new instance of a datatable with this schema.</returns>
protected override DataTable CreateInstance()
{
return new TblWaitingListsTypedList();
}
#endif
#region Class Property Declarations
/// <summary>The custom properties for this TypedList type.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Hashtable CustomProperties
{
get { return _customProperties;}
}
/// <summary>The custom properties for the type of this TypedList instance.</summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[System.ComponentModel.Browsable(false)]
public virtual Hashtable CustomPropertiesOfType
{
get { return TblWaitingListsTypedList.CustomProperties;}
}
/// <summary>The custom properties for the fields of this TypedList type. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
public static Hashtable FieldsCustomProperties
{
get { return _fieldsCustomProperties;}
}
/// <summary>The custom properties for the fields of the type of this TypedList instance. The returned Hashtable contains per fieldname a hashtable of name-value pairs. </summary>
/// <remarks>The data returned from this property should be considered read-only: it is not thread safe to alter this data at runtime.</remarks>
[System.ComponentModel.Browsable(false)]
public virtual Hashtable FieldsCustomPropertiesOfType
{
get { return TblWaitingListsTypedList.FieldsCustomProperties;}
}
/// <summary>Returns the column object belonging to the TypedList field ExamDate</summary>
internal DataColumn ExamDateColumn
{
get { return _columnExamDate; }
}
/// <summary>Returns the column object belonging to the TypedList field ReExamDate</summary>
internal DataColumn ReExamDateColumn
{
get { return _columnReExamDate; }
}
/// <summary>Returns the column object belonging to the TypedList field PatientId</summary>
internal DataColumn PatientIdColumn
{
get { return _columnPatientId; }
}
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalColumnProperties
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Custom TypedList code
// __LLBLGENPRO_USER_CODE_REGION_START CustomTypedListCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included Code
#endregion
}
/// <summary>Typed datarow for the typed datatable TblWaitingLists</summary>
public partial class TblWaitingListsRow : DataRow
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalInterfacesRow
// __LLBLGENPRO_USER_CODE_REGION_END
{
#region Class Member Declarations
private TblWaitingListsTypedList _parent;
#endregion
/// <summary>CTor</summary>
/// <param name="rowBuilder">Row builder object to use when building this row</param>
protected internal TblWaitingListsRow(DataRowBuilder rowBuilder) : base(rowBuilder)
{
_parent = ((TblWaitingListsTypedList)(this.Table));
}
#region Class Property Declarations
/// <summary>Gets / sets the value of the TypedList field ExamDate<br/><br/></summary>
/// <remarks>Mapped on: TblExaminationInfo.ExamDate</remarks>
public System.DateTime ExamDate
{
get { return IsExamDateNull() ? (System.DateTime)TypeDefaultValue.GetDefaultValue(typeof(System.DateTime)) : (System.DateTime)this[_parent.ExamDateColumn]; }
set { this[_parent.ExamDateColumn] = value; }
}
/// <summary>Returns true if the TypedList field ExamDate is NULL, false otherwise.</summary>
public bool IsExamDateNull()
{
return IsNull(_parent.ExamDateColumn);
}
/// <summary>Sets the TypedList field ExamDate to NULL. Not recommended; a typed list should be used as a readonly object.</summary>
public void SetExamDateNull()
{
this[_parent.ExamDateColumn] = System.Convert.DBNull;
}
/// <summary>Gets / sets the value of the TypedList field ReExamDate<br/><br/></summary>
/// <remarks>Mapped on: TblExaminationInfo.ReExamDate</remarks>
public System.DateTime ReExamDate
{
get { return IsReExamDateNull() ? (System.DateTime)TypeDefaultValue.GetDefaultValue(typeof(System.DateTime)) : (System.DateTime)this[_parent.ReExamDateColumn]; }
set { this[_parent.ReExamDateColumn] = value; }
}
/// <summary>Returns true if the TypedList field ReExamDate is NULL, false otherwise.</summary>
public bool IsReExamDateNull()
{
return IsNull(_parent.ReExamDateColumn);
}
/// <summary>Sets the TypedList field ReExamDate to NULL. Not recommended; a typed list should be used as a readonly object.</summary>
public void SetReExamDateNull()
{
this[_parent.ReExamDateColumn] = System.Convert.DBNull;
}
/// <summary>Gets / sets the value of the TypedList field PatientId<br/><br/></summary>
/// <remarks>Mapped on: TblExaminationInfo.PatientId</remarks>
public System.String PatientId
{
get { return IsPatientIdNull() ? (System.String)TypeDefaultValue.GetDefaultValue(typeof(System.String)) : (System.String)this[_parent.PatientIdColumn]; }
set { this[_parent.PatientIdColumn] = value; }
}
/// <summary>Returns true if the TypedList field PatientId is NULL, false otherwise.</summary>
public bool IsPatientIdNull()
{
return IsNull(_parent.PatientIdColumn);
}
/// <summary>Sets the TypedList field PatientId to NULL. Not recommended; a typed list should be used as a readonly object.</summary>
public void SetPatientIdNull()
{
this[_parent.PatientIdColumn] = System.Convert.DBNull;
}
#endregion
#region Custom Typed List Row Code
// __LLBLGENPRO_USER_CODE_REGION_START CustomTypedListRowCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included Row Code
#endregion
}
}

View File

@@ -0,0 +1,28 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Data;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.DatabaseSpecific
{
/// <summary>Class which contains the static logic to execute action stored procedures in the database.</summary>
public static partial class ActionProcedures
{
#region Included Code
#endregion
}
}

View File

@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="ConnectionString.MS Access (OleDb)" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Projects\PatientMan\database\FHI.mdb;User Id=admin;Password=;Jet OLEDB:System Database=;Jet OLEDB:Database password="/>
</appSettings>
</configuration>

View File

@@ -0,0 +1,59 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: System.CLSCompliant(true)]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]

View File

@@ -0,0 +1,122 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Data;
using System.Data.Common;
using System.Configuration;
using SD.LLBLGen.Pro.ORMSupportClasses;
using SD.LLBLGen.Pro.DQE.Access;
namespace Datalib.DatabaseSpecific
{
// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
// __LLBLGENPRO_USER_CODE_REGION_END
/// <summary>Data access adapter class, which controls the complete database interaction with the database for all objects.</summary>
/// <remarks>Use a DataAccessAdapter object solely per thread, and per connection. A DataAccessAdapter object contains 1 active connection
/// and no thread-access scheduling code. This means that you need to create a new DataAccessAdapter object if you want to utilize
/// in another thread a new connection and a new transaction or want to open a new connection.</remarks>
public partial class DataAccessAdapter : DataAccessAdapterBase
{
#region Public static members
/// <summary>The name of the key in the *.config file of the executing application which contains the connection string.</summary>
/// <remarks>Default: the value set in the LLBLGen Pro project properties</remarks>
public static string ConnectionStringKeyName="ConnectionString.MS Access (OleDb)";
#endregion
/// <summary>CTor</summary>
public DataAccessAdapter() : this(ReadConnectionStringFromConfig(), false, null, null)
{
}
/// <summary>CTor</summary>
/// <param name="keepConnectionOpen">when true, the DataAccessAdapter will not close an opened connection. Use this for multi action usage.</param>
public DataAccessAdapter(bool keepConnectionOpen) : this(ReadConnectionStringFromConfig(), keepConnectionOpen, null, null)
{
}
/// <summary>CTor</summary>
/// <param name="connectionString">The connection string to use when connecting to the database.</param>
public DataAccessAdapter(string connectionString) : this(connectionString, false, null, null)
{
}
/// <summary>CTor</summary>
/// <param name="connectionString">The connection string to use when connecting to the database.</param>
/// <param name="keepConnectionOpen">when true, the DataAccessAdapter will not close an opened connection. Use this for multi action usage.</param>
public DataAccessAdapter(string connectionString, bool keepConnectionOpen) : this(connectionString, keepConnectionOpen, null, null)
{
}
/// <summary>CTor.</summary>
/// <param name="connectionString">The connection string to use when connecting to the database.</param>
/// <param name="keepConnectionOpen">when true, the DataAccessAdapter will not close an opened connection. Use this for multi action usage.</param>
/// <param name="catalogNameUsageSetting"> Configures this data access adapter object how to threat catalog names in persistence information.</param>
/// <param name="catalogNameToUse"> The name to use if catalogNameUsageSetting is set to ForceName. Ignored otherwise.</param>
/// <remarks>For backwards compatibility.</remarks>
public DataAccessAdapter(string connectionString, bool keepConnectionOpen, CatalogNameUsage catalogNameUsageSetting, string catalogNameToUse)
: base(PersistenceInfoProviderSingleton.GetInstance())
{
InitClassPhase2(connectionString, keepConnectionOpen, catalogNameUsageSetting, SchemaNameUsage.Default, catalogNameToUse, string.Empty, null, null);
}
/// <summary>CTor</summary>
/// <param name="connectionString">The connection string to use when connecting to the database.</param>
/// <param name="keepConnectionOpen">when true, the DataAccessAdapter will not close an opened connection. Use this for multi action usage.</param>
/// <param name="schemaNameUsageSetting">Configures this data access adapter object how to threat schema names in persistence information.</param>
/// <param name="schemaNameToUse">Oracle specific. The name to use if schemaNameUsageSetting is set to ForceName. Ignored otherwise.</param>
public DataAccessAdapter(string connectionString, bool keepConnectionOpen, SchemaNameUsage schemaNameUsageSetting, string schemaNameToUse)
: base(PersistenceInfoProviderSingleton.GetInstance())
{
InitClassPhase2(connectionString, keepConnectionOpen, CatalogNameUsage.Default, schemaNameUsageSetting, string.Empty, schemaNameToUse, null, null);
}
/// <summary>CTor.</summary>
/// <param name="connectionString">The connection string to use when connecting to the database.</param>
/// <param name="keepConnectionOpen">when true, the DataAccessAdapter will not close an opened connection. Use this for multi action usage.</param>
/// <param name="catalogNameOverwrites"> The from-to name value pairs and setting for the overwriting of catalog names. Can be null.</param>
/// <param name="schemaNameOverwrites"> The from-to name value pairs and setting for the overwriting of schema names. Can be null.</param>
public DataAccessAdapter(string connectionString, bool keepConnectionOpen, CatalogNameOverwriteHashtable catalogNameOverwrites, SchemaNameOverwriteHashtable schemaNameOverwrites)
: base(PersistenceInfoProviderSingleton.GetInstance())
{
InitClassPhase2(connectionString, keepConnectionOpen, CatalogNameUsage.Default, SchemaNameUsage.Default, string.Empty, string.Empty, catalogNameOverwrites, schemaNameOverwrites);
}
/// <summary>Creates a new Dynamic Query engine object and passes in the defined catalog/schema overwrite hashtables.</summary>
protected override DynamicQueryEngineBase CreateDynamicQueryEngine()
{
return this.PostProcessNewDynamicQueryEngine(new DynamicQueryEngine());
}
/// <summary>Reads the value of the setting with the key ConnectionStringKeyName from the *.config file and stores that value as the active connection string to use for this object.</summary>
/// <returns>connection string read</returns>
private static string ReadConnectionStringFromConfig()
{
return ConfigFileHelper.ReadConnectionStringFromConfig(ConnectionStringKeyName);
}
#region Custom DataAccessAdapter code.
// __LLBLGENPRO_USER_CODE_REGION_START CustomDataAccessAdapterCode
// __LLBLGENPRO_USER_CODE_REGION_END
#endregion
#region Included Code
#endregion
}
}

View File

@@ -0,0 +1,398 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
//////////////////////////////////////////////////////////////
using System;
using System.Collections;
using System.Data;
using SD.LLBLGen.Pro.ORMSupportClasses;
namespace Datalib.DatabaseSpecific
{
/// <summary>Singleton implementation of the PersistenceInfoProvider. This class is the singleton wrapper through which the actual instance is retrieved.</summary>
/// <remarks>It uses a single instance of an internal class. The access isn't marked with locks as the PersistenceInfoProviderBase class is threadsafe.</remarks>
internal static class PersistenceInfoProviderSingleton
{
#region Class Member Declarations
private static readonly IPersistenceInfoProvider _providerInstance = new PersistenceInfoProviderCore();
#endregion
/// <summary>Dummy static constructor to make sure threadsafe initialization is performed.</summary>
static PersistenceInfoProviderSingleton()
{
}
/// <summary>Gets the singleton instance of the PersistenceInfoProviderCore</summary>
/// <returns>Instance of the PersistenceInfoProvider.</returns>
public static IPersistenceInfoProvider GetInstance()
{
return _providerInstance;
}
}
/// <summary>Actual implementation of the PersistenceInfoProvider. Used by singleton wrapper.</summary>
internal class PersistenceInfoProviderCore : PersistenceInfoProviderBase
{
/// <summary>Initializes a new instance of the <see cref="PersistenceInfoProviderCore"/> class.</summary>
internal PersistenceInfoProviderCore()
{
Init();
}
/// <summary>Method which initializes the internal datastores with the structure of hierarchical types.</summary>
private void Init()
{
this.InitClass(22);
InitTblAgeGroupEntityMappings();
InitTblAgencyEntityMappings();
InitTblChildEntityMappings();
InitTblClinicInfoEntityMappings();
InitTblCommuneEntityMappings();
InitTblDiaryEntityMappings();
InitTblDistrictEntityMappings();
InitTblExaminationInfoEntityMappings();
InitTblPatientEntityMappings();
InitTblPreClinicsInfoEntityMappings();
InitTblPregnanceInfoEntityMappings();
InitTblProvinceEntityMappings();
InitTblReferralFromPlaceEntityMappings();
InitTblReferralsToEntityMappings();
InitTblReferraltoServiceEntityMappings();
InitTblRegimenEntityMappings();
InitTblRegimenStopReasonEntityMappings();
InitTblServiceEntityMappings();
InitTblTestEntityMappings();
InitTblTreatmentEntityMappings();
InitTblTreatmentInfoEntityMappings();
InitTblWaitingListEntityMappings();
}
/// <summary>Inits TblAgeGroupEntity's mappings</summary>
private void InitTblAgeGroupEntityMappings()
{
this.AddElementMapping("TblAgeGroupEntity", @"FHI", @"Default", "tblAgeGroup", 4, 0);
this.AddElementFieldMapping("TblAgeGroupEntity", "Age", "Age", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 0);
this.AddElementFieldMapping("TblAgeGroupEntity", "Grp1", "Grp1", true, "VarWChar", 10, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblAgeGroupEntity", "Grp2", "Grp2", true, "VarWChar", 10, 0, 0, false, "", null, typeof(System.String), 2);
this.AddElementFieldMapping("TblAgeGroupEntity", "Id", "ID", false, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 3);
}
/// <summary>Inits TblAgencyEntity's mappings</summary>
private void InitTblAgencyEntityMappings()
{
this.AddElementMapping("TblAgencyEntity", @"FHI", @"Default", "tblAgency", 3, 0);
this.AddElementFieldMapping("TblAgencyEntity", "AgencyTypeId", "AgencyTypeID", false, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblAgencyEntity", "EAgencyTypeName", "eAgencyTypeName", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblAgencyEntity", "VAgencyTypeName", "vAgencyTypeName", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 2);
}
/// <summary>Inits TblChildEntity's mappings</summary>
private void InitTblChildEntityMappings()
{
this.AddElementMapping("TblChildEntity", @"FHI", @"Default", "tblChildren", 13, 0);
this.AddElementFieldMapping("TblChildEntity", "ChildId", "ChildId", true, "VarWChar", 15, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblChildEntity", "ChildName", "ChildName", true, "VarWChar", 25, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblChildEntity", "Ctxdate", "CTXDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 2);
this.AddElementFieldMapping("TblChildEntity", "FeedingType", "FeedingType", false, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 3);
this.AddElementFieldMapping("TblChildEntity", "Hiv18Date", "HIV18Date", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 4);
this.AddElementFieldMapping("TblChildEntity", "Hiv18Result", "HIV18Result", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 5);
this.AddElementFieldMapping("TblChildEntity", "Pcrcdate1", "PCRCDate1", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 6);
this.AddElementFieldMapping("TblChildEntity", "Pcrcdate2", "PCRCDate2", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 7);
this.AddElementFieldMapping("TblChildEntity", "Pcrresult1", "PCRResult1", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 8);
this.AddElementFieldMapping("TblChildEntity", "Pcrresult2", "PCRResult2", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 9);
this.AddElementFieldMapping("TblChildEntity", "PreganceId", "PreganceID", true, "VarWChar", 32, 0, 0, false, "", null, typeof(System.String), 10);
this.AddElementFieldMapping("TblChildEntity", "Sex", "Sex", false, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 11);
this.AddElementFieldMapping("TblChildEntity", "UniqueKey", "UniqueKey", false, "VarWChar", 32, 0, 0, false, "", null, typeof(System.String), 12);
}
/// <summary>Inits TblClinicInfoEntity's mappings</summary>
private void InitTblClinicInfoEntityMappings()
{
this.AddElementMapping("TblClinicInfoEntity", @"FHI", @"Default", "tblClinicInfo", 20, 0);
this.AddElementFieldMapping("TblClinicInfoEntity", "Anemia", "Anemia", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 0);
this.AddElementFieldMapping("TblClinicInfoEntity", "Blackouts", "Blackouts", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 1);
this.AddElementFieldMapping("TblClinicInfoEntity", "Burning", "Burning", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 2);
this.AddElementFieldMapping("TblClinicInfoEntity", "ClinicDate", "ClinicDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 3);
this.AddElementFieldMapping("TblClinicInfoEntity", "ClinicStage", "ClinicStage", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 4);
this.AddElementFieldMapping("TblClinicInfoEntity", "Colic", "Colic", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 5);
this.AddElementFieldMapping("TblClinicInfoEntity", "Depression", "Depression", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 6);
this.AddElementFieldMapping("TblClinicInfoEntity", "Diarrhea", "Diarrhea", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 7);
this.AddElementFieldMapping("TblClinicInfoEntity", "FatDistributionChanges", "FatDistributionChanges", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 8);
this.AddElementFieldMapping("TblClinicInfoEntity", "Headache", "Headache", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 9);
this.AddElementFieldMapping("TblClinicInfoEntity", "Height", "Height", true, "Double", 0, 15, 0, false, "", null, typeof(System.Double), 10);
this.AddElementFieldMapping("TblClinicInfoEntity", "Jaundice", "jaundice", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 11);
this.AddElementFieldMapping("TblClinicInfoEntity", "Motion", "Motion", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 12);
this.AddElementFieldMapping("TblClinicInfoEntity", "Nausea", "Nausea", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 13);
this.AddElementFieldMapping("TblClinicInfoEntity", "PatientId", "PatientID", false, "VarWChar", 15, 0, 0, false, "", null, typeof(System.String), 14);
this.AddElementFieldMapping("TblClinicInfoEntity", "Poisoning", "Poisoning", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 15);
this.AddElementFieldMapping("TblClinicInfoEntity", "ProgressTb", "ProgressTB", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 16);
this.AddElementFieldMapping("TblClinicInfoEntity", "Rash", "Rash", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 17);
this.AddElementFieldMapping("TblClinicInfoEntity", "UniqueKey", "UniqueKey", false, "VarWChar", 32, 0, 0, false, "", null, typeof(System.String), 18);
this.AddElementFieldMapping("TblClinicInfoEntity", "Weight", "Weight", true, "Double", 0, 15, 0, false, "", null, typeof(System.Double), 19);
}
/// <summary>Inits TblCommuneEntity's mappings</summary>
private void InitTblCommuneEntityMappings()
{
this.AddElementMapping("TblCommuneEntity", @"FHI", @"Default", "tblCommunes", 3, 0);
this.AddElementFieldMapping("TblCommuneEntity", "Communeid", "communeid", false, "VarWChar", 7, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblCommuneEntity", "Communename", "communename", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblCommuneEntity", "Districtid", "districtid", true, "VarWChar", 5, 0, 0, false, "", null, typeof(System.String), 2);
}
/// <summary>Inits TblDiaryEntity's mappings</summary>
private void InitTblDiaryEntityMappings()
{
this.AddElementMapping("TblDiaryEntity", @"FHI", @"Default", "tblDiary", 6, 0);
this.AddElementFieldMapping("TblDiaryEntity", "EventDate", "EventDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 0);
this.AddElementFieldMapping("TblDiaryEntity", "OtherResult", "OtherResult", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblDiaryEntity", "PatientId", "PatientID", true, "VarWChar", 15, 0, 0, false, "", null, typeof(System.String), 2);
this.AddElementFieldMapping("TblDiaryEntity", "Reason", "Reason", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 3);
this.AddElementFieldMapping("TblDiaryEntity", "Result", "Result", true, "VarWChar", 1, 0, 0, false, "", null, typeof(System.String), 4);
this.AddElementFieldMapping("TblDiaryEntity", "UniqueKey", "UniqueKey", false, "VarWChar", 32, 0, 0, false, "", null, typeof(System.String), 5);
}
/// <summary>Inits TblDistrictEntity's mappings</summary>
private void InitTblDistrictEntityMappings()
{
this.AddElementMapping("TblDistrictEntity", @"FHI", @"Default", "tblDistricts", 3, 0);
this.AddElementFieldMapping("TblDistrictEntity", "Districtid", "districtid", false, "VarWChar", 5, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblDistrictEntity", "Districtname", "districtname", true, "VarWChar", 26, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblDistrictEntity", "Provinceid", "provinceid", true, "VarWChar", 3, 0, 0, false, "", null, typeof(System.String), 2);
}
/// <summary>Inits TblExaminationInfoEntity's mappings</summary>
private void InitTblExaminationInfoEntityMappings()
{
this.AddElementMapping("TblExaminationInfoEntity", @"FHI", @"Default", "tblExaminationInfo", 38, 0);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Anemia", "Anemia", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 0);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Blackouts", "Blackouts", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 1);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Burning", "Burning", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 2);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Calc", "Calc", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 3);
this.AddElementFieldMapping("TblExaminationInfoEntity", "ClinicStage", "ClinicStage", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 4);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Colic", "Colic", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 5);
this.AddElementFieldMapping("TblExaminationInfoEntity", "CommuneId", "CommuneID", true, "VarWChar", 7, 0, 0, false, "", null, typeof(System.String), 6);
this.AddElementFieldMapping("TblExaminationInfoEntity", "DayDiff", "DayDiff", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 7);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Depression", "Depression", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 8);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Diarrhea", "Diarrhea", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 9);
this.AddElementFieldMapping("TblExaminationInfoEntity", "DistrictId", "DistrictID", true, "VarWChar", 5, 0, 0, false, "", null, typeof(System.String), 10);
this.AddElementFieldMapping("TblExaminationInfoEntity", "EndExamDate", "endExamDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 11);
this.AddElementFieldMapping("TblExaminationInfoEntity", "ExamDate", "ExamDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 12);
this.AddElementFieldMapping("TblExaminationInfoEntity", "FatDistributionChanges", "FatDistributionChanges", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 13);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Headache", "Headache", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 14);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Height", "Height", true, "Double", 0, 15, 0, false, "", null, typeof(System.Double), 15);
this.AddElementFieldMapping("TblExaminationInfoEntity", "IsClinic", "IsClinic", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 16);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Jaundice", "jaundice", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 17);
this.AddElementFieldMapping("TblExaminationInfoEntity", "LateAppointmentReason", "LateAppointmentReason", true, "LongVarWChar", 536870911, 0, 0, false, "", null, typeof(System.String), 18);
this.AddElementFieldMapping("TblExaminationInfoEntity", "LateTimes", "LateTimes", true, "VarWChar", 10, 0, 0, false, "", null, typeof(System.String), 19);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Motion", "Motion", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 20);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Nausea", "Nausea", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 21);
this.AddElementFieldMapping("TblExaminationInfoEntity", "NoSelfExam", "NoSelfExam", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 22);
this.AddElementFieldMapping("TblExaminationInfoEntity", "OutPatientTreatment", "OutPatientTreatment", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 23);
this.AddElementFieldMapping("TblExaminationInfoEntity", "PatientId", "PatientID", false, "VarWChar", 15, 0, 0, false, "", null, typeof(System.String), 24);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Poisoning", "Poisoning", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 25);
this.AddElementFieldMapping("TblExaminationInfoEntity", "ProgressTb", "ProgressTB", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 26);
this.AddElementFieldMapping("TblExaminationInfoEntity", "ProvinceId", "ProvinceID", true, "VarWChar", 3, 0, 0, false, "", null, typeof(System.String), 27);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Rash", "Rash", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 28);
this.AddElementFieldMapping("TblExaminationInfoEntity", "ReasonEnd", "ReasonEnd", true, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 29);
this.AddElementFieldMapping("TblExaminationInfoEntity", "ReExamDate", "ReExamDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 30);
this.AddElementFieldMapping("TblExaminationInfoEntity", "ReTreatment", "ReTreatment", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 31);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Status", "Status", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 32);
this.AddElementFieldMapping("TblExaminationInfoEntity", "TbScreen", "TbScreen", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 33);
this.AddElementFieldMapping("TblExaminationInfoEntity", "TbScreenResult", "tbScreenResult", true, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 34);
this.AddElementFieldMapping("TblExaminationInfoEntity", "TreatmentFollow", "TreatmentFollow", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 35);
this.AddElementFieldMapping("TblExaminationInfoEntity", "UniqueKey", "UniqueKey", false, "VarWChar", 32, 0, 0, false, "", null, typeof(System.String), 36);
this.AddElementFieldMapping("TblExaminationInfoEntity", "Weight", "Weight", true, "Double", 0, 15, 0, false, "", null, typeof(System.Double), 37);
}
/// <summary>Inits TblPatientEntity's mappings</summary>
private void InitTblPatientEntityMappings()
{
this.AddElementMapping("TblPatientEntity", @"FHI", @"Default", "tblPatients", 28, 0);
this.AddElementFieldMapping("TblPatientEntity", "Address", "Address", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblPatientEntity", "BirthYear", "BirthYear", false, "Integer", 0, 10, 0, false, "", null, typeof(System.Int32), 1);
this.AddElementFieldMapping("TblPatientEntity", "CommuneId", "CommuneID", true, "VarWChar", 7, 0, 0, false, "", null, typeof(System.String), 2);
this.AddElementFieldMapping("TblPatientEntity", "CreateDate", "CreateDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 3);
this.AddElementFieldMapping("TblPatientEntity", "DateofArv", "DateofARV", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 4);
this.AddElementFieldMapping("TblPatientEntity", "DateofReceivingDrug", "DateofReceivingDrug", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 5);
this.AddElementFieldMapping("TblPatientEntity", "Dateofreferral", "Dateofreferral", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 6);
this.AddElementFieldMapping("TblPatientEntity", "DateofRegistration", "DateofRegistration", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 7);
this.AddElementFieldMapping("TblPatientEntity", "DeathDate", "DeathDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 8);
this.AddElementFieldMapping("TblPatientEntity", "DistrictId", "DistrictID", true, "VarWChar", 5, 0, 0, false, "", null, typeof(System.String), 9);
this.AddElementFieldMapping("TblPatientEntity", "HaveArvBefore", "HaveArvBefore", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 10);
this.AddElementFieldMapping("TblPatientEntity", "HivConfirmedDate", "HivConfirmedDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 11);
this.AddElementFieldMapping("TblPatientEntity", "IdentityCardNo", "IdentityCardNo", true, "VarWChar", 20, 0, 0, false, "", null, typeof(System.String), 12);
this.AddElementFieldMapping("TblPatientEntity", "Insuranceid", "insuranceid", true, "VarWChar", 50, 0, 0, false, "", null, typeof(System.String), 13);
this.AddElementFieldMapping("TblPatientEntity", "ModifyDate", "ModifyDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 14);
this.AddElementFieldMapping("TblPatientEntity", "OldPatientId", "OldPatientID", true, "VarWChar", 15, 0, 0, false, "", null, typeof(System.String), 15);
this.AddElementFieldMapping("TblPatientEntity", "PatientId", "PatientID", false, "VarWChar", 15, 0, 0, false, "", null, typeof(System.String), 16);
this.AddElementFieldMapping("TblPatientEntity", "PatientName", "PatientName", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 17);
this.AddElementFieldMapping("TblPatientEntity", "ProvinceId", "ProvinceID", true, "VarWChar", 3, 0, 0, false, "", null, typeof(System.String), 18);
this.AddElementFieldMapping("TblPatientEntity", "ReferralId", "ReferralID", true, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 19);
this.AddElementFieldMapping("TblPatientEntity", "ReferralName", "ReferralName", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 20);
this.AddElementFieldMapping("TblPatientEntity", "ReferralProvinceId", "ReferralProvinceID", true, "VarWChar", 3, 0, 0, false, "", null, typeof(System.String), 21);
this.AddElementFieldMapping("TblPatientEntity", "Regimenid", "Regimenid", true, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 22);
this.AddElementFieldMapping("TblPatientEntity", "Sex", "Sex", false, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 23);
this.AddElementFieldMapping("TblPatientEntity", "Sms", "SMS", false, "Boolean", 2, 0, 0, false, "", null, typeof(System.Boolean), 24);
this.AddElementFieldMapping("TblPatientEntity", "Status", "Status", true, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 25);
this.AddElementFieldMapping("TblPatientEntity", "SupporterInfo", "SupporterInfo", true, "LongVarWChar", 536870911, 0, 0, false, "", null, typeof(System.String), 26);
this.AddElementFieldMapping("TblPatientEntity", "TelephoneNo", "TelephoneNo", true, "VarWChar", 20, 0, 0, false, "", null, typeof(System.String), 27);
}
/// <summary>Inits TblPreClinicsInfoEntity's mappings</summary>
private void InitTblPreClinicsInfoEntityMappings()
{
this.AddElementMapping("TblPreClinicsInfoEntity", @"FHI", @"Default", "tblPreClinicsInfo", 7, 0);
this.AddElementFieldMapping("TblPreClinicsInfoEntity", "PatientId", "PatientID", false, "VarWChar", 15, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblPreClinicsInfoEntity", "QualityResult", "QualityResult", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 1);
this.AddElementFieldMapping("TblPreClinicsInfoEntity", "QuantityResult", "QuantityResult", true, "Double", 0, 15, 0, false, "", null, typeof(System.Double), 2);
this.AddElementFieldMapping("TblPreClinicsInfoEntity", "Status", "Status", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 3);
this.AddElementFieldMapping("TblPreClinicsInfoEntity", "TestDate", "TestDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 4);
this.AddElementFieldMapping("TblPreClinicsInfoEntity", "Testid", "Testid", false, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 5);
this.AddElementFieldMapping("TblPreClinicsInfoEntity", "UniqueKey", "UniqueKey", false, "VarWChar", 32, 0, 0, false, "", null, typeof(System.String), 6);
}
/// <summary>Inits TblPregnanceInfoEntity's mappings</summary>
private void InitTblPregnanceInfoEntityMappings()
{
this.AddElementMapping("TblPregnanceInfoEntity", @"FHI", @"Default", "tblPregnanceInfo", 5, 0);
this.AddElementFieldMapping("TblPregnanceInfoEntity", "EstimatedDelivery", "EstimatedDelivery", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 0);
this.AddElementFieldMapping("TblPregnanceInfoEntity", "Note", "Note", true, "LongVarWChar", 536870911, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblPregnanceInfoEntity", "PatientId", "PatientID", true, "VarWChar", 15, 0, 0, false, "", null, typeof(System.String), 2);
this.AddElementFieldMapping("TblPregnanceInfoEntity", "PregnanceDate", "PregnanceDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 3);
this.AddElementFieldMapping("TblPregnanceInfoEntity", "UniqueKey", "UniqueKey", false, "VarWChar", 32, 0, 0, false, "", null, typeof(System.String), 4);
}
/// <summary>Inits TblProvinceEntity's mappings</summary>
private void InitTblProvinceEntityMappings()
{
this.AddElementMapping("TblProvinceEntity", @"FHI", @"Default", "tblProvinces", 2, 0);
this.AddElementFieldMapping("TblProvinceEntity", "Provinceid", "provinceid", false, "VarWChar", 3, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblProvinceEntity", "Provincename", "provincename", true, "VarWChar", 30, 0, 0, false, "", null, typeof(System.String), 1);
}
/// <summary>Inits TblReferralFromPlaceEntity's mappings</summary>
private void InitTblReferralFromPlaceEntityMappings()
{
this.AddElementMapping("TblReferralFromPlaceEntity", @"FHI", @"Default", "tblReferralFromPlaces", 3, 0);
this.AddElementFieldMapping("TblReferralFromPlaceEntity", "EReferralName", "eReferralName", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblReferralFromPlaceEntity", "ReferralId", "ReferralID", false, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblReferralFromPlaceEntity", "VReferralName", "vReferralName", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 2);
}
/// <summary>Inits TblReferralsToEntity's mappings</summary>
private void InitTblReferralsToEntityMappings()
{
this.AddElementMapping("TblReferralsToEntity", @"FHI", @"Default", "tblReferralsTo", 11, 0);
this.AddElementFieldMapping("TblReferralsToEntity", "AgencyTypeId", "AgencyTypeID", true, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblReferralsToEntity", "DeathReasonId", "DeathReasonID", true, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblReferralsToEntity", "EndDate", "EndDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 2);
this.AddElementFieldMapping("TblReferralsToEntity", "Note", "Note", true, "LongVarWChar", 536870911, 0, 0, false, "", null, typeof(System.String), 3);
this.AddElementFieldMapping("TblReferralsToEntity", "PatientId", "PatientID", true, "VarWChar", 15, 0, 0, false, "", null, typeof(System.String), 4);
this.AddElementFieldMapping("TblReferralsToEntity", "ProvinceId", "ProvinceID", true, "VarWChar", 3, 0, 0, false, "", null, typeof(System.String), 5);
this.AddElementFieldMapping("TblReferralsToEntity", "ReceiveServiceDate", "ReceiveServiceDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 6);
this.AddElementFieldMapping("TblReferralsToEntity", "ReferralAgency", "ReferralAgency", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 7);
this.AddElementFieldMapping("TblReferralsToEntity", "Status", "Status", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 8);
this.AddElementFieldMapping("TblReferralsToEntity", "TypeId", "TypeID", true, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 9);
this.AddElementFieldMapping("TblReferralsToEntity", "UniqueKey", "UniqueKey", false, "VarWChar", 32, 0, 0, false, "", null, typeof(System.String), 10);
}
/// <summary>Inits TblReferraltoServiceEntity's mappings</summary>
private void InitTblReferraltoServiceEntityMappings()
{
this.AddElementMapping("TblReferraltoServiceEntity", @"FHI", @"Default", "tblReferraltoServices", 9, 0);
this.AddElementFieldMapping("TblReferraltoServiceEntity", "AgencyTypeId", "AgencyTypeID", true, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblReferraltoServiceEntity", "Note", "Note", true, "LongVarWChar", 536870911, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblReferraltoServiceEntity", "PatientId", "PatientID", true, "VarWChar", 15, 0, 0, false, "", null, typeof(System.String), 2);
this.AddElementFieldMapping("TblReferraltoServiceEntity", "ProvinceId", "ProvinceID", true, "VarWChar", 3, 0, 0, false, "", null, typeof(System.String), 3);
this.AddElementFieldMapping("TblReferraltoServiceEntity", "ReceiveServiceDate", "ReceiveServiceDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 4);
this.AddElementFieldMapping("TblReferraltoServiceEntity", "ReferralAgency", "ReferralAgency", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 5);
this.AddElementFieldMapping("TblReferraltoServiceEntity", "ReferralDate", "ReferralDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 6);
this.AddElementFieldMapping("TblReferraltoServiceEntity", "Status", "Status", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 7);
this.AddElementFieldMapping("TblReferraltoServiceEntity", "UniqueKey", "UniqueKey", false, "VarWChar", 32, 0, 0, false, "", null, typeof(System.String), 8);
}
/// <summary>Inits TblRegimenEntity's mappings</summary>
private void InitTblRegimenEntityMappings()
{
this.AddElementMapping("TblRegimenEntity", @"FHI", @"Default", "tblRegimens", 5, 0);
this.AddElementFieldMapping("TblRegimenEntity", "ERegimenName", "eRegimenName", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblRegimenEntity", "Regimenid", "Regimenid", false, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblRegimenEntity", "Sign", "Sign", true, "VarWChar", 3, 0, 0, false, "", null, typeof(System.String), 2);
this.AddElementFieldMapping("TblRegimenEntity", "Type", "Type", true, "SmallInt", 0, 5, 0, false, "", null, typeof(System.Int16), 3);
this.AddElementFieldMapping("TblRegimenEntity", "VRegimenname", "vRegimenname", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 4);
}
/// <summary>Inits TblRegimenStopReasonEntity's mappings</summary>
private void InitTblRegimenStopReasonEntityMappings()
{
this.AddElementMapping("TblRegimenStopReasonEntity", @"FHI", @"Default", "tblRegimenStopReasons", 4, 0);
this.AddElementFieldMapping("TblRegimenStopReasonEntity", "EReasonDes", "eReasonDes", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblRegimenStopReasonEntity", "ReasonId", "ReasonID", false, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblRegimenStopReasonEntity", "Sign", "Sign", true, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 2);
this.AddElementFieldMapping("TblRegimenStopReasonEntity", "VReasonDes", "vReasonDes", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 3);
}
/// <summary>Inits TblServiceEntity's mappings</summary>
private void InitTblServiceEntityMappings()
{
this.AddElementMapping("TblServiceEntity", @"FHI", @"Default", "tblServices", 3, 0);
this.AddElementFieldMapping("TblServiceEntity", "EServiceName", "eServiceName", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblServiceEntity", "ServiceId", "ServiceID", false, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblServiceEntity", "VServiceName", "vServiceName", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 2);
}
/// <summary>Inits TblTestEntity's mappings</summary>
private void InitTblTestEntityMappings()
{
this.AddElementMapping("TblTestEntity", @"FHI", @"Default", "tblTests", 3, 0);
this.AddElementFieldMapping("TblTestEntity", "ETestName", "eTestName", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblTestEntity", "Testid", "Testid", false, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblTestEntity", "VTestName", "vTestName", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 2);
}
/// <summary>Inits TblTreatmentEntity's mappings</summary>
private void InitTblTreatmentEntityMappings()
{
this.AddElementMapping("TblTreatmentEntity", @"FHI", @"Default", "tblTreatments", 4, 0);
this.AddElementFieldMapping("TblTreatmentEntity", "ETreatmentDes", "eTreatmentDes", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblTreatmentEntity", "Sign", "Sign", true, "VarWChar", 10, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblTreatmentEntity", "TreatmentId", "TreatmentID", false, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 2);
this.AddElementFieldMapping("TblTreatmentEntity", "VTreatmentDes", "vTreatmentDes", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 3);
}
/// <summary>Inits TblTreatmentInfoEntity's mappings</summary>
private void InitTblTreatmentInfoEntityMappings()
{
this.AddElementMapping("TblTreatmentInfoEntity", @"FHI", @"Default", "tblTreatmentInfo", 7, 0);
this.AddElementFieldMapping("TblTreatmentInfoEntity", "PatientId", "PatientID", false, "VarWChar", 15, 0, 0, false, "", null, typeof(System.String), 0);
this.AddElementFieldMapping("TblTreatmentInfoEntity", "ReasonId", "ReasonID", true, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblTreatmentInfoEntity", "Regimenid", "Regimenid", true, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 2);
this.AddElementFieldMapping("TblTreatmentInfoEntity", "TreatmentEdate", "TreatmentEdate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 3);
this.AddElementFieldMapping("TblTreatmentInfoEntity", "TreatmentId", "TreatmentID", true, "VarWChar", 2, 0, 0, false, "", null, typeof(System.String), 4);
this.AddElementFieldMapping("TblTreatmentInfoEntity", "TreatmentSdate", "TreatmentSdate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 5);
this.AddElementFieldMapping("TblTreatmentInfoEntity", "UniqueKey", "UniqueKey", false, "VarWChar", 32, 0, 0, false, "", null, typeof(System.String), 6);
}
/// <summary>Inits TblWaitingListEntity's mappings</summary>
private void InitTblWaitingListEntityMappings()
{
this.AddElementMapping("TblWaitingListEntity", @"FHI", @"Default", "tblWaitingList", 10, 0);
this.AddElementFieldMapping("TblWaitingListEntity", "Arv", "ARV", false, "Boolean", 2, 0, 0, false, "", null, typeof(System.Boolean), 0);
this.AddElementFieldMapping("TblWaitingListEntity", "FollowNum", "FollowNum", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 1);
this.AddElementFieldMapping("TblWaitingListEntity", "LastFolowResult", "lastFolowResult", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 2);
this.AddElementFieldMapping("TblWaitingListEntity", "LateTimes", "LateTimes", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 3);
this.AddElementFieldMapping("TblWaitingListEntity", "PatientId", "PatientID", false, "VarWChar", 15, 0, 0, false, "", null, typeof(System.String), 4);
this.AddElementFieldMapping("TblWaitingListEntity", "PatientName", "PatientName", true, "VarWChar", 255, 0, 0, false, "", null, typeof(System.String), 5);
this.AddElementFieldMapping("TblWaitingListEntity", "ReExamDate", "ReExamDate", true, "Date", 0, 0, 0, false, "", null, typeof(System.DateTime), 6);
this.AddElementFieldMapping("TblWaitingListEntity", "Selected", "Selected", false, "Boolean", 2, 0, 0, false, "", null, typeof(System.Boolean), 7);
this.AddElementFieldMapping("TblWaitingListEntity", "Status", "Status", true, "VarWChar", 50, 0, 0, false, "", null, typeof(System.String), 8);
this.AddElementFieldMapping("TblWaitingListEntity", "TelephoneNo", "TelephoneNo", true, "VarWChar", 20, 0, 0, false, "", null, typeof(System.String), 9);
}
}
}

View File

@@ -0,0 +1,29 @@
///////////////////////////////////////////////////////////////
// This is generated code.
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 4.2
// Code is generated on:
// Code is generated using templates: SD.TemplateBindings.SharedTemplates
// Templates vendor: Solutions Design.
// Templates version:
//////////////////////////////////////////////////////////////
using System;
using System.Data;
using System.Collections.Generic;
using SD.LLBLGen.Pro.ORMSupportClasses;
using SD.LLBLGen.Pro.QuerySpec.Adapter;
namespace Datalib.DatabaseSpecific
{
/// <summary>Class which contains the static logic to execute retrieval stored procedures in the database.</summary>
public static partial class RetrievalProcedures
{
#region Included Code
#endregion
}
}

View File

@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="ConnectionString.MS Access (OleDb)" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Projects\PatientMan\database\FHI.mdb;User Id=admin;Password=;Jet OLEDB:System Database=;Jet OLEDB:Database password="/>
</appSettings>
</configuration>

View File

@@ -0,0 +1,227 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{2B87D3A8-4BE6-4D6A-A953-52682B526631}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Datalib</RootNamespace>
<AssemblyName>Datalib</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>DatabaseGeneric\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>DatabaseGeneric\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="SD.LLBLGen.Pro.ORMSupportClasses, Version=5.0.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<Compile Include="DatabaseGeneric\HelperClasses\EntityCollection.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\AssemblyInfo.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\ConstantsEnums.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\HelperClasses\FieldInfoProvider.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\HelperClasses\TypeDefaultValue.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\HelperClasses\InheritanceInfoProvider.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\Linq\LinqMetaData.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\FactoryClasses\QueryFactory.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblAgeGroupRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblAgencyRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblChildRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblClinicInfoRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblCommuneRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblDiaryRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblDistrictRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblExaminationInfoRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblPatientRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblPreClinicsInfoRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblPregnanceInfoRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblProvinceRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblReferralFromPlaceRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblReferralsToRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblReferraltoServiceRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblRegimenRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblRegimenStopReasonRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblServiceRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblTestRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblTreatmentRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblTreatmentInfoRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\TblWaitingListRelations.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\RelationClasses\DynamicRelation.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\CommonEntityBase.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblAgeGroupEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblAgencyEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblChildEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblClinicInfoEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblCommuneEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblDiaryEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblDistrictEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblExaminationInfoEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblPatientEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblPreClinicsInfoEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblPregnanceInfoEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblProvinceEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblReferralFromPlaceEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblReferralsToEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblReferraltoServiceEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblRegimenEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblRegimenStopReasonEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblServiceEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblTestEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblTreatmentEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblTreatmentInfoEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\EntityClasses\TblWaitingListEntity.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\FactoryClasses\EntityFactories.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\FactoryClasses\EntityFieldFactory.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\FactoryClasses\EntityFieldsFactory.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\HelperClasses\ResultsetFields.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseGeneric\HelperClasses\FieldCreationClasses.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
</Project>

View File

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Datalib.DatabaseSpecific</RootNamespace>
<AssemblyName>DatalibDBSpecific</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>DatabaseSpecific\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>DatabaseSpecific\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="SD.LLBLGen.Pro.DQE.Access, Version=5.0.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27, processorArchitecture=MSIL" />
<Reference Include="SD.LLBLGen.Pro.ORMSupportClasses, Version=5.0.0.0, Culture=neutral, PublicKeyToken=ca73b74ba4e3ff27, processorArchitecture=MSIL" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
<ItemGroup>
<Compile Include="DatabaseSpecific\AssemblyInfo.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseSpecific\PersistenceInfoProvider.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<None Include="DatabaseSpecific\App.config">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</None>
<Compile Include="DatabaseSpecific\ActionProcedures.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseSpecific\RetrievalProcedures.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<Compile Include="DatabaseSpecific\DataAccessAdapter.cs">
<GeneratedBy>LLBLGen Pro</GeneratedBy>
</Compile>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1 @@
365eabb0a28b63f9246e593ec87b472d9c82c2a4

View File

@@ -0,0 +1,8 @@
C:\Projects\PatientMan\Datalib\DatabaseGeneric\bin\Release\Datalib.dll
C:\Projects\PatientMan\Datalib\DatabaseGeneric\bin\Release\Datalib.pdb
C:\Projects\PatientMan\Datalib\DatabaseGeneric\bin\Release\SD.LLBLGen.Pro.ORMSupportClasses.dll
C:\Projects\PatientMan\Datalib\DatabaseGeneric\bin\Release\SD.LLBLGen.Pro.ORMSupportClasses.pdb
C:\Projects\PatientMan\Datalib\DatabaseGeneric\bin\Release\SD.LLBLGen.Pro.ORMSupportClasses.xml
C:\Projects\PatientMan\Datalib\obj\Release\Datalib.csprojResolveAssemblyReference.cache
C:\Projects\PatientMan\Datalib\obj\Release\Datalib.dll
C:\Projects\PatientMan\Datalib\obj\Release\Datalib.pdb

Binary file not shown.

View File

@@ -0,0 +1,11 @@
C:\Projects\PatientMan\Datalib\DatabaseSpecific\bin\Release\DatalibDBSpecific.dll.config
C:\Projects\PatientMan\Datalib\DatabaseSpecific\bin\Release\DatalibDBSpecific.dll
C:\Projects\PatientMan\Datalib\DatabaseSpecific\bin\Release\DatalibDBSpecific.pdb
C:\Projects\PatientMan\Datalib\DatabaseSpecific\bin\Release\SD.LLBLGen.Pro.DQE.Access.dll
C:\Projects\PatientMan\Datalib\DatabaseSpecific\bin\Release\SD.LLBLGen.Pro.ORMSupportClasses.dll
C:\Projects\PatientMan\Datalib\DatabaseSpecific\bin\Release\SD.LLBLGen.Pro.DQE.Access.pdb
C:\Projects\PatientMan\Datalib\DatabaseSpecific\bin\Release\SD.LLBLGen.Pro.ORMSupportClasses.pdb
C:\Projects\PatientMan\Datalib\DatabaseSpecific\bin\Release\SD.LLBLGen.Pro.ORMSupportClasses.xml
C:\Projects\PatientMan\Datalib\obj\Release\DatalibDBSpecific.csprojResolveAssemblyReference.cache
C:\Projects\PatientMan\Datalib\obj\Release\DatalibDBSpecific.dll
C:\Projects\PatientMan\Datalib\obj\Release\DatalibDBSpecific.pdb

Binary file not shown.

111
patientman/PatientMan.sln Normal file
View File

@@ -0,0 +1,111 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PatientMan", "PatientMan\PatientMan.csproj", "{8904F2CD-2954-4FF9-8B54-791D363812E5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DatalibDBSpecific", "Datalib\DatalibDBSpecific.csproj", "{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Datalib", "Datalib\Datalib.csproj", "{2B87D3A8-4BE6-4D6A-A953-52682B526631}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
CD_ROM|Any CPU = CD_ROM|Any CPU
CD_ROM|Mixed Platforms = CD_ROM|Mixed Platforms
CD_ROM|x86 = CD_ROM|x86
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x86 = Debug|x86
DVD-5|Any CPU = DVD-5|Any CPU
DVD-5|Mixed Platforms = DVD-5|Mixed Platforms
DVD-5|x86 = DVD-5|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|x86 = Release|x86
SingleImage|Any CPU = SingleImage|Any CPU
SingleImage|Mixed Platforms = SingleImage|Mixed Platforms
SingleImage|x86 = SingleImage|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{8904F2CD-2954-4FF9-8B54-791D363812E5}.CD_ROM|Any CPU.ActiveCfg = Release|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.CD_ROM|Mixed Platforms.ActiveCfg = Release|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.CD_ROM|Mixed Platforms.Build.0 = Release|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.CD_ROM|x86.ActiveCfg = Release|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.CD_ROM|x86.Build.0 = Release|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.Debug|Any CPU.ActiveCfg = Debug|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.Debug|Mixed Platforms.Build.0 = Debug|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.Debug|x86.ActiveCfg = Debug|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.Debug|x86.Build.0 = Debug|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.DVD-5|Any CPU.ActiveCfg = Debug|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.DVD-5|Mixed Platforms.ActiveCfg = Debug|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.DVD-5|Mixed Platforms.Build.0 = Debug|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.DVD-5|x86.ActiveCfg = Debug|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.DVD-5|x86.Build.0 = Debug|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.Release|Any CPU.ActiveCfg = Release|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.Release|Any CPU.Build.0 = Release|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.Release|Mixed Platforms.ActiveCfg = Release|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.Release|Mixed Platforms.Build.0 = Release|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.Release|x86.ActiveCfg = Release|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.Release|x86.Build.0 = Release|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.SingleImage|Any CPU.ActiveCfg = Release|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.SingleImage|Mixed Platforms.ActiveCfg = Release|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.SingleImage|Mixed Platforms.Build.0 = Release|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.SingleImage|x86.ActiveCfg = Release|x86
{8904F2CD-2954-4FF9-8B54-791D363812E5}.SingleImage|x86.Build.0 = Release|x86
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.CD_ROM|Any CPU.ActiveCfg = Release|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.CD_ROM|Any CPU.Build.0 = Release|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.CD_ROM|Mixed Platforms.ActiveCfg = Release|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.CD_ROM|Mixed Platforms.Build.0 = Release|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.CD_ROM|x86.ActiveCfg = Release|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.Debug|x86.ActiveCfg = Debug|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.DVD-5|Any CPU.ActiveCfg = Debug|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.DVD-5|Any CPU.Build.0 = Debug|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.DVD-5|Mixed Platforms.ActiveCfg = Debug|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.DVD-5|Mixed Platforms.Build.0 = Debug|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.DVD-5|x86.ActiveCfg = Debug|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.Release|Any CPU.Build.0 = Release|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.Release|x86.ActiveCfg = Release|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.SingleImage|Any CPU.ActiveCfg = Release|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.SingleImage|Any CPU.Build.0 = Release|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.SingleImage|Mixed Platforms.ActiveCfg = Release|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.SingleImage|Mixed Platforms.Build.0 = Release|Any CPU
{EAB61F59-F830-4501-B3C1-6B3EAD3B5B14}.SingleImage|x86.ActiveCfg = Release|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.CD_ROM|Any CPU.ActiveCfg = Release|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.CD_ROM|Any CPU.Build.0 = Release|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.CD_ROM|Mixed Platforms.ActiveCfg = Release|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.CD_ROM|Mixed Platforms.Build.0 = Release|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.CD_ROM|x86.ActiveCfg = Release|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.Debug|x86.ActiveCfg = Debug|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.DVD-5|Any CPU.ActiveCfg = Debug|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.DVD-5|Any CPU.Build.0 = Debug|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.DVD-5|Mixed Platforms.ActiveCfg = Debug|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.DVD-5|Mixed Platforms.Build.0 = Debug|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.DVD-5|x86.ActiveCfg = Debug|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.Release|Any CPU.Build.0 = Release|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.Release|x86.ActiveCfg = Release|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.SingleImage|Any CPU.ActiveCfg = Release|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.SingleImage|Any CPU.Build.0 = Release|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.SingleImage|Mixed Platforms.ActiveCfg = Release|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.SingleImage|Mixed Platforms.Build.0 = Release|Any CPU
{2B87D3A8-4BE6-4D6A-A953-52682B526631}.SingleImage|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- VSdocman config file for current project/solution.-->
<activeProfile>default</activeProfile>
<appSettings>
<SettingsGroup name="CommonProjectProfile">
<add key="VBdocman_generateVbSyntax"><![CDATA[-1]]></add>
<add key="VBdocman_generateJscriptSyntax"><![CDATA[-1]]></add>
<add key="VBdocman_comConstant"><![CDATA[-1]]></add>
<add key="VBdocman_comStdModule"><![CDATA[-1]]></add>
<add key="VBdocman_templatePath"><![CDATA[html_msdn10_lightweight.vbdt]]></add>
<add key="VBdocman_supportedNetFrameworkClientProfile"><![CDATA[4, 3.5 SP1]]></add>
<add key="VBdocman_generateCppSyntax"><![CDATA[-1]]></add>
<add key="VBdocman_comEnumeration"><![CDATA[-1]]></add>
<add key="VBdocman_supportedNetFramework"><![CDATA[4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0]]></add>
<add key="VBdocman_supportedNetCompactFramework"><![CDATA[]]></add>
<add key="VBdocman_removeAttributes"><![CDATA[0]]></add>
<add key="VBdocman_comProtected"><![CDATA[-1]]></add>
<add key="VBdocman_helpTitle"><![CDATA[SOLUTION-WIDE PROPERTIES Reference]]></add>
<add key="VBdocman_allowMacrosInComments"><![CDATA[0]]></add>
<add key="VBdocman_customVar2"><![CDATA[]]></add>
<add key="VBdocman_comModulesSaveExcluded"><![CDATA[-1]]></add>
<add key="VBdocman_comDelegate"><![CDATA[-1]]></add>
<add key="VBdocman_comStructure"><![CDATA[-1]]></add>
<add key="VBdocman_comEventDecl"><![CDATA[-1]]></add>
<add key="VBdocman_pageFooterText"><![CDATA[Generated with <see href="http://www.helixoft.com/vsdocman/overview.html">VSdocman</see>]]></add>
<add key="VBdocman_comProtectedFriend"><![CDATA[-1]]></add>
<add key="VBdocman_dontSortSeeAlsoList"><![CDATA[0]]></add>
<add key="VBdocman_regexFilters"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<filters />]]></add>
<add key="VBdocman_linkForExternalNotInFramework"><![CDATA[0]]></add>
<add key="VBdocman_rootNamespaceText"><![CDATA[]]></add>
<add key="VBdocman_comPrivate"><![CDATA[0]]></add>
<add key="VBdocman_SelectedProperties"><![CDATA[
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<string>showFormsSeparate</string>
<string>showInherited</string>
<string>pageFooterText</string>
<string>outputPath</string>
<string>templatePath</string>
<string>templateFolder</string>
<string>externalFilesFolder</string>
<string>templateLocale</string>
<string>fileNamingConvention</string>
<string>generateVbSyntax</string>
<string>generateCsharpSyntax</string>
<string>generateCppSyntax</string>
<string>generateJscriptSyntax</string>
<string>helpTitle</string>
<string>customTopics</string>
<string>emptyOutputFolder</string>
</ArrayOfString>]]></add>
<add key="VBdocman_comNonCommented"><![CDATA[-1]]></add>
<add key="VBdocman_comDeclare"><![CDATA[-1]]></add>
<add key="VBdocman_supportedXnaFramework"><![CDATA[]]></add>
<add key="VBdocman_enumSorting"><![CDATA[1]]></add>
<add key="VBdocman_supportedPortableClassLibrary"><![CDATA[]]></add>
<add key="VBdocman_useConditionalCompilation"><![CDATA[0]]></add>
<add key="VBdocman_supportedNetForWindowsStoreApps"><![CDATA[]]></add>
<add key="VBdocman_showInherited"><![CDATA[-1]]></add>
<add key="VBdocman_fileNamingConvention"><![CDATA[1]]></add>
<add key="VBdocman_conditionalConstants"><![CDATA[]]></add>
<add key="VBdocman_comWriteDescription"><![CDATA[0]]></add>
<add key="VBdocman_comFriend"><![CDATA[0]]></add>
<add key="VBdocman_comVariable"><![CDATA[-1]]></add>
<add key="VBdocman_showFormsSeparate"><![CDATA[0]]></add>
<add key="VBdocman_comObject"><![CDATA[-1]]></add>
<add key="VBdocman_emptyOutputFolder"><![CDATA[0]]></add>
<add key="VBdocman_customVar1"><![CDATA[]]></add>
<add key="VBdocman_indentMode"><![CDATA[0]]></add>
<add key="VBdocman_comEvent"><![CDATA[-1]]></add>
<add key="VBdocman_rootNamespaceCommentStyle"><![CDATA[2]]></add>
<add key="VBdocman_customTopics"><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<topics>
<topic>
<type>normal</type>
<is-default>yes</is-default>
<name>SOLUTION-WIDE PROPERTIES Reference</name>
<id>solutionwide_properties_reference</id>
<comment><![CDATA[<summary></summary>vsdocman_escaped_]_]_></comment>
<namespaces />
<topics>
<topic>
<type>placeholder</type>
<is-default>no</is-default>
<name />
<id>a47cf753ccac42efbb289b23de2f1d9b</id>
<comment><![CDATA[vsdocman_escaped_]_]_></comment>
<namespaces />
<topics />
</topic>
</topics>
</topic>
</topics>]]></add>
<add key="VBdocman_comMethod"><![CDATA[-1]]></add>
<add key="VBdocman_externalFilesFolder"><![CDATA[]]></add>
<add key="VBdocman_templateLocale"><![CDATA[en-US]]></add>
<add key="VBdocman_supportedPlatforms"><![CDATA[Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)]]></add>
<add key="VBdocman_comForm"><![CDATA[-1]]></add>
<add key="VBdocman_unbreakSourceLines"><![CDATA[0]]></add>
<add key="VBdocman_comPublic"><![CDATA[-1]]></add>
<add key="VBdocman_templateFolder"><![CDATA[$(VSdocmanDir)Templates]]></add>
<add key="VBdocman_customVar3"><![CDATA[]]></add>
<add key="VBdocman_outputPath"><![CDATA[$(ProjectDir)VSdoc]]></add>
<add key="VBdocman_insertSourceGlobal"><![CDATA[0]]></add>
<add key="VBdocman_comProperty"><![CDATA[-1]]></add>
<add key="VBdocman_supportedOthers"><![CDATA[]]></add>
<add key="VBdocman_generateCsharpSyntax"><![CDATA[-1]]></add>
<add key="VBdocman_comInterface"><![CDATA[-1]]></add>
</SettingsGroup>
<add key="VBdocman_Datalib"><![CDATA[default]]></add>
<add key="VBdocman_DatalibDBSpecific"><![CDATA[default]]></add>
<add key="VBdocman_PatientMan"><![CDATA[default]]></add>
</appSettings>
</configuration>

BIN
patientman/PatientMan.suo Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
<appSettings>
<add key="ConnectionString.MS Access (OleDb)" value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Projects\PatientMan\database\fhi.mdb;User Id=admin;Password=;Jet OLEDB:System Database=;Jet OLEDB:Database password=" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>
<system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
</providers>
</roleManager>
</system.web>
</configuration>

View File

@@ -0,0 +1,91 @@
namespace PatientMan.BasicForms
{
partial class frmCommon
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmCommon));
this.grdContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.grdPrint = new System.Windows.Forms.ToolStripMenuItem();
this.fullPrint = new System.Windows.Forms.ToolStripMenuItem();
this.ToExcel = new System.Windows.Forms.ToolStripMenuItem();
this.baseSaveDlg = new System.Windows.Forms.SaveFileDialog();
this.grdContextMenu.SuspendLayout();
this.SuspendLayout();
//
// grdContextMenu
//
this.grdContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.grdPrint,
this.fullPrint,
this.ToExcel});
this.grdContextMenu.Name = "grdContextMenu";
resources.ApplyResources(this.grdContextMenu, "grdContextMenu");
//
// grdPrint
//
this.grdPrint.Name = "grdPrint";
resources.ApplyResources(this.grdPrint, "grdPrint");
this.grdPrint.Click += new System.EventHandler(this.grdPrint_Click);
//
// fullPrint
//
this.fullPrint.Name = "fullPrint";
resources.ApplyResources(this.fullPrint, "fullPrint");
this.fullPrint.Click += new System.EventHandler(this.fullPrint_Click);
//
// ToExcel
//
this.ToExcel.Name = "ToExcel";
resources.ApplyResources(this.ToExcel, "ToExcel");
this.ToExcel.Click += new System.EventHandler(this.ToExcel_Click);
//
// baseSaveDlg
//
resources.ApplyResources(this.baseSaveDlg, "baseSaveDlg");
//
// frmCommon
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Name = "frmCommon";
this.grdContextMenu.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ToolStripMenuItem grdPrint;
public System.Windows.Forms.ContextMenuStrip grdContextMenu;
private System.Windows.Forms.ToolStripMenuItem fullPrint;
private System.Windows.Forms.ToolStripMenuItem ToExcel;
private System.Windows.Forms.SaveFileDialog baseSaveDlg;
}
}

View File

@@ -0,0 +1,116 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Datalib.DatabaseSpecific;
using System.Windows.Forms;
using Datalib.Linq;
using Datalib.EntityClasses;
using Datalib.FactoryClasses;
using Datalib.HelperClasses;
using PatientMan.Classes;
namespace PatientMan.BasicForms
{
public partial class frmCommon : DevExpress.XtraEditors.XtraForm
{
public DataAccessAdapter adapter = new DataAccessAdapter(SettingInfo.Constr);
public frmCommon()
{
InitializeComponent();
}
public virtual void SaveRecord()
{
}
public virtual void DeleteRecord()
{
}
public virtual void BindingData()
{
}
public virtual void ReBinding()
{
}
public virtual void NewRecord()
{
}
public virtual void LoadData()
{
}
public virtual void WriteLog(LogInfo log)
{
}
private void grdPrint_Click(object sender, EventArgs e)
{
// Try to cast the sender to a ToolStripItem
ToolStripItem menuItem = sender as ToolStripItem;
if (menuItem != null)
{
// Retrieve the ContextMenuStrip that owns this ToolStripItem
ContextMenuStrip owner = menuItem.Owner as ContextMenuStrip;
if (owner != null)
{
// Get the control that is displaying this context menu
Control sourceControl = owner.SourceControl;
((hsphgrid)sourceControl).ShowPrintPreview();
}
}
}
private void fullPrint_Click(object sender, EventArgs e)
{
// Try to cast the sender to a ToolStripItem
ToolStripItem menuItem = sender as ToolStripItem;
if (menuItem != null)
{
// Retrieve the ContextMenuStrip that owns this ToolStripItem
ContextMenuStrip owner = menuItem.Owner as ContextMenuStrip;
if (owner != null)
{
// Get the control that is displaying this context menu
Control sourceControl = owner.SourceControl;
hsphgrid thisGrid = ((hsphgrid)sourceControl);
if (thisGrid.Patients != null)
{
(new clsFullPrint()).PrintOut(thisGrid.Patients);
}
}
}
}
private void ToExcel_Click(object sender, EventArgs e)
{
// Try to cast the sender to a ToolStripItem
ToolStripItem menuItem = sender as ToolStripItem;
if (menuItem != null)
{
// Retrieve the ContextMenuStrip that owns this ToolStripItem
ContextMenuStrip owner = menuItem.Owner as ContextMenuStrip;
if (owner != null)
{
// Get the control that is displaying this context menu
Control sourceControl = owner.SourceControl;
if (baseSaveDlg.ShowDialog() == DialogResult.OK)
{
((hsphgrid)sourceControl).ExportToXlsx(baseSaveDlg.FileName);
MessageBox.Show("Dữ liệu đã được khi ra tệp Excel thành công", "Kết xuất", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
<value>CenterScreen</value>
</data>
</root>

View File

@@ -0,0 +1,46 @@
namespace PatientMan.BasicForms
{
partial class frmGround
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// frmGround
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(618, 330);
this.ControlBox = false;
this.Name = "frmGround";
this.ResumeLayout(false);
}
#endregion
}
}

Some files were not shown because too many files have changed in this diff Show More