1065 lines
35 KiB
C#
1065 lines
35 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 FoglalkozasArchiv 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("FoglalkozasArchiv")]
|
|
// alapértelmezett EntityHistoryMode
|
|
public class FoglalkozasArchiv : Entity, IFoglalkozasArchiv
|
|
{
|
|
internal protected FoglalkozasArchiv()
|
|
: base()
|
|
{
|
|
}
|
|
|
|
public class AttributeInfo
|
|
{
|
|
public const string AlkalmazottId = "AlkalmazottId";
|
|
public const string ElfogadasDatuma = "ElfogadasDatuma";
|
|
public const string FeladatEllatasiHelyId = "FeladatEllatasiHelyId";
|
|
public const string FeladatEllatasiHelyNeve = "FeladatEllatasiHelyNeve";
|
|
public const string Oraszam = "Oraszam";
|
|
public const string OsztalyCsoportId = "OsztalyCsoportId";
|
|
public const string OsztalyCsoportNeve = "OsztalyCsoportNeve";
|
|
public const string TanarKotelezoOraszama = "TanarKotelezoOraszama";
|
|
public const string TanarMunkaidoKedvezmenye = "TanarMunkaidoKedvezmenye";
|
|
public const string TanarMunkaidoKedvezmenyOka = "TanarMunkaidoKedvezmenyOka";
|
|
public const string TanarMunkaidoKedvezmenyOkaId = "TanarMunkaidoKedvezmenyOkaId";
|
|
public const string TanarMunkakore = "TanarMunkakore";
|
|
public const string TanarMunkakoreId = "TanarMunkakoreId";
|
|
public const string TanarNeve = "TanarNeve";
|
|
public const string TanarPedagogiaiKepesitese = "TanarPedagogiaiKepesitese";
|
|
public const string TanarPedagogiaiKepesiteseId = "TanarPedagogiaiKepesiteseId";
|
|
public const string TanevNeve = "TanevNeve";
|
|
public const string TantargyId = "TantargyId";
|
|
public const string TantargyNeve = "TantargyNeve";
|
|
}
|
|
|
|
public class AttributeLengthInfo
|
|
{
|
|
public const int FeladatEllatasiHelyNeveLength = 255;
|
|
public const int OsztalyCsoportNeveLength = 255;
|
|
public const int TanarMunkaidoKedvezmenyOkaLength = 255;
|
|
public const int TanarMunkakoreLength = 255;
|
|
public const int TanarNeveLength = 255;
|
|
public const int TanarPedagogiaiKepesiteseLength = 255;
|
|
public const int TanevNeveLength = 255;
|
|
public const int TantargyNeveLength = 255;
|
|
}
|
|
|
|
#region General
|
|
private FoglalkozasArchivDA m_DA = new FoglalkozasArchivDA();
|
|
|
|
protected static FoglalkozasArchiv FakeFoglalkozasArchiv { get; set; }
|
|
|
|
public static FoglalkozasArchiv GiveAnInstance()
|
|
{
|
|
FoglalkozasArchiv result = FakeFoglalkozasArchiv == null
|
|
? new FoglalkozasArchiv()
|
|
: (FoglalkozasArchiv)FakeFoglalkozasArchiv.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<FoglalkozasArchiv> 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<FoglalkozasArchiv> 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<FoglalkozasArchiv> LoadWithFilter(string filter, Dictionary<string, object> commandParameters = null)
|
|
{
|
|
var result = new EntityCollection<FoglalkozasArchiv>();
|
|
new FoglalkozasArchivDA().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<FoglalkozasArchiv> LoadWithFilter(string filter, ColumnFilterMode columnFilterMode, IEnumerable<string> columns, Dictionary<string, object> commandParameters = null)
|
|
{
|
|
var result = new EntityCollection<FoglalkozasArchiv>();
|
|
new FoglalkozasArchivDA().LoadWithFilter(result, filter, columnFilterMode, columns, commandParameters);
|
|
return result;
|
|
}
|
|
|
|
protected override void StoreOriginalValues()
|
|
{
|
|
base.StoreOriginalValues();
|
|
OriginalValues.Add("AlkalmazottId", (AlkalmazottId == null ? (object)DBNull.Value : (object)m_AlkalmazottId));
|
|
OriginalValues.Add("ElfogadasDatuma", (ElfogadasDatuma == null ? (object)DBNull.Value : (object)m_ElfogadasDatuma));
|
|
OriginalValues.Add("FeladatEllatasiHelyId", (FeladatEllatasiHelyId == null ? (object)DBNull.Value : (object)m_FeladatEllatasiHelyId));
|
|
OriginalValues.Add("FeladatEllatasiHelyNeve", (FeladatEllatasiHelyNeve == null ? (object)DBNull.Value : (object)m_FeladatEllatasiHelyNeve));
|
|
OriginalValues.Add("Oraszam", (Oraszam == null ? (object)DBNull.Value : (object)m_Oraszam));
|
|
OriginalValues.Add("OsztalyCsoportId", (OsztalyCsoportId == null ? (object)DBNull.Value : (object)m_OsztalyCsoportId));
|
|
OriginalValues.Add("OsztalyCsoportNeve", (OsztalyCsoportNeve == null ? (object)DBNull.Value : (object)m_OsztalyCsoportNeve));
|
|
OriginalValues.Add("TanarKotelezoOraszama", (TanarKotelezoOraszama == null ? (object)DBNull.Value : (object)m_TanarKotelezoOraszama));
|
|
OriginalValues.Add("TanarMunkaidoKedvezmenye", (TanarMunkaidoKedvezmenye == null ? (object)DBNull.Value : (object)m_TanarMunkaidoKedvezmenye));
|
|
OriginalValues.Add("TanarMunkaidoKedvezmenyOka", (TanarMunkaidoKedvezmenyOka == null ? (object)DBNull.Value : (object)m_TanarMunkaidoKedvezmenyOka));
|
|
OriginalValues.Add("TanarMunkaidoKedvezmenyOkaId", (TanarMunkaidoKedvezmenyOkaId == null ? (object)DBNull.Value : (object)m_TanarMunkaidoKedvezmenyOkaId));
|
|
OriginalValues.Add("TanarMunkakore", (TanarMunkakore == null ? (object)DBNull.Value : (object)m_TanarMunkakore));
|
|
OriginalValues.Add("TanarMunkakoreId", (TanarMunkakoreId == null ? (object)DBNull.Value : (object)m_TanarMunkakoreId));
|
|
OriginalValues.Add("TanarNeve", (TanarNeve == null ? (object)DBNull.Value : (object)m_TanarNeve));
|
|
OriginalValues.Add("TanarPedagogiaiKepesitese", (TanarPedagogiaiKepesitese == null ? (object)DBNull.Value : (object)m_TanarPedagogiaiKepesitese));
|
|
OriginalValues.Add("TanarPedagogiaiKepesiteseId", (TanarPedagogiaiKepesiteseId == null ? (object)DBNull.Value : (object)m_TanarPedagogiaiKepesiteseId));
|
|
OriginalValues.Add("TanevNeve", (TanevNeve == null ? (object)DBNull.Value : (object)m_TanevNeve));
|
|
OriginalValues.Add("TantargyId", (TantargyId == null ? (object)DBNull.Value : (object)m_TantargyId));
|
|
OriginalValues.Add("TantargyNeve", (TantargyNeve == null ? (object)DBNull.Value : (object)m_TantargyNeve));
|
|
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_FeladatEllatasiHelyNeve != null && m_FeladatEllatasiHelyNeve.Length > 255)
|
|
{
|
|
throw new InvalidEntityAttributeException("FoglalkozasArchiv", "FeladatEllatasiHelyNeve", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_OsztalyCsoportNeve != null && m_OsztalyCsoportNeve.Length > 255)
|
|
{
|
|
throw new InvalidEntityAttributeException("FoglalkozasArchiv", "OsztalyCsoportNeve", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_TanarMunkaidoKedvezmenyOka != null && m_TanarMunkaidoKedvezmenyOka.Length > 255)
|
|
{
|
|
throw new InvalidEntityAttributeException("FoglalkozasArchiv", "TanarMunkaidoKedvezmenyOka", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_TanarMunkakore != null && m_TanarMunkakore.Length > 255)
|
|
{
|
|
throw new InvalidEntityAttributeException("FoglalkozasArchiv", "TanarMunkakore", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_TanarNeve != null && m_TanarNeve.Length > 255)
|
|
{
|
|
throw new InvalidEntityAttributeException("FoglalkozasArchiv", "TanarNeve", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_TanarPedagogiaiKepesitese != null && m_TanarPedagogiaiKepesitese.Length > 255)
|
|
{
|
|
throw new InvalidEntityAttributeException("FoglalkozasArchiv", "TanarPedagogiaiKepesitese", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_TanevNeve != null && m_TanevNeve.Length > 255)
|
|
{
|
|
throw new InvalidEntityAttributeException("FoglalkozasArchiv", "TanevNeve", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_TantargyNeve != null && m_TantargyNeve.Length > 255)
|
|
{
|
|
throw new InvalidEntityAttributeException("FoglalkozasArchiv", "TantargyNeve", EntityAttributeError.TooLong);
|
|
}
|
|
|
|
}
|
|
|
|
// kötelező asszociációk ellenőrzése...
|
|
if (m_IntezmenyId == -1) { throw new InvalidEntityAttributeException("FoglalkozasArchiv", "IntezmenyId", EntityAttributeError.Empty); }
|
|
if (m_TanevId == -1) { throw new InvalidEntityAttributeException("FoglalkozasArchiv", "TanevId", EntityAttributeError.Empty); }
|
|
|
|
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Alaphelyzetbe állítás
|
|
protected override void Reset()
|
|
{
|
|
base.Reset();
|
|
|
|
// alaphelyzetbe állítjuk az egyszerű mezőket
|
|
this.m_AlkalmazottId = null;
|
|
this.m_ElfogadasDatuma = null;
|
|
this.m_FeladatEllatasiHelyId = null;
|
|
this.m_FeladatEllatasiHelyNeve = null;
|
|
this.m_Oraszam = null;
|
|
this.m_OsztalyCsoportId = null;
|
|
this.m_OsztalyCsoportNeve = null;
|
|
this.m_TanarKotelezoOraszama = null;
|
|
this.m_TanarMunkaidoKedvezmenye = null;
|
|
this.m_TanarMunkaidoKedvezmenyOka = null;
|
|
this.m_TanarMunkaidoKedvezmenyOkaId = null;
|
|
this.m_TanarMunkakore = null;
|
|
this.m_TanarMunkakoreId = null;
|
|
this.m_TanarNeve = null;
|
|
this.m_TanarPedagogiaiKepesitese = null;
|
|
this.m_TanarPedagogiaiKepesiteseId = null;
|
|
this.m_TanevNeve = null;
|
|
this.m_TantargyId = null;
|
|
this.m_TantargyNeve = null;
|
|
|
|
// alaphelyzetbe állítjuk az asszociációkból származó mezőket
|
|
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...
|
|
|
|
// 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 AlkalmazottId
|
|
|
|
protected internal int? m_AlkalmazottId;
|
|
|
|
/// <summary>
|
|
/// alkalmazott id
|
|
/// </summary>
|
|
[EntityProperty("AlkalmazottId", EntityPropertyBaseType.ValueType, typeof(int), EntityCopyMethod.ShallowCopy)]
|
|
public virtual int? AlkalmazottId
|
|
{
|
|
get
|
|
{
|
|
return m_AlkalmazottId;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_AlkalmazottId == value) return;
|
|
m_AlkalmazottId = value;
|
|
FieldModified("AlkalmazottId", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ElfogadasDatuma
|
|
|
|
protected internal DateTime? m_ElfogadasDatuma;
|
|
|
|
/// <summary>
|
|
/// elfogadás dátuma
|
|
/// </summary>
|
|
[EntityProperty("ElfogadasDatuma", EntityPropertyBaseType.ValueType, typeof(DateTime), EntityCopyMethod.ShallowCopy)]
|
|
public virtual DateTime? ElfogadasDatuma
|
|
{
|
|
get
|
|
{
|
|
return m_ElfogadasDatuma;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_ElfogadasDatuma == value) return;
|
|
m_ElfogadasDatuma = value;
|
|
FieldModified("ElfogadasDatuma", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region FeladatEllatasiHelyId
|
|
|
|
protected internal int? m_FeladatEllatasiHelyId;
|
|
|
|
/// <summary>
|
|
/// feladatellátási hely id
|
|
/// </summary>
|
|
[EntityProperty("FeladatEllatasiHelyId", EntityPropertyBaseType.ValueType, typeof(int), EntityCopyMethod.ShallowCopy)]
|
|
public virtual int? FeladatEllatasiHelyId
|
|
{
|
|
get
|
|
{
|
|
return m_FeladatEllatasiHelyId;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_FeladatEllatasiHelyId == value) return;
|
|
m_FeladatEllatasiHelyId = value;
|
|
FieldModified("FeladatEllatasiHelyId", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region FeladatEllatasiHelyNeve
|
|
|
|
protected internal string m_FeladatEllatasiHelyNeve;
|
|
|
|
/// <summary>
|
|
/// feladatellátási hely neve
|
|
/// </summary>
|
|
[EntityProperty("FeladatEllatasiHelyNeve", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string FeladatEllatasiHelyNeve
|
|
{
|
|
get
|
|
{
|
|
return m_FeladatEllatasiHelyNeve;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_FeladatEllatasiHelyNeve == value) return;
|
|
m_FeladatEllatasiHelyNeve = value;
|
|
FieldModified("FeladatEllatasiHelyNeve", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Oraszam
|
|
|
|
protected internal double? m_Oraszam;
|
|
|
|
/// <summary>
|
|
/// óraszám
|
|
/// </summary>
|
|
[EntityProperty("Oraszam", EntityPropertyBaseType.ValueType, typeof(double), EntityCopyMethod.ShallowCopy)]
|
|
public virtual double? Oraszam
|
|
{
|
|
get
|
|
{
|
|
return m_Oraszam;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_Oraszam == value) return;
|
|
m_Oraszam = value;
|
|
FieldModified("Oraszam", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region OsztalyCsoportId
|
|
|
|
protected internal int? m_OsztalyCsoportId;
|
|
|
|
/// <summary>
|
|
/// osztály/csoport id
|
|
/// </summary>
|
|
[EntityProperty("OsztalyCsoportId", EntityPropertyBaseType.ValueType, typeof(int), EntityCopyMethod.ShallowCopy)]
|
|
public virtual int? OsztalyCsoportId
|
|
{
|
|
get
|
|
{
|
|
return m_OsztalyCsoportId;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_OsztalyCsoportId == value) return;
|
|
m_OsztalyCsoportId = value;
|
|
FieldModified("OsztalyCsoportId", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region OsztalyCsoportNeve
|
|
|
|
protected internal string m_OsztalyCsoportNeve;
|
|
|
|
/// <summary>
|
|
/// osztály/csoport neve
|
|
/// </summary>
|
|
[EntityProperty("OsztalyCsoportNeve", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string OsztalyCsoportNeve
|
|
{
|
|
get
|
|
{
|
|
return m_OsztalyCsoportNeve;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_OsztalyCsoportNeve == value) return;
|
|
m_OsztalyCsoportNeve = value;
|
|
FieldModified("OsztalyCsoportNeve", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region TanarKotelezoOraszama
|
|
|
|
protected internal double? m_TanarKotelezoOraszama;
|
|
|
|
/// <summary>
|
|
/// tanár kötelezo óraszáma
|
|
/// </summary>
|
|
[EntityProperty("TanarKotelezoOraszama", EntityPropertyBaseType.ValueType, typeof(double), EntityCopyMethod.ShallowCopy)]
|
|
public virtual double? TanarKotelezoOraszama
|
|
{
|
|
get
|
|
{
|
|
return m_TanarKotelezoOraszama;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_TanarKotelezoOraszama == value) return;
|
|
m_TanarKotelezoOraszama = value;
|
|
FieldModified("TanarKotelezoOraszama", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region TanarMunkaidoKedvezmenye
|
|
|
|
protected internal int? m_TanarMunkaidoKedvezmenye;
|
|
|
|
/// <summary>
|
|
/// tanár munkaido-kedvezménye
|
|
/// </summary>
|
|
[EntityProperty("TanarMunkaidoKedvezmenye", EntityPropertyBaseType.ValueType, typeof(int), EntityCopyMethod.ShallowCopy)]
|
|
public virtual int? TanarMunkaidoKedvezmenye
|
|
{
|
|
get
|
|
{
|
|
return m_TanarMunkaidoKedvezmenye;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_TanarMunkaidoKedvezmenye == value) return;
|
|
m_TanarMunkaidoKedvezmenye = value;
|
|
FieldModified("TanarMunkaidoKedvezmenye", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region TanarMunkaidoKedvezmenyOka
|
|
|
|
protected internal string m_TanarMunkaidoKedvezmenyOka;
|
|
|
|
/// <summary>
|
|
/// tanár munkaido-kedvezmény oka
|
|
/// </summary>
|
|
[EntityProperty("TanarMunkaidoKedvezmenyOka", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string TanarMunkaidoKedvezmenyOka
|
|
{
|
|
get
|
|
{
|
|
return m_TanarMunkaidoKedvezmenyOka;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_TanarMunkaidoKedvezmenyOka == value) return;
|
|
m_TanarMunkaidoKedvezmenyOka = value;
|
|
FieldModified("TanarMunkaidoKedvezmenyOka", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region TanarMunkaidoKedvezmenyOkaId
|
|
|
|
protected internal int? m_TanarMunkaidoKedvezmenyOkaId;
|
|
|
|
/// <summary>
|
|
/// tanár munkaido-kedvezmény oka id
|
|
/// </summary>
|
|
[EntityProperty("TanarMunkaidoKedvezmenyOkaId", EntityPropertyBaseType.ValueType, typeof(int), EntityCopyMethod.ShallowCopy)]
|
|
public virtual int? TanarMunkaidoKedvezmenyOkaId
|
|
{
|
|
get
|
|
{
|
|
return m_TanarMunkaidoKedvezmenyOkaId;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_TanarMunkaidoKedvezmenyOkaId == value) return;
|
|
m_TanarMunkaidoKedvezmenyOkaId = value;
|
|
FieldModified("TanarMunkaidoKedvezmenyOkaId", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region TanarMunkakore
|
|
|
|
protected internal string m_TanarMunkakore;
|
|
|
|
/// <summary>
|
|
/// tanár munkaköre
|
|
/// </summary>
|
|
[EntityProperty("TanarMunkakore", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string TanarMunkakore
|
|
{
|
|
get
|
|
{
|
|
return m_TanarMunkakore;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_TanarMunkakore == value) return;
|
|
m_TanarMunkakore = value;
|
|
FieldModified("TanarMunkakore", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region TanarMunkakoreId
|
|
|
|
protected internal int? m_TanarMunkakoreId;
|
|
|
|
/// <summary>
|
|
/// tanár munkaköre id
|
|
/// </summary>
|
|
[EntityProperty("TanarMunkakoreId", EntityPropertyBaseType.ValueType, typeof(int), EntityCopyMethod.ShallowCopy)]
|
|
public virtual int? TanarMunkakoreId
|
|
{
|
|
get
|
|
{
|
|
return m_TanarMunkakoreId;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_TanarMunkakoreId == value) return;
|
|
m_TanarMunkakoreId = value;
|
|
FieldModified("TanarMunkakoreId", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region TanarNeve
|
|
|
|
protected internal string m_TanarNeve;
|
|
|
|
/// <summary>
|
|
/// tanár neve
|
|
/// </summary>
|
|
[EntityProperty("TanarNeve", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string TanarNeve
|
|
{
|
|
get
|
|
{
|
|
return m_TanarNeve;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_TanarNeve == value) return;
|
|
m_TanarNeve = value;
|
|
FieldModified("TanarNeve", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region TanarPedagogiaiKepesitese
|
|
|
|
protected internal string m_TanarPedagogiaiKepesitese;
|
|
|
|
/// <summary>
|
|
/// tanár pedagógiai képesítése
|
|
/// </summary>
|
|
[EntityProperty("TanarPedagogiaiKepesitese", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string TanarPedagogiaiKepesitese
|
|
{
|
|
get
|
|
{
|
|
return m_TanarPedagogiaiKepesitese;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_TanarPedagogiaiKepesitese == value) return;
|
|
m_TanarPedagogiaiKepesitese = value;
|
|
FieldModified("TanarPedagogiaiKepesitese", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region TanarPedagogiaiKepesiteseId
|
|
|
|
protected internal int? m_TanarPedagogiaiKepesiteseId;
|
|
|
|
/// <summary>
|
|
/// tanár pedagógiai képesítése id
|
|
/// </summary>
|
|
[EntityProperty("TanarPedagogiaiKepesiteseId", EntityPropertyBaseType.ValueType, typeof(int), EntityCopyMethod.ShallowCopy)]
|
|
public virtual int? TanarPedagogiaiKepesiteseId
|
|
{
|
|
get
|
|
{
|
|
return m_TanarPedagogiaiKepesiteseId;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_TanarPedagogiaiKepesiteseId == value) return;
|
|
m_TanarPedagogiaiKepesiteseId = value;
|
|
FieldModified("TanarPedagogiaiKepesiteseId", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region TanevNeve
|
|
|
|
protected internal string m_TanevNeve;
|
|
|
|
/// <summary>
|
|
/// tanév neve
|
|
/// </summary>
|
|
[EntityProperty("TanevNeve", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string TanevNeve
|
|
{
|
|
get
|
|
{
|
|
return m_TanevNeve;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_TanevNeve == value) return;
|
|
m_TanevNeve = value;
|
|
FieldModified("TanevNeve", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region TantargyId
|
|
|
|
protected internal int? m_TantargyId;
|
|
|
|
/// <summary>
|
|
/// tantárgy id
|
|
/// </summary>
|
|
[EntityProperty("TantargyId", EntityPropertyBaseType.ValueType, typeof(int), EntityCopyMethod.ShallowCopy)]
|
|
public virtual int? TantargyId
|
|
{
|
|
get
|
|
{
|
|
return m_TantargyId;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_TantargyId == value) return;
|
|
m_TantargyId = value;
|
|
FieldModified("TantargyId", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region TantargyNeve
|
|
|
|
protected internal string m_TantargyNeve;
|
|
|
|
/// <summary>
|
|
/// tantárgy neve
|
|
/// </summary>
|
|
[EntityProperty("TantargyNeve", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string TantargyNeve
|
|
{
|
|
get
|
|
{
|
|
return m_TantargyNeve;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_TantargyNeve == value) return;
|
|
m_TantargyNeve = value;
|
|
FieldModified("TantargyNeve", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region Asszociációkkal kapcsolatos dolgok
|
|
|
|
#region FoglalkozasArchiv (*) -> 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 IFoglalkozasArchiv.Intezmeny
|
|
{
|
|
get { return Intezmeny; }
|
|
set { Intezmeny = value as Intezmeny; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Az UML modellben szereplő FoglalkozasArchiv é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_FoglalkozasArchiv_DA da = new Intezmeny_FoglalkozasArchiv_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 FoglalkozasArchiv (*) -> 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 IFoglalkozasArchiv.Tanev
|
|
{
|
|
get { return Tanev; }
|
|
set { Tanev = value as Tanev; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Az UML modellben szereplő FoglalkozasArchiv é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_FoglalkozasArchiv_DA da = new Tanev_FoglalkozasArchiv_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
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
}
|
|
}
|
|
|