1595 lines
55 KiB
C#
1595 lines
55 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Kreta.DataAccess.Interfaces;
|
|
using Kreta.Framework;
|
|
using Kreta.Framework.Actions;
|
|
using Kreta.Framework.Collections;
|
|
using Kreta.Framework.Collections.Generic;
|
|
using Kreta.Framework.Entities;
|
|
using Kreta.Framework.Entities.Generic;
|
|
using Kreta.Framework.Exceptions;
|
|
|
|
namespace SDA.Kreta.Entities
|
|
{
|
|
/// <summary>
|
|
/// Az UML modell MukodesiHely entitásának megvalósítása.
|
|
/// </summary>
|
|
/// <remarks>A kód teljes egészében generált, kézi módosítása nem megengedett!</remarks>
|
|
[Entity("MukodesiHely")]
|
|
// alapértelmezett EntityHistoryMode
|
|
public class MukodesiHely : Entity, IMukodesiHely
|
|
{
|
|
internal protected MukodesiHely()
|
|
: base()
|
|
{
|
|
}
|
|
|
|
public class AttributeInfo
|
|
{
|
|
public const string Nev = "Nev";
|
|
public const string EmailCim = "EmailCim";
|
|
public const string Fax = "Fax";
|
|
public const string IranyitoSzam = "IranyitoSzam";
|
|
public const string Telefonszam = "Telefonszam";
|
|
public const string Varos = "Varos";
|
|
public const string VezetoNeve = "VezetoNeve";
|
|
public const string Tagintezmeny = "Tagintezmeny";
|
|
public const string TagintezmenyiKod = "TagintezmenyiKod";
|
|
public const string Szekhely = "Szekhely";
|
|
public const string Ajto = "Ajto";
|
|
public const string Emelet = "Emelet";
|
|
public const string Hazszam = "Hazszam";
|
|
public const string KozteruletNev = "KozteruletNev";
|
|
public const string MukodesiHelyAzonosito = "MukodesiHelyAzonosito";
|
|
public const string MukodesiHelyTipusa = "MukodesiHelyTipusa";
|
|
public const string Funkcioterulet = "Funkcioterulet";
|
|
public const string KozteruletJellegeNev = "KozteruletJellegeNev";
|
|
}
|
|
|
|
public class AttributeLengthInfo
|
|
{
|
|
public const int NevLength = 255;
|
|
public const int EmailCimLength = 255;
|
|
public const int FaxLength = 50;
|
|
public const int IranyitoSzamLength = 20;
|
|
public const int TelefonszamLength = 50;
|
|
public const int VarosLength = 255;
|
|
public const int VezetoNeveLength = 255;
|
|
public const int TagintezmenyiKodLength = 50;
|
|
public const int AjtoLength = 30;
|
|
public const int EmeletLength = 40;
|
|
public const int HazszamLength = 30;
|
|
public const int KozteruletNevLength = 40;
|
|
public const int MukodesiHelyAzonositoLength = 50;
|
|
public const int FunkcioteruletLength = 50;
|
|
public const int KozteruletJellegeNevLength = 50;
|
|
}
|
|
|
|
#region General
|
|
private MukodesiHelyDA m_DA = new MukodesiHelyDA();
|
|
|
|
protected static MukodesiHely FakeMukodesiHely { get; set; }
|
|
|
|
public static MukodesiHely GiveAnInstance()
|
|
{
|
|
MukodesiHely result = FakeMukodesiHely == null
|
|
? new MukodesiHely()
|
|
: (MukodesiHely)FakeMukodesiHely.MemberwiseClone();
|
|
result.Reset();
|
|
result.SetDefaultData();
|
|
|
|
return result;
|
|
}
|
|
|
|
protected void SetDefaultData()
|
|
{
|
|
if (UserContext.Instance != null)
|
|
{
|
|
if (UserContext.Instance.IntezmenyId > 0)
|
|
{
|
|
IntezmenyId = UserContext.Instance.IntezmenyId;
|
|
}
|
|
|
|
if (UserContext.Instance.AktivTanevId > 0)
|
|
{
|
|
TanevId = UserContext.Instance.AktivTanevId;
|
|
}
|
|
|
|
m_State = EntityState.Uninitialized;
|
|
}
|
|
}
|
|
|
|
protected override IEntityDataAccessor GetDataAccessor() { return m_DA; }
|
|
protected internal virtual IEntityDataAccessor InheritedDA { get { return null; } }
|
|
|
|
[Obsolete("Ezt ne használjátok, mert mindenhova bele kellene fogalmazni a tanév szűrést is! Meg fog majd szűnni!")]
|
|
public static IEntityCollection<MukodesiHely> LoadAll()
|
|
{
|
|
return LoadWithFilter("");
|
|
}
|
|
|
|
[Obsolete("Ezt ne használjátok, mert mindenhova bele kellene fogalmazni a tanév szűrést is! Meg fog majd szűnni!")]
|
|
public static IEntityCollection<MukodesiHely> LoadAll(ColumnFilterMode columnFilterMode, IEnumerable<string> columns)
|
|
{
|
|
return LoadWithFilter("", columnFilterMode, columns);
|
|
}
|
|
|
|
[Obsolete("Ezt ne használjátok, mert mindenhova bele kellene fogalmazni a tanév szűrést is! Meg fog majd szűnni!")]
|
|
public static IEntityCollection<MukodesiHely> LoadWithFilter(string filter, Dictionary<string, object> commandParameters = null)
|
|
{
|
|
var result = new EntityCollection<MukodesiHely>();
|
|
new MukodesiHelyDA().LoadWithFilter(result, filter, commandParameters);
|
|
return result;
|
|
}
|
|
|
|
[Obsolete("Ezt ne használjátok, mert mindenhova bele kellene fogalmazni a tanév szűrést is! Meg fog majd szűnni!")]
|
|
public static IEntityCollection<MukodesiHely> LoadWithFilter(string filter, ColumnFilterMode columnFilterMode, IEnumerable<string> columns, Dictionary<string, object> commandParameters = null)
|
|
{
|
|
var result = new EntityCollection<MukodesiHely>();
|
|
new MukodesiHelyDA().LoadWithFilter(result, filter, columnFilterMode, columns, commandParameters);
|
|
return result;
|
|
}
|
|
|
|
protected override void StoreOriginalValues()
|
|
{
|
|
base.StoreOriginalValues();
|
|
OriginalValues.Add("Nev", (object)m_Nev);
|
|
OriginalValues.Add("EmailCim", (EmailCim == null ? (object)DBNull.Value : (object)m_EmailCim));
|
|
OriginalValues.Add("Fax", (Fax == null ? (object)DBNull.Value : (object)m_Fax));
|
|
OriginalValues.Add("IranyitoSzam", (IranyitoSzam == null ? (object)DBNull.Value : (object)m_IranyitoSzam));
|
|
OriginalValues.Add("Telefonszam", (Telefonszam == null ? (object)DBNull.Value : (object)m_Telefonszam));
|
|
OriginalValues.Add("Varos", (Varos == null ? (object)DBNull.Value : (object)m_Varos));
|
|
OriginalValues.Add("VezetoNeve", (VezetoNeve == null ? (object)DBNull.Value : (object)m_VezetoNeve));
|
|
OriginalValues.Add("Tagintezmeny", (Tagintezmeny == null ? (object)DBNull.Value : (object)m_Tagintezmeny));
|
|
OriginalValues.Add("TagintezmenyiKod", (TagintezmenyiKod == null ? (object)DBNull.Value : (object)m_TagintezmenyiKod));
|
|
OriginalValues.Add("Szekhely", (Szekhely == null ? (object)DBNull.Value : (object)m_Szekhely));
|
|
OriginalValues.Add("Ajto", (Ajto == null ? (object)DBNull.Value : (object)m_Ajto));
|
|
OriginalValues.Add("Emelet", (Emelet == null ? (object)DBNull.Value : (object)m_Emelet));
|
|
OriginalValues.Add("Hazszam", (Hazszam == null ? (object)DBNull.Value : (object)m_Hazszam));
|
|
OriginalValues.Add("KozteruletNev", (KozteruletNev == null ? (object)DBNull.Value : (object)m_KozteruletNev));
|
|
OriginalValues.Add("MukodesiHelyAzonosito", (MukodesiHelyAzonosito == null ? (object)DBNull.Value : (object)m_MukodesiHelyAzonosito));
|
|
OriginalValues.Add("MukodesiHelyTipusa", (MukodesiHelyTipusa == null ? (object)DBNull.Value : (object)m_MukodesiHelyTipusa));
|
|
OriginalValues.Add("Funkcioterulet", (Funkcioterulet == null ? (object)DBNull.Value : (object)m_Funkcioterulet));
|
|
OriginalValues.Add("KozteruletJellegeNev", (KozteruletJellegeNev == null ? (object)DBNull.Value : (object)m_KozteruletJellegeNev));
|
|
OriginalValues.Add("IntezmenyAdatokId", (m_IntezmenyAdatokId < 0 ? (object)DBNull.Value : (object)m_IntezmenyAdatokId));
|
|
OriginalValues.Add("TelephelyAnyaintezmenyId", (m_TelephelyAnyaintezmenyId < 0 ? (object)DBNull.Value : (object)m_TelephelyAnyaintezmenyId));
|
|
OriginalValues.Add("IntezmenyId", (m_IntezmenyId < 0 ? (object)DBNull.Value : (object)m_IntezmenyId));
|
|
OriginalValues.Add("TanevId", (m_TanevId < 0 ? (object)DBNull.Value : (object)m_TanevId));
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
#region Ellenőrzés
|
|
|
|
protected override void Validate(bool skipValidateAttributes = false)
|
|
{
|
|
base.Validate();
|
|
|
|
if (!skipValidateAttributes)
|
|
{
|
|
// korlátos hosszúságú mezők ellenőrzése...
|
|
if (m_Nev != null && m_Nev.Length > 255)
|
|
{
|
|
throw new InvalidEntityAttributeException("MukodesiHely", "Nev", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_EmailCim != null && m_EmailCim.Length > 255)
|
|
{
|
|
throw new InvalidEntityAttributeException("MukodesiHely", "EmailCim", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_Fax != null && m_Fax.Length > 50)
|
|
{
|
|
throw new InvalidEntityAttributeException("MukodesiHely", "Fax", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_IranyitoSzam != null && m_IranyitoSzam.Length > 20)
|
|
{
|
|
throw new InvalidEntityAttributeException("MukodesiHely", "IranyitoSzam", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_Telefonszam != null && m_Telefonszam.Length > 50)
|
|
{
|
|
throw new InvalidEntityAttributeException("MukodesiHely", "Telefonszam", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_Varos != null && m_Varos.Length > 255)
|
|
{
|
|
throw new InvalidEntityAttributeException("MukodesiHely", "Varos", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_VezetoNeve != null && m_VezetoNeve.Length > 255)
|
|
{
|
|
throw new InvalidEntityAttributeException("MukodesiHely", "VezetoNeve", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_TagintezmenyiKod != null && m_TagintezmenyiKod.Length > 50)
|
|
{
|
|
throw new InvalidEntityAttributeException("MukodesiHely", "TagintezmenyiKod", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_Ajto != null && m_Ajto.Length > 30)
|
|
{
|
|
throw new InvalidEntityAttributeException("MukodesiHely", "Ajto", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_Emelet != null && m_Emelet.Length > 40)
|
|
{
|
|
throw new InvalidEntityAttributeException("MukodesiHely", "Emelet", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_Hazszam != null && m_Hazszam.Length > 30)
|
|
{
|
|
throw new InvalidEntityAttributeException("MukodesiHely", "Hazszam", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_KozteruletNev != null && m_KozteruletNev.Length > 40)
|
|
{
|
|
throw new InvalidEntityAttributeException("MukodesiHely", "KozteruletNev", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_MukodesiHelyAzonosito != null && m_MukodesiHelyAzonosito.Length > 50)
|
|
{
|
|
throw new InvalidEntityAttributeException("MukodesiHely", "MukodesiHelyAzonosito", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_Funkcioterulet != null && m_Funkcioterulet.Length > 50)
|
|
{
|
|
throw new InvalidEntityAttributeException("MukodesiHely", "Funkcioterulet", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_KozteruletJellegeNev != null && m_KozteruletJellegeNev.Length > 50)
|
|
{
|
|
throw new InvalidEntityAttributeException("MukodesiHely", "KozteruletJellegeNev", EntityAttributeError.TooLong);
|
|
}
|
|
|
|
}
|
|
|
|
// kötelező asszociációk ellenőrzése...
|
|
if (m_IntezmenyAdatokId == -1) { throw new InvalidEntityAttributeException("MukodesiHely", "IntezmenyAdatokId", EntityAttributeError.Empty); }
|
|
if (m_IntezmenyId == -1) { throw new InvalidEntityAttributeException("MukodesiHely", "IntezmenyId", EntityAttributeError.Empty); }
|
|
if (m_TanevId == -1) { throw new InvalidEntityAttributeException("MukodesiHely", "TanevId", EntityAttributeError.Empty); }
|
|
|
|
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Alaphelyzetbe állítás
|
|
protected override void Reset()
|
|
{
|
|
base.Reset();
|
|
|
|
// alaphelyzetbe állítjuk az egyszerű mezőket
|
|
this.m_Nev = "";
|
|
this.m_EmailCim = null;
|
|
this.m_Fax = null;
|
|
this.m_IranyitoSzam = null;
|
|
this.m_Telefonszam = null;
|
|
this.m_Varos = null;
|
|
this.m_VezetoNeve = null;
|
|
this.m_Tagintezmeny = null;
|
|
this.m_TagintezmenyiKod = null;
|
|
this.m_Szekhely = null;
|
|
this.m_Ajto = null;
|
|
this.m_Emelet = null;
|
|
this.m_Hazszam = null;
|
|
this.m_KozteruletNev = null;
|
|
this.m_MukodesiHelyAzonosito = null;
|
|
this.m_MukodesiHelyTipusa = null;
|
|
this.m_Funkcioterulet = null;
|
|
this.m_KozteruletJellegeNev = null;
|
|
|
|
// alaphelyzetbe állítjuk az asszociációkból származó mezőket
|
|
this.m_Terem = null; // EntityCollection
|
|
this.m_CsengetesiRend = null; // EntityCollection
|
|
this.m_FeladatEllatasiHely = null; // EntityCollection
|
|
this.m_IntezmenyAdatokId = -1;
|
|
this.m_IntezmenyAdatok = null; // Entity
|
|
this.m_MukodesiHelyAdatszolgaltatas = null; // EntityCollection
|
|
this.m_Merohely = null; // EntityCollection
|
|
this.m_MukodesiHelyId = null; // EntityCollection
|
|
this.m_TelephelyAnyaintezmenyId = -1;
|
|
this.m_TelephelyAnyaintezmeny = null; // Entity
|
|
this.m_IntezmenyId = -1;
|
|
this.m_Intezmeny = null; // Entity
|
|
this.m_TanevId = -1;
|
|
this.m_Tanev = null; // Entity
|
|
}
|
|
|
|
#endregion
|
|
|
|
protected override void DeAssociateBeforeDelete(bool runHandler = false)
|
|
{
|
|
// Nem kaszkád törölhető asszociációk ellenőrzése, hogy üresek-e...
|
|
|
|
if (this.Terem.Count > 0)
|
|
{
|
|
throw new EntityDeleteFailedException("MukodesiHely", "Terem", EntityUtil.GetAssociationDescription("T_TEREM_OSSZES", "C_MUKODESIHELYID")); // nincs kapcsolotabla
|
|
}
|
|
if (this.CsengetesiRend.Count > 0)
|
|
{
|
|
throw new EntityDeleteFailedException("MukodesiHely", "CsengetesiRend", EntityUtil.GetAssociationDescription("T_CSENGETESIREND_OSSZES", "C_MUKODESIHELYID")); // nincs kapcsolotabla
|
|
}
|
|
if (this.FeladatEllatasiHely.Count > 0)
|
|
{
|
|
throw new EntityDeleteFailedException("MukodesiHely", "FeladatEllatasiHely", EntityUtil.GetAssociationDescription("T_FELADATELLATASIHELY_OSSZES", "C_MUKODESIHELYID")); // nincs kapcsolotabla
|
|
}
|
|
// IntezmenyAdatok esetében mi mutatunk a másikra: startrole: *, endrole: 1
|
|
if (this.MukodesiHelyAdatszolgaltatas.Count > 0)
|
|
{
|
|
throw new EntityDeleteFailedException("MukodesiHely", "MukodesiHelyAdatszolgaltatas", EntityUtil.GetAssociationDescription("T_MUKODESIHELYADATSZOLGALTATAS_OSSZES", "C_MUKODESIHELYID")); // nincs kapcsolotabla
|
|
}
|
|
if (this.Merohely.Count > 0)
|
|
{
|
|
throw new EntityDeleteFailedException("MukodesiHely", "Merohely", EntityUtil.GetAssociationDescription("T_MEROHELY_OSSZES", "C_MUKODESIHELYID")); // nincs kapcsolotabla
|
|
}
|
|
if (this.MukodesiHelyId.Count > 0)
|
|
{
|
|
throw new EntityDeleteFailedException("MukodesiHely", "MukodesiHelyId", EntityUtil.GetAssociationDescription("T_MUKODESIHELY_OSSZES", "C_TELEPHELYANYAINTEZMENYID")); // nincs kapcsolotabla
|
|
}
|
|
// TelephelyAnyaintezmeny esetében mi mutatunk a másikra: startrole: *, endrole: 0..1
|
|
// Intezmeny esetében mi mutatunk a másikra: startrole: *, endrole: 1
|
|
// Tanev esetében mi mutatunk a másikra: startrole: *, endrole: 1
|
|
|
|
// kaszkád törlések...
|
|
|
|
}
|
|
|
|
#region Mezők és tulajdonságok
|
|
|
|
#region Egyszerű mezők
|
|
|
|
#region Nev
|
|
|
|
protected internal string m_Nev;
|
|
|
|
/// <summary>
|
|
/// A muködési hely neve, tanévenként és intézményenként egyedi
|
|
/// </summary>
|
|
[EntityProperty("Nev", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string Nev
|
|
{
|
|
get
|
|
{
|
|
return m_Nev;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_Nev == value) return;
|
|
m_Nev = value;
|
|
FieldModified("Nev", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region EmailCim
|
|
|
|
protected internal string m_EmailCim;
|
|
|
|
/// <summary>
|
|
/// Email cím
|
|
/// </summary>
|
|
[EntityProperty("EmailCim", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string EmailCim
|
|
{
|
|
get
|
|
{
|
|
return m_EmailCim;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_EmailCim == value) return;
|
|
m_EmailCim = value;
|
|
FieldModified("EmailCim", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Fax
|
|
|
|
protected internal string m_Fax;
|
|
|
|
/// <summary>
|
|
/// Faxszám
|
|
/// </summary>
|
|
[EntityProperty("Fax", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string Fax
|
|
{
|
|
get
|
|
{
|
|
return m_Fax;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_Fax == value) return;
|
|
m_Fax = value;
|
|
FieldModified("Fax", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IranyitoSzam
|
|
|
|
protected internal string m_IranyitoSzam;
|
|
|
|
/// <summary>
|
|
/// Irányítószám
|
|
/// </summary>
|
|
[EntityProperty("IranyitoSzam", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string IranyitoSzam
|
|
{
|
|
get
|
|
{
|
|
return m_IranyitoSzam;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_IranyitoSzam == value) return;
|
|
m_IranyitoSzam = value;
|
|
FieldModified("IranyitoSzam", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Telefonszam
|
|
|
|
protected internal string m_Telefonszam;
|
|
|
|
/// <summary>
|
|
/// Telefonszám
|
|
/// </summary>
|
|
[EntityProperty("Telefonszam", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string Telefonszam
|
|
{
|
|
get
|
|
{
|
|
return m_Telefonszam;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_Telefonszam == value) return;
|
|
m_Telefonszam = value;
|
|
FieldModified("Telefonszam", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Varos
|
|
|
|
protected internal string m_Varos;
|
|
|
|
/// <summary>
|
|
/// Város
|
|
/// </summary>
|
|
[EntityProperty("Varos", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string Varos
|
|
{
|
|
get
|
|
{
|
|
return m_Varos;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_Varos == value) return;
|
|
m_Varos = value;
|
|
FieldModified("Varos", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region VezetoNeve
|
|
|
|
protected internal string m_VezetoNeve;
|
|
|
|
/// <summary>
|
|
/// Vezeto neve
|
|
/// </summary>
|
|
[EntityProperty("VezetoNeve", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string VezetoNeve
|
|
{
|
|
get
|
|
{
|
|
return m_VezetoNeve;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_VezetoNeve == value) return;
|
|
m_VezetoNeve = value;
|
|
FieldModified("VezetoNeve", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Tagintezmeny
|
|
|
|
protected internal bool? m_Tagintezmeny;
|
|
|
|
/// <summary>
|
|
/// Tagintézmény-e (NINCS HASZNÁLVA???)
|
|
/// </summary>
|
|
[EntityProperty("Tagintezmeny", EntityPropertyBaseType.ValueType, typeof(bool), EntityCopyMethod.ShallowCopy)]
|
|
public virtual bool? Tagintezmeny
|
|
{
|
|
get
|
|
{
|
|
return m_Tagintezmeny;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_Tagintezmeny == value) return;
|
|
m_Tagintezmeny = value;
|
|
FieldModified("Tagintezmeny", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region TagintezmenyiKod
|
|
|
|
protected internal string m_TagintezmenyiKod;
|
|
|
|
/// <summary>
|
|
/// Tagintézmény kódja
|
|
/// </summary>
|
|
[EntityProperty("TagintezmenyiKod", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string TagintezmenyiKod
|
|
{
|
|
get
|
|
{
|
|
return m_TagintezmenyiKod;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_TagintezmenyiKod == value) return;
|
|
m_TagintezmenyiKod = value;
|
|
FieldModified("TagintezmenyiKod", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Szekhely
|
|
|
|
protected internal bool? m_Szekhely;
|
|
|
|
/// <summary>
|
|
/// Székhely-e (NINCS HASZNÁLVA???)
|
|
/// </summary>
|
|
[EntityProperty("Szekhely", EntityPropertyBaseType.ValueType, typeof(bool), EntityCopyMethod.ShallowCopy)]
|
|
public virtual bool? Szekhely
|
|
{
|
|
get
|
|
{
|
|
return m_Szekhely;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_Szekhely == value) return;
|
|
m_Szekhely = value;
|
|
FieldModified("Szekhely", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Ajto
|
|
|
|
protected internal string m_Ajto;
|
|
|
|
/// <summary>
|
|
/// Ajtó
|
|
/// </summary>
|
|
[EntityProperty("Ajto", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string Ajto
|
|
{
|
|
get
|
|
{
|
|
return m_Ajto;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_Ajto == value) return;
|
|
m_Ajto = value;
|
|
FieldModified("Ajto", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Emelet
|
|
|
|
protected internal string m_Emelet;
|
|
|
|
/// <summary>
|
|
/// Emelet
|
|
/// </summary>
|
|
[EntityProperty("Emelet", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string Emelet
|
|
{
|
|
get
|
|
{
|
|
return m_Emelet;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_Emelet == value) return;
|
|
m_Emelet = value;
|
|
FieldModified("Emelet", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Hazszam
|
|
|
|
protected internal string m_Hazszam;
|
|
|
|
/// <summary>
|
|
/// Házszám
|
|
/// </summary>
|
|
[EntityProperty("Hazszam", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string Hazszam
|
|
{
|
|
get
|
|
{
|
|
return m_Hazszam;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_Hazszam == value) return;
|
|
m_Hazszam = value;
|
|
FieldModified("Hazszam", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region KozteruletNev
|
|
|
|
protected internal string m_KozteruletNev;
|
|
|
|
/// <summary>
|
|
/// Közterület neve
|
|
/// </summary>
|
|
[EntityProperty("KozteruletNev", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string KozteruletNev
|
|
{
|
|
get
|
|
{
|
|
return m_KozteruletNev;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_KozteruletNev == value) return;
|
|
m_KozteruletNev = value;
|
|
FieldModified("KozteruletNev", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region MukodesiHelyAzonosito
|
|
|
|
protected internal string m_MukodesiHelyAzonosito;
|
|
|
|
/// <summary>
|
|
/// Muködési hely azonosítója
|
|
/// </summary>
|
|
[EntityProperty("MukodesiHelyAzonosito", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string MukodesiHelyAzonosito
|
|
{
|
|
get
|
|
{
|
|
return m_MukodesiHelyAzonosito;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_MukodesiHelyAzonosito == value) return;
|
|
m_MukodesiHelyAzonosito = value;
|
|
FieldModified("MukodesiHelyAzonosito", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region MukodesiHelyTipusa
|
|
|
|
protected internal int? /* DictionaryItem */ m_MukodesiHelyTipusa;
|
|
|
|
/// <summary>
|
|
/// Muködési hely típusa ID (Székhely, tagintézmény, telephely)
|
|
/// </summary>
|
|
[EntityProperty("MukodesiHelyTipusa", EntityPropertyBaseType.ValueType, typeof(int /* DictionaryItem */), EntityCopyMethod.ShallowCopy)]
|
|
[EntityDictionaryItemProperty("MukodesiHelyTipusa", "MukodesiHelyTipus", typeof(SDA.Kreta.Entities.MukodesiHelyTipus))]
|
|
|
|
public virtual int? /* DictionaryItem */ MukodesiHelyTipusa
|
|
{
|
|
get
|
|
{
|
|
return m_MukodesiHelyTipusa;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_MukodesiHelyTipusa == value) return;
|
|
m_MukodesiHelyTipusa = value;
|
|
FieldModified("MukodesiHelyTipusa", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Funkcioterulet
|
|
|
|
protected internal string m_Funkcioterulet;
|
|
|
|
/// <summary>
|
|
/// SAP telephely azonosítója. Ez alapján van bekötve az SAP interfész. Azaz megmondja, hogy az adott muködési helyhez melyik SAP funkcióterület tartozik.
|
|
/// </summary>
|
|
[EntityProperty("Funkcioterulet", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string Funkcioterulet
|
|
{
|
|
get
|
|
{
|
|
return m_Funkcioterulet;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_Funkcioterulet == value) return;
|
|
m_Funkcioterulet = value;
|
|
FieldModified("Funkcioterulet", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region KozteruletJellegeNev
|
|
|
|
protected internal string m_KozteruletJellegeNev;
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
[EntityProperty("KozteruletJellegeNev", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string KozteruletJellegeNev
|
|
{
|
|
get
|
|
{
|
|
return m_KozteruletJellegeNev;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_KozteruletJellegeNev == value) return;
|
|
m_KozteruletJellegeNev = value;
|
|
FieldModified("KozteruletJellegeNev", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region Asszociációkkal kapcsolatos dolgok
|
|
|
|
protected internal virtual bool LoadByTeremId(int id)
|
|
{
|
|
return m_DA.LoadByTeremId(id, this);
|
|
}
|
|
|
|
protected internal virtual bool LoadByCsengetesiRendId(int id)
|
|
{
|
|
return m_DA.LoadByCsengetesiRendId(id, this);
|
|
}
|
|
|
|
protected internal virtual bool LoadByFeladatEllatasiHelyId(int id)
|
|
{
|
|
return m_DA.LoadByFeladatEllatasiHelyId(id, this);
|
|
}
|
|
|
|
protected internal virtual bool LoadByMukodesiHelyAdatszolgaltatasId(int id)
|
|
{
|
|
return m_DA.LoadByMukodesiHelyAdatszolgaltatasId(id, this);
|
|
}
|
|
|
|
protected internal virtual bool LoadByMerohelyId(int id)
|
|
{
|
|
return m_DA.LoadByMerohelyId(id, this);
|
|
}
|
|
|
|
protected internal virtual bool LoadByMukodesiHelyIdId(int id)
|
|
{
|
|
return m_DA.LoadByMukodesiHelyIdId(id, this);
|
|
}
|
|
|
|
#region MukodesiHely (*) -> IntezmenyAdatok (1)
|
|
|
|
protected internal int m_IntezmenyAdatokId = -1;
|
|
|
|
/// <summary>
|
|
/// A(z) IntezmenyAdatok asszociáció végpontjának ID-ja.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// - Insert() előtt célszerű kitölteni
|
|
/// - Update() nincs rá hatással: ezt a mezőt nem frissíti
|
|
/// - LoadByID() felhozza ezt a mezőt
|
|
/// </remarks>
|
|
public virtual int IntezmenyAdatokId
|
|
{
|
|
get
|
|
{
|
|
return InternalIntezmenyAdatokId;
|
|
}
|
|
set
|
|
{
|
|
InternalIntezmenyAdatokId = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Ez egy külön bejárat a DA számára
|
|
/// <summary>
|
|
internal int InternalIntezmenyAdatokId
|
|
{
|
|
get
|
|
{
|
|
if (m_IntezmenyAdatok != null)
|
|
{
|
|
return m_IntezmenyAdatok.ID;
|
|
}
|
|
else
|
|
{
|
|
return m_IntezmenyAdatokId;// XXX az meg nem teljesen OK
|
|
}
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
if (m_IntezmenyAdatokId != value)
|
|
{
|
|
m_IntezmenyAdatokId = value;
|
|
m_IntezmenyAdatok = null;
|
|
FieldModified("IntezmenyAdatokId", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Ez egy külön bejárat a DA számára
|
|
/// <summary>
|
|
internal void ModifyIntezmenyAdatok(IntezmenyAdatok value)
|
|
{
|
|
m_IntezmenyAdatokId = value != null ? value.ID : -1;
|
|
m_IntezmenyAdatok = value;
|
|
FieldModified("IntezmenyAdatokId", value != null ? (object)value.ID : DBNull.Value);
|
|
}
|
|
|
|
protected internal void SetIntezmenyAdatok(IntezmenyAdatok value)
|
|
{
|
|
m_IntezmenyAdatok = value;
|
|
if (value != null)
|
|
{
|
|
m_IntezmenyAdatokId = value.ID;
|
|
}
|
|
else
|
|
{
|
|
m_IntezmenyAdatokId = -1;
|
|
}
|
|
}
|
|
|
|
protected IntezmenyAdatok m_IntezmenyAdatok = null;
|
|
|
|
IIntezmenyAdatok IMukodesiHely.IntezmenyAdatok
|
|
{
|
|
get { return IntezmenyAdatok; }
|
|
set { IntezmenyAdatok = value as IntezmenyAdatok; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Az UML modellben szereplő MukodesiHely és IntezmenyAdatok entitások közötti asszociáció megvalósítása.
|
|
/// </remarks>
|
|
[EntityProperty("IntezmenyAdatok", EntityPropertyBaseType.Entity, typeof(IntezmenyAdatok), EntityCopyMethod.ShallowCopy)]
|
|
public virtual IntezmenyAdatok IntezmenyAdatok
|
|
{
|
|
get
|
|
{
|
|
if ((m_IntezmenyAdatok == null) && (m_IntezmenyAdatokId != -1))
|
|
{
|
|
SDA.Kreta.Entities.IntezmenyAdatok partner = SDA.Kreta.Entities.IntezmenyAdatok.GiveAnInstance();
|
|
partner.LoadByID(m_IntezmenyAdatokId);
|
|
|
|
this.SetIntezmenyAdatok(partner);
|
|
}
|
|
// természetesen null-t adunk vissza, ha nem tudtunk felhozni semmit
|
|
return m_IntezmenyAdatok;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
if (value != null)
|
|
{
|
|
if ((m_IntezmenyAdatok == null) || (value.ID != m_IntezmenyAdatok.ID))
|
|
{
|
|
if (value.State != EntityState.Initialized)
|
|
{
|
|
throw new EntityStateException(value.State);
|
|
}
|
|
if ((this.State != EntityState.New))
|
|
{
|
|
// Lista van a másik oldalon, úgyhogy a lista DA-ját használjuk
|
|
SDA.Kreta.Entities.IntezmenyAdatok_MukodesiHely_DA da = new IntezmenyAdatok_MukodesiHely_DA(value);
|
|
da.AddItem(this);
|
|
this.SetIntezmenyAdatok(value);
|
|
}
|
|
else
|
|
{
|
|
this.SetIntezmenyAdatok(value);
|
|
}
|
|
FieldModified("IntezmenyAdatokId", value.ID);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// ki kell törölni a kapcsolatot az adatbázisban
|
|
this.SetIntezmenyAdatok(null);
|
|
UpdateAssociations();
|
|
FieldModified("IntezmenyAdatokId", DBNull.Value);
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region MukodesiHely (*) -> MukodesiHely (0..1)
|
|
|
|
protected internal int m_TelephelyAnyaintezmenyId = -1;
|
|
|
|
/// <summary>
|
|
/// A(z) TelephelyAnyaintezmeny asszociáció végpontjának ID-ja.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// - Insert() előtt célszerű kitölteni
|
|
/// - Update() nincs rá hatással: ezt a mezőt nem frissíti
|
|
/// - LoadByID() felhozza ezt a mezőt
|
|
/// </remarks>
|
|
public virtual int TelephelyAnyaintezmenyId
|
|
{
|
|
get
|
|
{
|
|
return InternalTelephelyAnyaintezmenyId;
|
|
}
|
|
set
|
|
{
|
|
InternalTelephelyAnyaintezmenyId = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Ez egy külön bejárat a DA számára
|
|
/// <summary>
|
|
internal int InternalTelephelyAnyaintezmenyId
|
|
{
|
|
get
|
|
{
|
|
if (m_TelephelyAnyaintezmeny != null)
|
|
{
|
|
return m_TelephelyAnyaintezmeny.ID;
|
|
}
|
|
else
|
|
{
|
|
return m_TelephelyAnyaintezmenyId;// XXX az meg nem teljesen OK
|
|
}
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
if (m_TelephelyAnyaintezmenyId != value)
|
|
{
|
|
m_TelephelyAnyaintezmenyId = value;
|
|
m_TelephelyAnyaintezmeny = null;
|
|
FieldModified("TelephelyAnyaintezmenyId", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Ez egy külön bejárat a DA számára
|
|
/// <summary>
|
|
internal void ModifyTelephelyAnyaintezmeny(MukodesiHely value)
|
|
{
|
|
m_TelephelyAnyaintezmenyId = value != null ? value.ID : -1;
|
|
m_TelephelyAnyaintezmeny = value;
|
|
FieldModified("TelephelyAnyaintezmenyId", value != null ? (object)value.ID : DBNull.Value);
|
|
}
|
|
|
|
protected internal void SetTelephelyAnyaintezmeny(MukodesiHely value)
|
|
{
|
|
m_TelephelyAnyaintezmeny = value;
|
|
if (value != null)
|
|
{
|
|
m_TelephelyAnyaintezmenyId = value.ID;
|
|
}
|
|
else
|
|
{
|
|
m_TelephelyAnyaintezmenyId = -1;
|
|
}
|
|
}
|
|
|
|
protected MukodesiHely m_TelephelyAnyaintezmeny = null;
|
|
|
|
IMukodesiHely IMukodesiHely.TelephelyAnyaintezmeny
|
|
{
|
|
get { return TelephelyAnyaintezmeny; }
|
|
set { TelephelyAnyaintezmeny = value as MukodesiHely; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Az UML modellben szereplő MukodesiHely és MukodesiHely entitások közötti asszociáció megvalósítása.
|
|
/// </remarks>
|
|
[EntityProperty("TelephelyAnyaintezmeny", EntityPropertyBaseType.Entity, typeof(MukodesiHely), EntityCopyMethod.ShallowCopy)]
|
|
public virtual MukodesiHely TelephelyAnyaintezmeny
|
|
{
|
|
get
|
|
{
|
|
if ((m_TelephelyAnyaintezmeny == null) && (m_TelephelyAnyaintezmenyId != -1))
|
|
{
|
|
SDA.Kreta.Entities.MukodesiHely partner = SDA.Kreta.Entities.MukodesiHely.GiveAnInstance();
|
|
partner.LoadByID(m_TelephelyAnyaintezmenyId);
|
|
|
|
this.SetTelephelyAnyaintezmeny(partner);
|
|
}
|
|
// természetesen null-t adunk vissza, ha nem tudtunk felhozni semmit
|
|
return m_TelephelyAnyaintezmeny;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
if (value != null)
|
|
{
|
|
if ((m_TelephelyAnyaintezmeny == null) || (value.ID != m_TelephelyAnyaintezmeny.ID))
|
|
{
|
|
if (value.State != EntityState.Initialized)
|
|
{
|
|
throw new EntityStateException(value.State);
|
|
}
|
|
if ((this.State != EntityState.New))
|
|
{
|
|
// Lista van a másik oldalon, úgyhogy a lista DA-ját használjuk
|
|
SDA.Kreta.Entities.MukodesiHely_MukodesiHelyId_DA da = new MukodesiHely_MukodesiHelyId_DA(value);
|
|
da.AddItem(this);
|
|
this.SetTelephelyAnyaintezmeny(value);
|
|
}
|
|
else
|
|
{
|
|
this.SetTelephelyAnyaintezmeny(value);
|
|
}
|
|
FieldModified("TelephelyAnyaintezmenyId", value.ID);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// ki kell törölni a kapcsolatot az adatbázisban
|
|
this.SetTelephelyAnyaintezmeny(null);
|
|
UpdateAssociations();
|
|
FieldModified("TelephelyAnyaintezmenyId", DBNull.Value);
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region MukodesiHely (*) -> Intezmeny (1)
|
|
|
|
protected internal int m_IntezmenyId = -1;
|
|
|
|
/// <summary>
|
|
/// A(z) Intezmeny asszociáció végpontjának ID-ja.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// - Insert() előtt célszerű kitölteni
|
|
/// - Update() nincs rá hatással: ezt a mezőt nem frissíti
|
|
/// - LoadByID() felhozza ezt a mezőt
|
|
/// </remarks>
|
|
public virtual int IntezmenyId
|
|
{
|
|
get
|
|
{
|
|
return InternalIntezmenyId;
|
|
}
|
|
set
|
|
{
|
|
InternalIntezmenyId = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Ez egy külön bejárat a DA számára
|
|
/// <summary>
|
|
internal int InternalIntezmenyId
|
|
{
|
|
get
|
|
{
|
|
if (m_Intezmeny != null)
|
|
{
|
|
return m_Intezmeny.ID;
|
|
}
|
|
else
|
|
{
|
|
return m_IntezmenyId;// XXX az meg nem teljesen OK
|
|
}
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
if (m_IntezmenyId != value)
|
|
{
|
|
m_IntezmenyId = value;
|
|
m_Intezmeny = null;
|
|
FieldModified("IntezmenyId", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Ez egy külön bejárat a DA számára
|
|
/// <summary>
|
|
internal void ModifyIntezmeny(Intezmeny value)
|
|
{
|
|
m_IntezmenyId = value != null ? value.ID : -1;
|
|
m_Intezmeny = value;
|
|
FieldModified("IntezmenyId", value != null ? (object)value.ID : DBNull.Value);
|
|
}
|
|
|
|
protected internal void SetIntezmeny(Intezmeny value)
|
|
{
|
|
m_Intezmeny = value;
|
|
if (value != null)
|
|
{
|
|
m_IntezmenyId = value.ID;
|
|
}
|
|
else
|
|
{
|
|
m_IntezmenyId = -1;
|
|
}
|
|
}
|
|
|
|
protected Intezmeny m_Intezmeny = null;
|
|
|
|
IIntezmeny IMukodesiHely.Intezmeny
|
|
{
|
|
get { return Intezmeny; }
|
|
set { Intezmeny = value as Intezmeny; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Az UML modellben szereplő MukodesiHely és Intezmeny entitások közötti asszociáció megvalósítása.
|
|
/// </remarks>
|
|
[EntityProperty("Intezmeny", EntityPropertyBaseType.Entity, typeof(Intezmeny), EntityCopyMethod.ShallowCopy)]
|
|
public virtual Intezmeny Intezmeny
|
|
{
|
|
get
|
|
{
|
|
if ((m_Intezmeny == null) && (m_IntezmenyId != -1))
|
|
{
|
|
SDA.Kreta.Entities.Intezmeny partner = SDA.Kreta.Entities.Intezmeny.GiveAnInstance();
|
|
partner.LoadByID(m_IntezmenyId);
|
|
|
|
this.SetIntezmeny(partner);
|
|
}
|
|
// természetesen null-t adunk vissza, ha nem tudtunk felhozni semmit
|
|
return m_Intezmeny;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
if (value != null)
|
|
{
|
|
if ((m_Intezmeny == null) || (value.ID != m_Intezmeny.ID))
|
|
{
|
|
if (value.State != EntityState.Initialized)
|
|
{
|
|
throw new EntityStateException(value.State);
|
|
}
|
|
if ((this.State != EntityState.New))
|
|
{
|
|
// Lista van a másik oldalon, úgyhogy a lista DA-ját használjuk
|
|
SDA.Kreta.Entities.Intezmeny_MukodesiHely_DA da = new Intezmeny_MukodesiHely_DA(value);
|
|
da.AddItem(this);
|
|
this.SetIntezmeny(value);
|
|
}
|
|
else
|
|
{
|
|
this.SetIntezmeny(value);
|
|
}
|
|
FieldModified("IntezmenyId", value.ID);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// ki kell törölni a kapcsolatot az adatbázisban
|
|
this.SetIntezmeny(null);
|
|
UpdateAssociations();
|
|
FieldModified("IntezmenyId", DBNull.Value);
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region MukodesiHely (*) -> Tanev (1)
|
|
|
|
protected internal int m_TanevId = -1;
|
|
|
|
/// <summary>
|
|
/// A(z) Tanev asszociáció végpontjának ID-ja.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// - Insert() előtt célszerű kitölteni
|
|
/// - Update() nincs rá hatással: ezt a mezőt nem frissíti
|
|
/// - LoadByID() felhozza ezt a mezőt
|
|
/// </remarks>
|
|
public virtual int TanevId
|
|
{
|
|
get
|
|
{
|
|
return InternalTanevId;
|
|
}
|
|
set
|
|
{
|
|
InternalTanevId = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Ez egy külön bejárat a DA számára
|
|
/// <summary>
|
|
internal int InternalTanevId
|
|
{
|
|
get
|
|
{
|
|
if (m_Tanev != null)
|
|
{
|
|
return m_Tanev.ID;
|
|
}
|
|
else
|
|
{
|
|
return m_TanevId;// XXX az meg nem teljesen OK
|
|
}
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
if (m_TanevId != value)
|
|
{
|
|
m_TanevId = value;
|
|
m_Tanev = null;
|
|
FieldModified("TanevId", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Ez egy külön bejárat a DA számára
|
|
/// <summary>
|
|
internal void ModifyTanev(Tanev value)
|
|
{
|
|
m_TanevId = value != null ? value.ID : -1;
|
|
m_Tanev = value;
|
|
FieldModified("TanevId", value != null ? (object)value.ID : DBNull.Value);
|
|
}
|
|
|
|
protected internal void SetTanev(Tanev value)
|
|
{
|
|
m_Tanev = value;
|
|
if (value != null)
|
|
{
|
|
m_TanevId = value.ID;
|
|
}
|
|
else
|
|
{
|
|
m_TanevId = -1;
|
|
}
|
|
}
|
|
|
|
protected Tanev m_Tanev = null;
|
|
|
|
ITanev IMukodesiHely.Tanev
|
|
{
|
|
get { return Tanev; }
|
|
set { Tanev = value as Tanev; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Az UML modellben szereplő MukodesiHely és Tanev entitások közötti asszociáció megvalósítása.
|
|
/// </remarks>
|
|
[EntityProperty("Tanev", EntityPropertyBaseType.Entity, typeof(Tanev), EntityCopyMethod.ShallowCopy)]
|
|
public virtual Tanev Tanev
|
|
{
|
|
get
|
|
{
|
|
if ((m_Tanev == null) && (m_TanevId != -1))
|
|
{
|
|
SDA.Kreta.Entities.Tanev partner = SDA.Kreta.Entities.Tanev.GiveAnInstance();
|
|
partner.LoadByID(m_TanevId);
|
|
|
|
this.SetTanev(partner);
|
|
}
|
|
// természetesen null-t adunk vissza, ha nem tudtunk felhozni semmit
|
|
return m_Tanev;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
if (value != null)
|
|
{
|
|
if ((m_Tanev == null) || (value.ID != m_Tanev.ID))
|
|
{
|
|
if (value.State != EntityState.Initialized)
|
|
{
|
|
throw new EntityStateException(value.State);
|
|
}
|
|
if ((this.State != EntityState.New))
|
|
{
|
|
// Lista van a másik oldalon, úgyhogy a lista DA-ját használjuk
|
|
SDA.Kreta.Entities.Tanev_MukodesiHely_DA da = new Tanev_MukodesiHely_DA(value);
|
|
da.AddItem(this);
|
|
this.SetTanev(value);
|
|
}
|
|
else
|
|
{
|
|
this.SetTanev(value);
|
|
}
|
|
FieldModified("TanevId", value.ID);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// ki kell törölni a kapcsolatot az adatbázisban
|
|
this.SetTanev(null);
|
|
UpdateAssociations();
|
|
FieldModified("TanevId", DBNull.Value);
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
|
|
#region MukodesiHely (0..1) -> Terem (*)
|
|
protected IAssociatedEntityCollection<Terem> m_Terem = null;
|
|
|
|
IReadOnlyList<ITerem> IMukodesiHely.Terem => Terem.Cast<ITerem>().ToList();
|
|
|
|
/// <summary>
|
|
/// Muködési hely ID-ja
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Az UML modellben szereplő MukodesiHely és Terem entitások közötti asszociáció megvalósítása.
|
|
/// </remarks>
|
|
[EntityProperty("Terem", EntityPropertyBaseType.EntityCollection, typeof(IAssociatedEntityCollection<Terem>), EntityCopyMethod.DeepCopy, "MukodesiHelyId")]
|
|
public virtual IAssociatedEntityCollection<Terem> Terem
|
|
{
|
|
get
|
|
{
|
|
if (m_Terem == null)
|
|
{
|
|
m_Terem = new AssociatedEntityCollection<MukodesiHely, Terem>(
|
|
new MukodesiHely_Terem_DA(this)
|
|
);
|
|
m_Terem.Load();
|
|
}
|
|
return m_Terem;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region MukodesiHely (0..1) -> CsengetesiRend (*)
|
|
protected IAssociatedEntityCollection<CsengetesiRend> m_CsengetesiRend = null;
|
|
|
|
IReadOnlyList<ICsengetesiRend> IMukodesiHely.CsengetesiRend => CsengetesiRend.Cast<ICsengetesiRend>().ToList();
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Az UML modellben szereplő MukodesiHely és CsengetesiRend entitások közötti asszociáció megvalósítása.
|
|
/// </remarks>
|
|
[EntityProperty("CsengetesiRend", EntityPropertyBaseType.EntityCollection, typeof(IAssociatedEntityCollection<CsengetesiRend>), EntityCopyMethod.DeepCopy, "MukodesiHelyId")]
|
|
public virtual IAssociatedEntityCollection<CsengetesiRend> CsengetesiRend
|
|
{
|
|
get
|
|
{
|
|
if (m_CsengetesiRend == null)
|
|
{
|
|
m_CsengetesiRend = new AssociatedEntityCollection<MukodesiHely, CsengetesiRend>(
|
|
new MukodesiHely_CsengetesiRend_DA(this)
|
|
);
|
|
m_CsengetesiRend.Load();
|
|
}
|
|
return m_CsengetesiRend;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region MukodesiHely (1) -> FeladatEllatasiHely (*)
|
|
protected IAssociatedEntityCollection<FeladatEllatasiHely> m_FeladatEllatasiHely = null;
|
|
|
|
IReadOnlyList<IFeladatEllatasiHely> IMukodesiHely.FeladatEllatasiHely => FeladatEllatasiHely.Cast<IFeladatEllatasiHely>().ToList();
|
|
|
|
/// <summary>
|
|
/// Muködési hely ID-ja, ahol a feladatellátási hely talátható
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Az UML modellben szereplő MukodesiHely és FeladatEllatasiHely entitások közötti asszociáció megvalósítása.
|
|
/// </remarks>
|
|
[EntityProperty("FeladatEllatasiHely", EntityPropertyBaseType.EntityCollection, typeof(IAssociatedEntityCollection<FeladatEllatasiHely>), EntityCopyMethod.DeepCopy, "MukodesiHelyId")]
|
|
public virtual IAssociatedEntityCollection<FeladatEllatasiHely> FeladatEllatasiHely
|
|
{
|
|
get
|
|
{
|
|
if (m_FeladatEllatasiHely == null)
|
|
{
|
|
m_FeladatEllatasiHely = new AssociatedEntityCollection<MukodesiHely, FeladatEllatasiHely>(
|
|
new MukodesiHely_FeladatEllatasiHely_DA(this)
|
|
);
|
|
m_FeladatEllatasiHely.Load();
|
|
}
|
|
return m_FeladatEllatasiHely;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region MukodesiHely (1) -> MukodesiHelyAdatszolgaltatas (*)
|
|
protected IAssociatedEntityCollection<MukodesiHelyAdatszolgaltatas> m_MukodesiHelyAdatszolgaltatas = null;
|
|
|
|
IReadOnlyList<IMukodesiHelyAdatszolgaltatas> IMukodesiHely.MukodesiHelyAdatszolgaltatas => MukodesiHelyAdatszolgaltatas.Cast<IMukodesiHelyAdatszolgaltatas>().ToList();
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Az UML modellben szereplő MukodesiHely és MukodesiHelyAdatszolgaltatas entitások közötti asszociáció megvalósítása.
|
|
/// </remarks>
|
|
[EntityProperty("MukodesiHelyAdatszolgaltatas", EntityPropertyBaseType.EntityCollection, typeof(IAssociatedEntityCollection<MukodesiHelyAdatszolgaltatas>), EntityCopyMethod.DeepCopy, "MukodesiHelyId")]
|
|
public virtual IAssociatedEntityCollection<MukodesiHelyAdatszolgaltatas> MukodesiHelyAdatszolgaltatas
|
|
{
|
|
get
|
|
{
|
|
if (m_MukodesiHelyAdatszolgaltatas == null)
|
|
{
|
|
m_MukodesiHelyAdatszolgaltatas = new AssociatedEntityCollection<MukodesiHely, MukodesiHelyAdatszolgaltatas>(
|
|
new MukodesiHely_MukodesiHelyAdatszolgaltatas_DA(this)
|
|
);
|
|
m_MukodesiHelyAdatszolgaltatas.Load();
|
|
}
|
|
return m_MukodesiHelyAdatszolgaltatas;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region MukodesiHely (1) -> Merohely (*)
|
|
protected IAssociatedEntityCollection<Merohely> m_Merohely = null;
|
|
|
|
IReadOnlyList<IMerohely> IMukodesiHely.Merohely => Merohely.Cast<IMerohely>().ToList();
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Az UML modellben szereplő MukodesiHely és Merohely entitások közötti asszociáció megvalósítása.
|
|
/// </remarks>
|
|
[EntityProperty("Merohely", EntityPropertyBaseType.EntityCollection, typeof(IAssociatedEntityCollection<Merohely>), EntityCopyMethod.DeepCopy, "MukodesiHelyId")]
|
|
public virtual IAssociatedEntityCollection<Merohely> Merohely
|
|
{
|
|
get
|
|
{
|
|
if (m_Merohely == null)
|
|
{
|
|
m_Merohely = new AssociatedEntityCollection<MukodesiHely, Merohely>(
|
|
new MukodesiHely_Merohely_DA(this)
|
|
);
|
|
m_Merohely.Load();
|
|
}
|
|
return m_Merohely;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region MukodesiHely (0..1) -> MukodesiHely (*)
|
|
protected IAssociatedEntityCollection<MukodesiHely> m_MukodesiHelyId = null;
|
|
|
|
IReadOnlyList<IMukodesiHely> IMukodesiHely.MukodesiHelyId => MukodesiHelyId.Cast<IMukodesiHely>().ToList();
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Az UML modellben szereplő MukodesiHely és MukodesiHely entitások közötti asszociáció megvalósítása.
|
|
/// </remarks>
|
|
[EntityProperty("MukodesiHelyId", EntityPropertyBaseType.EntityCollection, typeof(IAssociatedEntityCollection<MukodesiHely>), EntityCopyMethod.DeepCopy, "TelephelyAnyaintezmenyId")]
|
|
public virtual IAssociatedEntityCollection<MukodesiHely> MukodesiHelyId
|
|
{
|
|
get
|
|
{
|
|
if (m_MukodesiHelyId == null)
|
|
{
|
|
m_MukodesiHelyId = new AssociatedEntityCollection<MukodesiHely, MukodesiHely>(
|
|
new MukodesiHely_MukodesiHelyId_DA(this)
|
|
);
|
|
m_MukodesiHelyId.Load();
|
|
}
|
|
return m_MukodesiHelyId;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
}
|
|
}
|
|
|