776 lines
26 KiB
C#
776 lines
26 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 DashboardUzenet 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("DashboardUzenet")]
|
|
// alapértelmezett EntityHistoryMode
|
|
public class DashboardUzenet : Entity, IDashboardUzenet
|
|
{
|
|
internal protected DashboardUzenet()
|
|
: base()
|
|
{
|
|
}
|
|
|
|
public class AttributeInfo
|
|
{
|
|
public const string Cim = "Cim";
|
|
public const string EgyediAzonosito = "EgyediAzonosito";
|
|
public const string ErvenyessegKezdete = "ErvenyessegKezdete";
|
|
public const string ErvenyessegVege = "ErvenyessegVege";
|
|
public const string KiemeltIdoszakVege = "KiemeltIdoszakVege";
|
|
public const string Sorrend = "Sorrend";
|
|
public const string Tartalom = "Tartalom";
|
|
public const string IsPopup = "IsPopup";
|
|
public const string PopupGyakorisagaPercben = "PopupGyakorisagaPercben";
|
|
public const string IsAdmin = "IsAdmin";
|
|
public const string IsTanar = "IsTanar";
|
|
public const string IsIntezmenyi = "IsIntezmenyi";
|
|
public const string IsFelhasznaloi = "IsFelhasznaloi";
|
|
}
|
|
|
|
public class AttributeLengthInfo
|
|
{
|
|
public const int CimLength = 255;
|
|
public const int EgyediAzonositoLength = 50;
|
|
public const int TartalomLength = 2147483647;
|
|
}
|
|
|
|
#region General
|
|
private DashboardUzenetDA m_DA = new DashboardUzenetDA();
|
|
|
|
protected static DashboardUzenet FakeDashboardUzenet { get; set; }
|
|
|
|
public static DashboardUzenet GiveAnInstance()
|
|
{
|
|
DashboardUzenet result = FakeDashboardUzenet == null
|
|
? new DashboardUzenet()
|
|
: (DashboardUzenet)FakeDashboardUzenet.MemberwiseClone();
|
|
result.Reset();
|
|
result.SetDefaultData();
|
|
|
|
return result;
|
|
}
|
|
|
|
protected void SetDefaultData()
|
|
{
|
|
}
|
|
|
|
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<DashboardUzenet> 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<DashboardUzenet> 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<DashboardUzenet> LoadWithFilter(string filter, Dictionary<string, object> commandParameters = null)
|
|
{
|
|
var result = new EntityCollection<DashboardUzenet>();
|
|
new DashboardUzenetDA().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<DashboardUzenet> LoadWithFilter(string filter, ColumnFilterMode columnFilterMode, IEnumerable<string> columns, Dictionary<string, object> commandParameters = null)
|
|
{
|
|
var result = new EntityCollection<DashboardUzenet>();
|
|
new DashboardUzenetDA().LoadWithFilter(result, filter, columnFilterMode, columns, commandParameters);
|
|
return result;
|
|
}
|
|
|
|
protected override void StoreOriginalValues()
|
|
{
|
|
base.StoreOriginalValues();
|
|
OriginalValues.Add("Cim", (object)m_Cim);
|
|
OriginalValues.Add("EgyediAzonosito", (object)m_EgyediAzonosito);
|
|
OriginalValues.Add("ErvenyessegKezdete", (ErvenyessegKezdete == null ? (object)DBNull.Value : (object)m_ErvenyessegKezdete));
|
|
OriginalValues.Add("ErvenyessegVege", (ErvenyessegVege == null ? (object)DBNull.Value : (object)m_ErvenyessegVege));
|
|
OriginalValues.Add("KiemeltIdoszakVege", (KiemeltIdoszakVege == null ? (object)DBNull.Value : (object)m_KiemeltIdoszakVege));
|
|
OriginalValues.Add("Sorrend", (object)m_Sorrend);
|
|
OriginalValues.Add("Tartalom", (Tartalom == null ? (object)DBNull.Value : (object)m_Tartalom));
|
|
OriginalValues.Add("IsPopup", (object)m_IsPopup);
|
|
OriginalValues.Add("PopupGyakorisagaPercben", (PopupGyakorisagaPercben == null ? (object)DBNull.Value : (object)m_PopupGyakorisagaPercben));
|
|
OriginalValues.Add("IsAdmin", (object)m_IsAdmin);
|
|
OriginalValues.Add("IsTanar", (object)m_IsTanar);
|
|
OriginalValues.Add("IsIntezmenyi", (object)m_IsIntezmenyi);
|
|
OriginalValues.Add("IsFelhasznaloi", (object)m_IsFelhasznaloi);
|
|
OriginalValues.Add("DashboardUzenetKategoriaId", (m_DashboardUzenetKategoriaId < 0 ? (object)DBNull.Value : (object)m_DashboardUzenetKategoriaId));
|
|
}
|
|
|
|
#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_Cim != null && m_Cim.Length > 255)
|
|
{
|
|
throw new InvalidEntityAttributeException("DashboardUzenet", "Cim", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_EgyediAzonosito != null && m_EgyediAzonosito.Length > 50)
|
|
{
|
|
throw new InvalidEntityAttributeException("DashboardUzenet", "EgyediAzonosito", EntityAttributeError.TooLong);
|
|
}
|
|
if (m_Tartalom != null && m_Tartalom.Length > 2147483647)
|
|
{
|
|
throw new InvalidEntityAttributeException("DashboardUzenet", "Tartalom", EntityAttributeError.TooLong);
|
|
}
|
|
}
|
|
|
|
// kötelező asszociációk ellenőrzése...
|
|
if (m_DashboardUzenetKategoriaId == -1) { throw new InvalidEntityAttributeException("DashboardUzenet", "DashboardUzenetKategoriaId", EntityAttributeError.Empty); }
|
|
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Alaphelyzetbe állítás
|
|
protected override void Reset()
|
|
{
|
|
base.Reset();
|
|
|
|
// alaphelyzetbe állítjuk az egyszerű mezőket
|
|
this.m_Cim = "";
|
|
this.m_EgyediAzonosito = "";
|
|
this.m_ErvenyessegKezdete = null;
|
|
this.m_ErvenyessegVege = null;
|
|
this.m_KiemeltIdoszakVege = null;
|
|
this.m_Sorrend = -1;
|
|
this.m_Tartalom = null;
|
|
this.m_IsPopup = false;
|
|
this.m_PopupGyakorisagaPercben = null;
|
|
this.m_IsAdmin = false;
|
|
this.m_IsTanar = false;
|
|
this.m_IsIntezmenyi = false;
|
|
this.m_IsFelhasznaloi = false;
|
|
|
|
// alaphelyzetbe állítjuk az asszociációkból származó mezőket
|
|
this.m_DashboardUzenetKategoriaId = -1;
|
|
this.m_DashboardUzenetKategoria = null; // Entity
|
|
this.m_DashboardUzenetFelhasznalo = null; // EntityCollection
|
|
this.m_DashboardUzenetIntezmeny = null; // EntityCollection
|
|
}
|
|
|
|
#endregion
|
|
|
|
protected override void DeAssociateBeforeDelete(bool runHandler = false)
|
|
{
|
|
// Nem kaszkád törölhető asszociációk ellenőrzése, hogy üresek-e...
|
|
|
|
// DashboardUzenetKategoria esetében mi mutatunk a másikra: startrole: *, endrole: 1
|
|
if (this.DashboardUzenetFelhasznalo.Count > 0)
|
|
{
|
|
throw new EntityDeleteFailedException("DashboardUzenet", "DashboardUzenetFelhasznalo", EntityUtil.GetAssociationDescription("T_DASHBOARDUZENETFELHASZNALO_OSSZES", "C_DASHBOARDUZENETID")); // nincs kapcsolotabla
|
|
}
|
|
if (this.DashboardUzenetIntezmeny.Count > 0)
|
|
{
|
|
throw new EntityDeleteFailedException("DashboardUzenet", "DashboardUzenetIntezmeny", EntityUtil.GetAssociationDescription("T_DASHBOARDUZENETINTEZMENY_OSSZES", "C_DASHBOARDUZENETID")); // nincs kapcsolotabla
|
|
}
|
|
|
|
// kaszkád törlések...
|
|
|
|
}
|
|
|
|
#region Mezők és tulajdonságok
|
|
|
|
#region Egyszerű mezők
|
|
|
|
#region Cim
|
|
|
|
protected internal string m_Cim;
|
|
|
|
/// <summary>
|
|
/// a Dashboard üzenet cím mezoje
|
|
/// </summary>
|
|
[EntityProperty("Cim", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string Cim
|
|
{
|
|
get
|
|
{
|
|
return m_Cim;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_Cim == value) return;
|
|
m_Cim = value;
|
|
FieldModified("Cim", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region EgyediAzonosito
|
|
|
|
protected internal string m_EgyediAzonosito;
|
|
|
|
/// <summary>
|
|
/// kódbeli validációk regisztrálására szolgál
|
|
/// </summary>
|
|
[EntityProperty("EgyediAzonosito", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string EgyediAzonosito
|
|
{
|
|
get
|
|
{
|
|
return m_EgyediAzonosito;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_EgyediAzonosito == value) return;
|
|
m_EgyediAzonosito = value;
|
|
FieldModified("EgyediAzonosito", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ErvenyessegKezdete
|
|
|
|
protected internal DateTime? m_ErvenyessegKezdete;
|
|
|
|
/// <summary>
|
|
/// a Dashboard üzenet ettol az idoponttól látható, ha NULL akkor a kezdetektol
|
|
/// </summary>
|
|
[EntityProperty("ErvenyessegKezdete", EntityPropertyBaseType.ValueType, typeof(DateTime), EntityCopyMethod.ShallowCopy)]
|
|
public virtual DateTime? ErvenyessegKezdete
|
|
{
|
|
get
|
|
{
|
|
return m_ErvenyessegKezdete;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_ErvenyessegKezdete == value) return;
|
|
m_ErvenyessegKezdete = value;
|
|
FieldModified("ErvenyessegKezdete", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region ErvenyessegVege
|
|
|
|
protected internal DateTime? m_ErvenyessegVege;
|
|
|
|
/// <summary>
|
|
/// a Dashboard üzenet eddig az idopontig lesz látható
|
|
/// </summary>
|
|
[EntityProperty("ErvenyessegVege", EntityPropertyBaseType.ValueType, typeof(DateTime), EntityCopyMethod.ShallowCopy)]
|
|
public virtual DateTime? ErvenyessegVege
|
|
{
|
|
get
|
|
{
|
|
return m_ErvenyessegVege;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_ErvenyessegVege == value) return;
|
|
m_ErvenyessegVege = value;
|
|
FieldModified("ErvenyessegVege", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region KiemeltIdoszakVege
|
|
|
|
protected internal DateTime? m_KiemeltIdoszakVege;
|
|
|
|
/// <summary>
|
|
/// az üzenet eddig az idopontig kiemelten az elso helyen fog szerepelni, ezt követoen a sorrendje helyén
|
|
/// </summary>
|
|
[EntityProperty("KiemeltIdoszakVege", EntityPropertyBaseType.ValueType, typeof(DateTime), EntityCopyMethod.ShallowCopy)]
|
|
public virtual DateTime? KiemeltIdoszakVege
|
|
{
|
|
get
|
|
{
|
|
return m_KiemeltIdoszakVege;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_KiemeltIdoszakVege == value) return;
|
|
m_KiemeltIdoszakVege = value;
|
|
FieldModified("KiemeltIdoszakVege", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Sorrend
|
|
|
|
protected internal int m_Sorrend;
|
|
|
|
/// <summary>
|
|
/// a Dashboard üzenet sorrendje, hogy kb. hányadikként jelenjen meg a felületen
|
|
/// </summary>
|
|
[EntityProperty("Sorrend", EntityPropertyBaseType.ValueType, typeof(int), EntityCopyMethod.ShallowCopy)]
|
|
public virtual int Sorrend
|
|
{
|
|
get
|
|
{
|
|
return m_Sorrend;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_Sorrend == value) return;
|
|
m_Sorrend = value;
|
|
FieldModified("Sorrend", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Tartalom
|
|
|
|
protected internal string m_Tartalom;
|
|
|
|
/// <summary>
|
|
/// a Dashboard üzenet tartalma
|
|
/// </summary>
|
|
[EntityProperty("Tartalom", EntityPropertyBaseType.ValueType, typeof(string), EntityCopyMethod.ShallowCopy)]
|
|
public virtual string Tartalom
|
|
{
|
|
get
|
|
{
|
|
return m_Tartalom;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_Tartalom == value) return;
|
|
m_Tartalom = value;
|
|
FieldModified("Tartalom", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IsPopup
|
|
|
|
protected internal bool m_IsPopup;
|
|
|
|
/// <summary>
|
|
/// Popup-ban jelenjen meg?
|
|
/// </summary>
|
|
[EntityProperty("IsPopup", EntityPropertyBaseType.ValueType, typeof(bool), EntityCopyMethod.ShallowCopy)]
|
|
public virtual bool IsPopup
|
|
{
|
|
get
|
|
{
|
|
return m_IsPopup;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_IsPopup == value) return;
|
|
m_IsPopup = value;
|
|
FieldModified("IsPopup", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region PopupGyakorisagaPercben
|
|
|
|
protected internal int? m_PopupGyakorisagaPercben;
|
|
|
|
/// <summary>
|
|
/// Popup megjelenésének gyakorisága percben
|
|
/// </summary>
|
|
[EntityProperty("PopupGyakorisagaPercben", EntityPropertyBaseType.ValueType, typeof(int), EntityCopyMethod.ShallowCopy)]
|
|
public virtual int? PopupGyakorisagaPercben
|
|
{
|
|
get
|
|
{
|
|
return m_PopupGyakorisagaPercben;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_PopupGyakorisagaPercben == value) return;
|
|
m_PopupGyakorisagaPercben = value;
|
|
FieldModified("PopupGyakorisagaPercben", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IsAdmin
|
|
|
|
protected internal bool m_IsAdmin;
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
[EntityProperty("IsAdmin", EntityPropertyBaseType.ValueType, typeof(bool), EntityCopyMethod.ShallowCopy)]
|
|
public virtual bool IsAdmin
|
|
{
|
|
get
|
|
{
|
|
return m_IsAdmin;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_IsAdmin == value) return;
|
|
m_IsAdmin = value;
|
|
FieldModified("IsAdmin", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IsTanar
|
|
|
|
protected internal bool m_IsTanar;
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
[EntityProperty("IsTanar", EntityPropertyBaseType.ValueType, typeof(bool), EntityCopyMethod.ShallowCopy)]
|
|
public virtual bool IsTanar
|
|
{
|
|
get
|
|
{
|
|
return m_IsTanar;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_IsTanar == value) return;
|
|
m_IsTanar = value;
|
|
FieldModified("IsTanar", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IsIntezmenyi
|
|
|
|
protected internal bool m_IsIntezmenyi;
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
[EntityProperty("IsIntezmenyi", EntityPropertyBaseType.ValueType, typeof(bool), EntityCopyMethod.ShallowCopy)]
|
|
public virtual bool IsIntezmenyi
|
|
{
|
|
get
|
|
{
|
|
return m_IsIntezmenyi;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_IsIntezmenyi == value) return;
|
|
m_IsIntezmenyi = value;
|
|
FieldModified("IsIntezmenyi", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region IsFelhasznaloi
|
|
|
|
protected internal bool m_IsFelhasznaloi;
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
[EntityProperty("IsFelhasznaloi", EntityPropertyBaseType.ValueType, typeof(bool), EntityCopyMethod.ShallowCopy)]
|
|
public virtual bool IsFelhasznaloi
|
|
{
|
|
get
|
|
{
|
|
return m_IsFelhasznaloi;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
|
|
if (m_IsFelhasznaloi == value) return;
|
|
m_IsFelhasznaloi = value;
|
|
FieldModified("IsFelhasznaloi", value);
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
|
|
#region Asszociációkkal kapcsolatos dolgok
|
|
|
|
protected internal virtual bool LoadByDashboardUzenetFelhasznaloId(int id)
|
|
{
|
|
return m_DA.LoadByDashboardUzenetFelhasznaloId(id, this);
|
|
}
|
|
|
|
protected internal virtual bool LoadByDashboardUzenetIntezmenyId(int id)
|
|
{
|
|
return m_DA.LoadByDashboardUzenetIntezmenyId(id, this);
|
|
}
|
|
|
|
#region DashboardUzenet (*) -> DashboardUzenetKategoria (1)
|
|
|
|
protected internal int m_DashboardUzenetKategoriaId = -1;
|
|
|
|
/// <summary>
|
|
/// A(z) DashboardUzenetKategoria 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 DashboardUzenetKategoriaId
|
|
{
|
|
get
|
|
{
|
|
return InternalDashboardUzenetKategoriaId;
|
|
}
|
|
set
|
|
{
|
|
InternalDashboardUzenetKategoriaId = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Ez egy külön bejárat a DA számára
|
|
/// <summary>
|
|
internal int InternalDashboardUzenetKategoriaId
|
|
{
|
|
get
|
|
{
|
|
if (m_DashboardUzenetKategoria != null)
|
|
{
|
|
return m_DashboardUzenetKategoria.ID;
|
|
}
|
|
else
|
|
{
|
|
return m_DashboardUzenetKategoriaId;// XXX az meg nem teljesen OK
|
|
}
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
if (m_DashboardUzenetKategoriaId != value)
|
|
{
|
|
m_DashboardUzenetKategoriaId = value;
|
|
m_DashboardUzenetKategoria = null;
|
|
FieldModified("DashboardUzenetKategoriaId", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Ez egy külön bejárat a DA számára
|
|
/// <summary>
|
|
internal void ModifyDashboardUzenetKategoria(DashboardUzenetKategoria value)
|
|
{
|
|
m_DashboardUzenetKategoriaId = value != null ? value.ID : -1;
|
|
m_DashboardUzenetKategoria = value;
|
|
FieldModified("DashboardUzenetKategoriaId", value != null ? (object)value.ID : DBNull.Value);
|
|
}
|
|
|
|
protected internal void SetDashboardUzenetKategoria(DashboardUzenetKategoria value)
|
|
{
|
|
m_DashboardUzenetKategoria = value;
|
|
if (value != null)
|
|
{
|
|
m_DashboardUzenetKategoriaId = value.ID;
|
|
}
|
|
else
|
|
{
|
|
m_DashboardUzenetKategoriaId = -1;
|
|
}
|
|
}
|
|
|
|
protected DashboardUzenetKategoria m_DashboardUzenetKategoria = null;
|
|
|
|
IDashboardUzenetKategoria IDashboardUzenet.DashboardUzenetKategoria
|
|
{
|
|
get { return DashboardUzenetKategoria; }
|
|
set { DashboardUzenetKategoria = value as DashboardUzenetKategoria; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// meghatározza a dashboard üzenet fontosságát
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Az UML modellben szereplő DashboardUzenet és DashboardUzenetKategoria entitások közötti asszociáció megvalósítása.
|
|
/// </remarks>
|
|
[EntityProperty("DashboardUzenetKategoria", EntityPropertyBaseType.Entity, typeof(DashboardUzenetKategoria), EntityCopyMethod.ShallowCopy)]
|
|
public virtual DashboardUzenetKategoria DashboardUzenetKategoria
|
|
{
|
|
get
|
|
{
|
|
if ((m_DashboardUzenetKategoria == null) && (m_DashboardUzenetKategoriaId != -1))
|
|
{
|
|
SDA.Kreta.Entities.DashboardUzenetKategoria partner = SDA.Kreta.Entities.DashboardUzenetKategoria.GiveAnInstance();
|
|
partner.LoadByID(m_DashboardUzenetKategoriaId);
|
|
|
|
this.SetDashboardUzenetKategoria(partner);
|
|
}
|
|
// természetesen null-t adunk vissza, ha nem tudtunk felhozni semmit
|
|
return m_DashboardUzenetKategoria;
|
|
}
|
|
set
|
|
{
|
|
CheckModifyable();
|
|
if (value != null)
|
|
{
|
|
if ((m_DashboardUzenetKategoria == null) || (value.ID != m_DashboardUzenetKategoria.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.DashboardUzenetKategoria_DashboardUzenet_DA da = new DashboardUzenetKategoria_DashboardUzenet_DA(value);
|
|
da.AddItem(this);
|
|
this.SetDashboardUzenetKategoria(value);
|
|
}
|
|
else
|
|
{
|
|
this.SetDashboardUzenetKategoria(value);
|
|
}
|
|
FieldModified("DashboardUzenetKategoriaId", value.ID);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
// ki kell törölni a kapcsolatot az adatbázisban
|
|
this.SetDashboardUzenetKategoria(null);
|
|
UpdateAssociations();
|
|
FieldModified("DashboardUzenetKategoriaId", DBNull.Value);
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region DashboardUzenet (1) -> DashboardUzenetFelhasznalo (*)
|
|
protected IAssociatedEntityCollection<DashboardUzenetFelhasznalo> m_DashboardUzenetFelhasznalo = null;
|
|
|
|
IReadOnlyList<IDashboardUzenetFelhasznalo> IDashboardUzenet.DashboardUzenetFelhasznalo => DashboardUzenetFelhasznalo.Cast<IDashboardUzenetFelhasznalo>().ToList();
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Az UML modellben szereplő DashboardUzenet és DashboardUzenetFelhasznalo entitások közötti asszociáció megvalósítása.
|
|
/// </remarks>
|
|
[EntityProperty("DashboardUzenetFelhasznalo", EntityPropertyBaseType.EntityCollection, typeof(IAssociatedEntityCollection<DashboardUzenetFelhasznalo>), EntityCopyMethod.DeepCopy, "DashboardUzenetId")]
|
|
public virtual IAssociatedEntityCollection<DashboardUzenetFelhasznalo> DashboardUzenetFelhasznalo
|
|
{
|
|
get
|
|
{
|
|
if (m_DashboardUzenetFelhasznalo == null)
|
|
{
|
|
m_DashboardUzenetFelhasznalo = new AssociatedEntityCollection<DashboardUzenet, DashboardUzenetFelhasznalo>(
|
|
new DashboardUzenet_DashboardUzenetFelhasznalo_DA(this)
|
|
);
|
|
m_DashboardUzenetFelhasznalo.Load();
|
|
}
|
|
return m_DashboardUzenetFelhasznalo;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region DashboardUzenet (1) -> DashboardUzenetIntezmeny (*)
|
|
protected IAssociatedEntityCollection<DashboardUzenetIntezmeny> m_DashboardUzenetIntezmeny = null;
|
|
|
|
IReadOnlyList<IDashboardUzenetIntezmeny> IDashboardUzenet.DashboardUzenetIntezmeny => DashboardUzenetIntezmeny.Cast<IDashboardUzenetIntezmeny>().ToList();
|
|
|
|
/// <summary>
|
|
/// Nincs definiálva megjegyzés.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Az UML modellben szereplő DashboardUzenet és DashboardUzenetIntezmeny entitások közötti asszociáció megvalósítása.
|
|
/// </remarks>
|
|
[EntityProperty("DashboardUzenetIntezmeny", EntityPropertyBaseType.EntityCollection, typeof(IAssociatedEntityCollection<DashboardUzenetIntezmeny>), EntityCopyMethod.DeepCopy, "DashboardUzenetId")]
|
|
public virtual IAssociatedEntityCollection<DashboardUzenetIntezmeny> DashboardUzenetIntezmeny
|
|
{
|
|
get
|
|
{
|
|
if (m_DashboardUzenetIntezmeny == null)
|
|
{
|
|
m_DashboardUzenetIntezmeny = new AssociatedEntityCollection<DashboardUzenet, DashboardUzenetIntezmeny>(
|
|
new DashboardUzenet_DashboardUzenetIntezmeny_DA(this)
|
|
);
|
|
m_DashboardUzenetIntezmeny.Load();
|
|
}
|
|
return m_DashboardUzenetIntezmeny;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
#endregion
|
|
|
|
#endregion
|
|
}
|
|
}
|
|
|