1324 lines
62 KiB
C#
1324 lines
62 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using Kreta.Framework;
|
|
using Kreta.Framework.Collections;
|
|
using Kreta.Framework.Collections.Generic;
|
|
using Kreta.Framework.Entities;
|
|
using Kreta.Framework.Entities.Associations;
|
|
using Kreta.Framework.Entities.Generic;
|
|
|
|
namespace SDA.Kreta.Entities
|
|
{
|
|
internal sealed class IntezmenyEszkozAdatszolgaltatasDBHelper : EntityDBHelper<IntezmenyEszkozAdatszolgaltatas>
|
|
{
|
|
private Dictionary<string, string> dynamicColumns = new Dictionary<string, string>()
|
|
{
|
|
{ "AlapszintuAMAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_ALAPSZINTUAMAKTUALIS" },
|
|
{ "AlapszintuAMIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_ALAPSZINTUAMIGENY" },
|
|
{ "BillentyuzetAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_BILLENTYUZETAKTUALIS" },
|
|
{ "BillentyuzetIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_BILLENTYUZETIGENY" },
|
|
{ "EgerAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_EGERAKTUALIS" },
|
|
{ "EgerIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_EGERIGENY" },
|
|
{ "EgyebSzoftverAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_EGYEBSZOFTVERAKTUALIS" },
|
|
{ "EgyebSzoftverIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_EGYEBSZOFTVERIGENY" },
|
|
{ "EgyebSzoftverLeiras", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_EGYEBSZOFTVERLEIRAS" },
|
|
{ "FFENAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_FFENAKTUALIS" },
|
|
{ "FFENIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_FFENIGENY" },
|
|
{ "FFTNAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_FFTNAKTUALIS" },
|
|
{ "FFTNIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_FFTNIGENY" },
|
|
{ "InteraktivTablaAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_INTERAKTIVTABLAAKTUALIS" },
|
|
{ "InteraktivTablaIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_INTERAKTIVTABLAIGENY" },
|
|
{ "IrodaiSzoftverAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_IRODAISZOFTVERAKTUALIS" },
|
|
{ "IrodaiSzoftverIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_IRODAISZOFTVERIGENY" },
|
|
{ "NotebookAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_NOTEBOOKAKTUALIS" },
|
|
{ "NotebookIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_NOTEBOOKIGENY" },
|
|
{ "ProfMAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_PROFMAKTUALIS" },
|
|
{ "ProfMIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_PROFMIGENY" },
|
|
{ "ProjektorAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_PROJEKTORAKTUALIS" },
|
|
{ "ProjektorIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_PROJEKTORIGENY" },
|
|
{ "ScannerAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_SCANNERAKTUALIS" },
|
|
{ "ScannerIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_SCANNERIGENY" },
|
|
{ "SzinesENAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_SZINESENAKTUALIS" },
|
|
{ "SzinesENIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_SZINESENIGENY" },
|
|
{ "SzinesTNAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_SZINESTNAKTUALIS" },
|
|
{ "SzinesTNIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_SZINESTNIGENY" },
|
|
{ "TabletAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_TABLETAKTUALIS" },
|
|
{ "TabletIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_TABLETIGENY" },
|
|
{ "Tervezett3D", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_TERVEZETT3D" },
|
|
{ "TervezettLego", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_TERVEZETTLEGO" },
|
|
{ "VekonykliensAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_VEKONYKLIENSAKTUALIS" },
|
|
{ "VekonykliensIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_VEKONYKLIENSIGENY" },
|
|
{ "VirusvedelmiAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_VIRUSVEDELMIAKTUALIS" },
|
|
{ "VirusvedelmiIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_VIRUSVEDELMIIGENY" },
|
|
{ "VizualisOMAktualis", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_VIZUALISOMAKTUALIS" },
|
|
{ "VizualisOMIgeny", "T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_VIZUALISOMIGENY" },
|
|
};
|
|
|
|
private const string dynamicQueryCommandText =
|
|
"select " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.ID, " +
|
|
"{COLUMNS}" +
|
|
// IntezmenyEszkozAdatszolgaltatas betöltése
|
|
// IntezmenyEszkozAdatszolgaltatas kapcsoló mezői
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_INTEZMENYID, " + /* Kötelező asszociációs kapcsolómező */
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_TANEVID, " + /* Kötelező asszociációs kapcsolómező */
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.TOROLT, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.SERIAL, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.CREATED, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.CREATOR, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.LASTCHANGED, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.MODIFIER " +
|
|
"from " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES " +
|
|
"where " +
|
|
"(1 = 1) ";
|
|
|
|
private const string emptyQueryCommandText =
|
|
"select " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.ID, " +
|
|
// IntezmenyEszkozAdatszolgaltatas betöltése
|
|
// IntezmenyEszkozAdatszolgaltatas mezői
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_ALAPSZINTUAMAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_ALAPSZINTUAMIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_BILLENTYUZETAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_BILLENTYUZETIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_EGERAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_EGERIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_EGYEBSZOFTVERAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_EGYEBSZOFTVERIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_EGYEBSZOFTVERLEIRAS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_FFENAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_FFENIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_FFTNAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_FFTNIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_INTERAKTIVTABLAAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_INTERAKTIVTABLAIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_IRODAISZOFTVERAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_IRODAISZOFTVERIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_NOTEBOOKAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_NOTEBOOKIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_PROFMAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_PROFMIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_PROJEKTORAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_PROJEKTORIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_SCANNERAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_SCANNERIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_SZINESENAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_SZINESENIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_SZINESTNAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_SZINESTNIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_TABLETAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_TABLETIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_TERVEZETT3D, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_TERVEZETTLEGO, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_VEKONYKLIENSAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_VEKONYKLIENSIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_VIRUSVEDELMIAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_VIRUSVEDELMIIGENY, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_VIZUALISOMAKTUALIS, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_VIZUALISOMIGENY, " +
|
|
// IntezmenyEszkozAdatszolgaltatas kapcsoló mezői
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_INTEZMENYID, " + /* Kötelező asszociációs kapcsolómező */
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_TANEVID, " + /* Kötelező asszociációs kapcsolómező */
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.TOROLT, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.SERIAL, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.CREATED, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.CREATOR, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.LASTCHANGED, " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.MODIFIER " +
|
|
"from " +
|
|
"T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES " +
|
|
"where " +
|
|
"(1 = 1) ";
|
|
|
|
public override string EmptyQueryCommandText
|
|
{
|
|
get
|
|
{
|
|
return emptyQueryCommandText;
|
|
}
|
|
}
|
|
|
|
public override string DynamicQueryCommandText
|
|
{
|
|
get
|
|
{
|
|
return dynamicQueryCommandText;
|
|
}
|
|
}
|
|
|
|
public override IDictionary<string, string> DynamicColumns
|
|
{
|
|
get
|
|
{
|
|
return dynamicColumns;
|
|
}
|
|
}
|
|
|
|
protected override IntezmenyEszkozAdatszolgaltatas CreateEntityInstance()
|
|
{
|
|
return IntezmenyEszkozAdatszolgaltatas.GiveAnInstance();
|
|
}
|
|
|
|
#region Lekérdezés
|
|
|
|
public override void LoadEntityFields(IntezmenyEszkozAdatszolgaltatas entity, SDA.DataProvider.SDADataReader reader)
|
|
{
|
|
// IntezmenyEszkozAdatszolgaltatas betöltése
|
|
// IntezmenyEszkozAdatszolgaltatas mezői
|
|
|
|
entity.m_AlapszintuAMAktualis = DAUtil.ReadIntegerAttribute(reader, 1);
|
|
|
|
|
|
entity.m_AlapszintuAMIgeny = DAUtil.ReadIntegerAttribute(reader, 2);
|
|
|
|
|
|
entity.m_BillentyuzetAktualis = DAUtil.ReadIntegerAttribute(reader, 3);
|
|
|
|
|
|
entity.m_BillentyuzetIgeny = DAUtil.ReadIntegerAttribute(reader, 4);
|
|
|
|
|
|
entity.m_EgerAktualis = DAUtil.ReadIntegerAttribute(reader, 5);
|
|
|
|
|
|
entity.m_EgerIgeny = DAUtil.ReadIntegerAttribute(reader, 6);
|
|
|
|
|
|
entity.m_EgyebSzoftverAktualis = DAUtil.ReadIntegerAttribute(reader, 7);
|
|
|
|
|
|
entity.m_EgyebSzoftverIgeny = DAUtil.ReadIntegerAttribute(reader, 8);
|
|
|
|
|
|
entity.m_EgyebSzoftverLeiras = DAUtil.ReadStringAttribute(reader, 9);
|
|
|
|
|
|
entity.m_FFENAktualis = DAUtil.ReadIntegerAttribute(reader, 10);
|
|
|
|
|
|
entity.m_FFENIgeny = DAUtil.ReadIntegerAttribute(reader, 11);
|
|
|
|
|
|
entity.m_FFTNAktualis = DAUtil.ReadIntegerAttribute(reader, 12);
|
|
|
|
|
|
entity.m_FFTNIgeny = DAUtil.ReadIntegerAttribute(reader, 13);
|
|
|
|
|
|
entity.m_InteraktivTablaAktualis = DAUtil.ReadIntegerAttribute(reader, 14);
|
|
|
|
|
|
entity.m_InteraktivTablaIgeny = DAUtil.ReadIntegerAttribute(reader, 15);
|
|
|
|
|
|
entity.m_IrodaiSzoftverAktualis = DAUtil.ReadIntegerAttribute(reader, 16);
|
|
|
|
|
|
entity.m_IrodaiSzoftverIgeny = DAUtil.ReadIntegerAttribute(reader, 17);
|
|
|
|
|
|
entity.m_NotebookAktualis = DAUtil.ReadIntegerAttribute(reader, 18);
|
|
|
|
|
|
entity.m_NotebookIgeny = DAUtil.ReadIntegerAttribute(reader, 19);
|
|
|
|
|
|
entity.m_ProfMAktualis = DAUtil.ReadIntegerAttribute(reader, 20);
|
|
|
|
|
|
entity.m_ProfMIgeny = DAUtil.ReadIntegerAttribute(reader, 21);
|
|
|
|
|
|
entity.m_ProjektorAktualis = DAUtil.ReadIntegerAttribute(reader, 22);
|
|
|
|
|
|
entity.m_ProjektorIgeny = DAUtil.ReadIntegerAttribute(reader, 23);
|
|
|
|
|
|
entity.m_ScannerAktualis = DAUtil.ReadIntegerAttribute(reader, 24);
|
|
|
|
|
|
entity.m_ScannerIgeny = DAUtil.ReadIntegerAttribute(reader, 25);
|
|
|
|
|
|
entity.m_SzinesENAktualis = DAUtil.ReadIntegerAttribute(reader, 26);
|
|
|
|
|
|
entity.m_SzinesENIgeny = DAUtil.ReadIntegerAttribute(reader, 27);
|
|
|
|
|
|
entity.m_SzinesTNAktualis = DAUtil.ReadIntegerAttribute(reader, 28);
|
|
|
|
|
|
entity.m_SzinesTNIgeny = DAUtil.ReadIntegerAttribute(reader, 29);
|
|
|
|
|
|
entity.m_TabletAktualis = DAUtil.ReadIntegerAttribute(reader, 30);
|
|
|
|
|
|
entity.m_TabletIgeny = DAUtil.ReadIntegerAttribute(reader, 31);
|
|
|
|
|
|
entity.m_Tervezett3D = DAUtil.ReadBooleanAttribute(reader, 32);
|
|
|
|
|
|
entity.m_TervezettLego = DAUtil.ReadBooleanAttribute(reader, 33);
|
|
|
|
|
|
entity.m_VekonykliensAktualis = DAUtil.ReadIntegerAttribute(reader, 34);
|
|
|
|
|
|
entity.m_VekonykliensIgeny = DAUtil.ReadIntegerAttribute(reader, 35);
|
|
|
|
|
|
entity.m_VirusvedelmiAktualis = DAUtil.ReadIntegerAttribute(reader, 36);
|
|
|
|
|
|
entity.m_VirusvedelmiIgeny = DAUtil.ReadIntegerAttribute(reader, 37);
|
|
|
|
|
|
entity.m_VizualisOMAktualis = DAUtil.ReadIntegerAttribute(reader, 38);
|
|
|
|
|
|
entity.m_VizualisOMIgeny = DAUtil.ReadIntegerAttribute(reader, 39);
|
|
|
|
// IntezmenyEszkozAdatszolgaltatas kapcsoló mezői
|
|
DAUtil.ReadIDAttribute(reader, 40, ref entity.m_IntezmenyId, 0);
|
|
DAUtil.ReadIDAttribute(reader, 41, ref entity.m_TanevId, 0);
|
|
}
|
|
|
|
public override void LoadEntityFields(IntezmenyEszkozAdatszolgaltatas entity, SDA.DataProvider.SDADataReader reader, ColumnFilterMode columnFilterMode, IEnumerable<string> columns)
|
|
{
|
|
int index = 1;
|
|
if (columns == null)
|
|
{
|
|
columns = new List<string>(index);
|
|
}
|
|
// IntezmenyEszkozAdatszolgaltatas betöltése
|
|
// IntezmenyEszkozAdatszolgaltatas mezői
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("AlapszintuAMAktualis"))))
|
|
{
|
|
entity.m_AlapszintuAMAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("AlapszintuAMIgeny"))))
|
|
{
|
|
entity.m_AlapszintuAMIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("BillentyuzetAktualis"))))
|
|
{
|
|
entity.m_BillentyuzetAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("BillentyuzetIgeny"))))
|
|
{
|
|
entity.m_BillentyuzetIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("EgerAktualis"))))
|
|
{
|
|
entity.m_EgerAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("EgerIgeny"))))
|
|
{
|
|
entity.m_EgerIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("EgyebSzoftverAktualis"))))
|
|
{
|
|
entity.m_EgyebSzoftverAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("EgyebSzoftverIgeny"))))
|
|
{
|
|
entity.m_EgyebSzoftverIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("EgyebSzoftverLeiras"))))
|
|
{
|
|
entity.m_EgyebSzoftverLeiras = DAUtil.ReadStringAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("FFENAktualis"))))
|
|
{
|
|
entity.m_FFENAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("FFENIgeny"))))
|
|
{
|
|
entity.m_FFENIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("FFTNAktualis"))))
|
|
{
|
|
entity.m_FFTNAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("FFTNIgeny"))))
|
|
{
|
|
entity.m_FFTNIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("InteraktivTablaAktualis"))))
|
|
{
|
|
entity.m_InteraktivTablaAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("InteraktivTablaIgeny"))))
|
|
{
|
|
entity.m_InteraktivTablaIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("IrodaiSzoftverAktualis"))))
|
|
{
|
|
entity.m_IrodaiSzoftverAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("IrodaiSzoftverIgeny"))))
|
|
{
|
|
entity.m_IrodaiSzoftverIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("NotebookAktualis"))))
|
|
{
|
|
entity.m_NotebookAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("NotebookIgeny"))))
|
|
{
|
|
entity.m_NotebookIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("ProfMAktualis"))))
|
|
{
|
|
entity.m_ProfMAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("ProfMIgeny"))))
|
|
{
|
|
entity.m_ProfMIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("ProjektorAktualis"))))
|
|
{
|
|
entity.m_ProjektorAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("ProjektorIgeny"))))
|
|
{
|
|
entity.m_ProjektorIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("ScannerAktualis"))))
|
|
{
|
|
entity.m_ScannerAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("ScannerIgeny"))))
|
|
{
|
|
entity.m_ScannerIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("SzinesENAktualis"))))
|
|
{
|
|
entity.m_SzinesENAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("SzinesENIgeny"))))
|
|
{
|
|
entity.m_SzinesENIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("SzinesTNAktualis"))))
|
|
{
|
|
entity.m_SzinesTNAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("SzinesTNIgeny"))))
|
|
{
|
|
entity.m_SzinesTNIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("TabletAktualis"))))
|
|
{
|
|
entity.m_TabletAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("TabletIgeny"))))
|
|
{
|
|
entity.m_TabletIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("Tervezett3D"))))
|
|
{
|
|
entity.m_Tervezett3D = DAUtil.ReadBooleanAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("TervezettLego"))))
|
|
{
|
|
entity.m_TervezettLego = DAUtil.ReadBooleanAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("VekonykliensAktualis"))))
|
|
{
|
|
entity.m_VekonykliensAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("VekonykliensIgeny"))))
|
|
{
|
|
entity.m_VekonykliensIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("VirusvedelmiAktualis"))))
|
|
{
|
|
entity.m_VirusvedelmiAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("VirusvedelmiIgeny"))))
|
|
{
|
|
entity.m_VirusvedelmiIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("VizualisOMAktualis"))))
|
|
{
|
|
entity.m_VizualisOMAktualis = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
if (((columnFilterMode == ColumnFilterMode.DEFAULT_ALLOWED) ^ (columns.Contains("VizualisOMIgeny"))))
|
|
{
|
|
entity.m_VizualisOMIgeny = DAUtil.ReadIntegerAttribute(reader, index++);
|
|
}
|
|
// IntezmenyEszkozAdatszolgaltatas kapcsoló mezői
|
|
DAUtil.ReadIDAttribute(reader, index++, ref entity.m_IntezmenyId, 0);
|
|
DAUtil.ReadIDAttribute(reader, index++, ref entity.m_TanevId, 0);
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Paraméter kötés
|
|
|
|
public override void BindAttributes(IntezmenyEszkozAdatszolgaltatas entity, SDA.DataProvider.SDACommand command)
|
|
{
|
|
DAUtil.BindParameter(command, "pALAPSZINTUAMAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_AlapszintuAMAktualis, entity.m_AlapszintuAMAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pALAPSZINTUAMIGENY", SDA.DataProvider.SDADBType.Int, entity.m_AlapszintuAMIgeny, entity.m_AlapszintuAMIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pBILLENTYUZETAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_BillentyuzetAktualis, entity.m_BillentyuzetAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pBILLENTYUZETIGENY", SDA.DataProvider.SDADBType.Int, entity.m_BillentyuzetIgeny, entity.m_BillentyuzetIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pEGERAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_EgerAktualis, entity.m_EgerAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pEGERIGENY", SDA.DataProvider.SDADBType.Int, entity.m_EgerIgeny, entity.m_EgerIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pEGYEBSZOFTVERAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_EgyebSzoftverAktualis, entity.m_EgyebSzoftverAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pEGYEBSZOFTVERIGENY", SDA.DataProvider.SDADBType.Int, entity.m_EgyebSzoftverIgeny, entity.m_EgyebSzoftverIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pEGYEBSZOFTVERLEIRAS", SDA.DataProvider.SDADBType.LongString, 2147483647, entity.m_EgyebSzoftverLeiras, entity.m_EgyebSzoftverLeiras == null);
|
|
|
|
DAUtil.BindParameter(command, "pFFENAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_FFENAktualis, entity.m_FFENAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pFFENIGENY", SDA.DataProvider.SDADBType.Int, entity.m_FFENIgeny, entity.m_FFENIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pFFTNAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_FFTNAktualis, entity.m_FFTNAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pFFTNIGENY", SDA.DataProvider.SDADBType.Int, entity.m_FFTNIgeny, entity.m_FFTNIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pINTERAKTIVTABLAAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_InteraktivTablaAktualis, entity.m_InteraktivTablaAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pINTERAKTIVTABLAIGENY", SDA.DataProvider.SDADBType.Int, entity.m_InteraktivTablaIgeny, entity.m_InteraktivTablaIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pIRODAISZOFTVERAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_IrodaiSzoftverAktualis, entity.m_IrodaiSzoftverAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pIRODAISZOFTVERIGENY", SDA.DataProvider.SDADBType.Int, entity.m_IrodaiSzoftverIgeny, entity.m_IrodaiSzoftverIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pNOTEBOOKAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_NotebookAktualis, entity.m_NotebookAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pNOTEBOOKIGENY", SDA.DataProvider.SDADBType.Int, entity.m_NotebookIgeny, entity.m_NotebookIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pPROFMAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_ProfMAktualis, entity.m_ProfMAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pPROFMIGENY", SDA.DataProvider.SDADBType.Int, entity.m_ProfMIgeny, entity.m_ProfMIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pPROJEKTORAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_ProjektorAktualis, entity.m_ProjektorAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pPROJEKTORIGENY", SDA.DataProvider.SDADBType.Int, entity.m_ProjektorIgeny, entity.m_ProjektorIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pSCANNERAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_ScannerAktualis, entity.m_ScannerAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pSCANNERIGENY", SDA.DataProvider.SDADBType.Int, entity.m_ScannerIgeny, entity.m_ScannerIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pSZINESENAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_SzinesENAktualis, entity.m_SzinesENAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pSZINESENIGENY", SDA.DataProvider.SDADBType.Int, entity.m_SzinesENIgeny, entity.m_SzinesENIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pSZINESTNAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_SzinesTNAktualis, entity.m_SzinesTNAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pSZINESTNIGENY", SDA.DataProvider.SDADBType.Int, entity.m_SzinesTNIgeny, entity.m_SzinesTNIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pTABLETAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_TabletAktualis, entity.m_TabletAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pTABLETIGENY", SDA.DataProvider.SDADBType.Int, entity.m_TabletIgeny, entity.m_TabletIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pTERVEZETT3D", SDA.DataProvider.SDADBType.Boolean /* Boolean */, 1, entity.m_Tervezett3D, entity.m_Tervezett3D == null);
|
|
|
|
DAUtil.BindParameter(command, "pTERVEZETTLEGO", SDA.DataProvider.SDADBType.Boolean /* Boolean */, 1, entity.m_TervezettLego, entity.m_TervezettLego == null);
|
|
|
|
DAUtil.BindParameter(command, "pVEKONYKLIENSAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_VekonykliensAktualis, entity.m_VekonykliensAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pVEKONYKLIENSIGENY", SDA.DataProvider.SDADBType.Int, entity.m_VekonykliensIgeny, entity.m_VekonykliensIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pVIRUSVEDELMIAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_VirusvedelmiAktualis, entity.m_VirusvedelmiAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pVIRUSVEDELMIIGENY", SDA.DataProvider.SDADBType.Int, entity.m_VirusvedelmiIgeny, entity.m_VirusvedelmiIgeny == null);
|
|
|
|
DAUtil.BindParameter(command, "pVIZUALISOMAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_VizualisOMAktualis, entity.m_VizualisOMAktualis == null);
|
|
|
|
DAUtil.BindParameter(command, "pVIZUALISOMIGENY", SDA.DataProvider.SDADBType.Int, entity.m_VizualisOMIgeny, entity.m_VizualisOMIgeny == null);
|
|
}
|
|
|
|
public override void DynamicBindAttributes(IntezmenyEszkozAdatszolgaltatas entity, SDA.DataProvider.SDACommand command)
|
|
{
|
|
System.Text.StringBuilder sb = new System.Text.StringBuilder();
|
|
if (entity.HasChanged("AlapszintuAMAktualis"))
|
|
{
|
|
sb.Append("C_ALAPSZINTUAMAKTUALIS = :pALAPSZINTUAMAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pALAPSZINTUAMAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_AlapszintuAMAktualis, entity.m_AlapszintuAMAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("AlapszintuAMIgeny"))
|
|
{
|
|
sb.Append("C_ALAPSZINTUAMIGENY = :pALAPSZINTUAMIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pALAPSZINTUAMIGENY", SDA.DataProvider.SDADBType.Int, entity.m_AlapszintuAMIgeny, entity.m_AlapszintuAMIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("BillentyuzetAktualis"))
|
|
{
|
|
sb.Append("C_BILLENTYUZETAKTUALIS = :pBILLENTYUZETAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pBILLENTYUZETAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_BillentyuzetAktualis, entity.m_BillentyuzetAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("BillentyuzetIgeny"))
|
|
{
|
|
sb.Append("C_BILLENTYUZETIGENY = :pBILLENTYUZETIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pBILLENTYUZETIGENY", SDA.DataProvider.SDADBType.Int, entity.m_BillentyuzetIgeny, entity.m_BillentyuzetIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("EgerAktualis"))
|
|
{
|
|
sb.Append("C_EGERAKTUALIS = :pEGERAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pEGERAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_EgerAktualis, entity.m_EgerAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("EgerIgeny"))
|
|
{
|
|
sb.Append("C_EGERIGENY = :pEGERIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pEGERIGENY", SDA.DataProvider.SDADBType.Int, entity.m_EgerIgeny, entity.m_EgerIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("EgyebSzoftverAktualis"))
|
|
{
|
|
sb.Append("C_EGYEBSZOFTVERAKTUALIS = :pEGYEBSZOFTVERAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pEGYEBSZOFTVERAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_EgyebSzoftverAktualis, entity.m_EgyebSzoftverAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("EgyebSzoftverIgeny"))
|
|
{
|
|
sb.Append("C_EGYEBSZOFTVERIGENY = :pEGYEBSZOFTVERIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pEGYEBSZOFTVERIGENY", SDA.DataProvider.SDADBType.Int, entity.m_EgyebSzoftverIgeny, entity.m_EgyebSzoftverIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("EgyebSzoftverLeiras"))
|
|
{
|
|
sb.Append("C_EGYEBSZOFTVERLEIRAS = :pEGYEBSZOFTVERLEIRAS,");
|
|
|
|
DAUtil.BindParameter(command, "pEGYEBSZOFTVERLEIRAS", SDA.DataProvider.SDADBType.LongString, 2147483647, entity.m_EgyebSzoftverLeiras, entity.m_EgyebSzoftverLeiras == null);
|
|
|
|
}
|
|
if (entity.HasChanged("FFENAktualis"))
|
|
{
|
|
sb.Append("C_FFENAKTUALIS = :pFFENAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pFFENAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_FFENAktualis, entity.m_FFENAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("FFENIgeny"))
|
|
{
|
|
sb.Append("C_FFENIGENY = :pFFENIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pFFENIGENY", SDA.DataProvider.SDADBType.Int, entity.m_FFENIgeny, entity.m_FFENIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("FFTNAktualis"))
|
|
{
|
|
sb.Append("C_FFTNAKTUALIS = :pFFTNAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pFFTNAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_FFTNAktualis, entity.m_FFTNAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("FFTNIgeny"))
|
|
{
|
|
sb.Append("C_FFTNIGENY = :pFFTNIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pFFTNIGENY", SDA.DataProvider.SDADBType.Int, entity.m_FFTNIgeny, entity.m_FFTNIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("InteraktivTablaAktualis"))
|
|
{
|
|
sb.Append("C_INTERAKTIVTABLAAKTUALIS = :pINTERAKTIVTABLAAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pINTERAKTIVTABLAAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_InteraktivTablaAktualis, entity.m_InteraktivTablaAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("InteraktivTablaIgeny"))
|
|
{
|
|
sb.Append("C_INTERAKTIVTABLAIGENY = :pINTERAKTIVTABLAIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pINTERAKTIVTABLAIGENY", SDA.DataProvider.SDADBType.Int, entity.m_InteraktivTablaIgeny, entity.m_InteraktivTablaIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("IrodaiSzoftverAktualis"))
|
|
{
|
|
sb.Append("C_IRODAISZOFTVERAKTUALIS = :pIRODAISZOFTVERAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pIRODAISZOFTVERAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_IrodaiSzoftverAktualis, entity.m_IrodaiSzoftverAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("IrodaiSzoftverIgeny"))
|
|
{
|
|
sb.Append("C_IRODAISZOFTVERIGENY = :pIRODAISZOFTVERIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pIRODAISZOFTVERIGENY", SDA.DataProvider.SDADBType.Int, entity.m_IrodaiSzoftverIgeny, entity.m_IrodaiSzoftverIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("NotebookAktualis"))
|
|
{
|
|
sb.Append("C_NOTEBOOKAKTUALIS = :pNOTEBOOKAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pNOTEBOOKAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_NotebookAktualis, entity.m_NotebookAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("NotebookIgeny"))
|
|
{
|
|
sb.Append("C_NOTEBOOKIGENY = :pNOTEBOOKIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pNOTEBOOKIGENY", SDA.DataProvider.SDADBType.Int, entity.m_NotebookIgeny, entity.m_NotebookIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("ProfMAktualis"))
|
|
{
|
|
sb.Append("C_PROFMAKTUALIS = :pPROFMAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pPROFMAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_ProfMAktualis, entity.m_ProfMAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("ProfMIgeny"))
|
|
{
|
|
sb.Append("C_PROFMIGENY = :pPROFMIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pPROFMIGENY", SDA.DataProvider.SDADBType.Int, entity.m_ProfMIgeny, entity.m_ProfMIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("ProjektorAktualis"))
|
|
{
|
|
sb.Append("C_PROJEKTORAKTUALIS = :pPROJEKTORAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pPROJEKTORAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_ProjektorAktualis, entity.m_ProjektorAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("ProjektorIgeny"))
|
|
{
|
|
sb.Append("C_PROJEKTORIGENY = :pPROJEKTORIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pPROJEKTORIGENY", SDA.DataProvider.SDADBType.Int, entity.m_ProjektorIgeny, entity.m_ProjektorIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("ScannerAktualis"))
|
|
{
|
|
sb.Append("C_SCANNERAKTUALIS = :pSCANNERAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pSCANNERAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_ScannerAktualis, entity.m_ScannerAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("ScannerIgeny"))
|
|
{
|
|
sb.Append("C_SCANNERIGENY = :pSCANNERIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pSCANNERIGENY", SDA.DataProvider.SDADBType.Int, entity.m_ScannerIgeny, entity.m_ScannerIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("SzinesENAktualis"))
|
|
{
|
|
sb.Append("C_SZINESENAKTUALIS = :pSZINESENAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pSZINESENAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_SzinesENAktualis, entity.m_SzinesENAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("SzinesENIgeny"))
|
|
{
|
|
sb.Append("C_SZINESENIGENY = :pSZINESENIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pSZINESENIGENY", SDA.DataProvider.SDADBType.Int, entity.m_SzinesENIgeny, entity.m_SzinesENIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("SzinesTNAktualis"))
|
|
{
|
|
sb.Append("C_SZINESTNAKTUALIS = :pSZINESTNAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pSZINESTNAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_SzinesTNAktualis, entity.m_SzinesTNAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("SzinesTNIgeny"))
|
|
{
|
|
sb.Append("C_SZINESTNIGENY = :pSZINESTNIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pSZINESTNIGENY", SDA.DataProvider.SDADBType.Int, entity.m_SzinesTNIgeny, entity.m_SzinesTNIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("TabletAktualis"))
|
|
{
|
|
sb.Append("C_TABLETAKTUALIS = :pTABLETAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pTABLETAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_TabletAktualis, entity.m_TabletAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("TabletIgeny"))
|
|
{
|
|
sb.Append("C_TABLETIGENY = :pTABLETIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pTABLETIGENY", SDA.DataProvider.SDADBType.Int, entity.m_TabletIgeny, entity.m_TabletIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("Tervezett3D"))
|
|
{
|
|
sb.Append("C_TERVEZETT3D = :pTERVEZETT3D,");
|
|
|
|
DAUtil.BindParameter(command, "pTERVEZETT3D", SDA.DataProvider.SDADBType.Boolean /* Boolean */, 1, entity.m_Tervezett3D, entity.m_Tervezett3D == null);
|
|
|
|
}
|
|
if (entity.HasChanged("TervezettLego"))
|
|
{
|
|
sb.Append("C_TERVEZETTLEGO = :pTERVEZETTLEGO,");
|
|
|
|
DAUtil.BindParameter(command, "pTERVEZETTLEGO", SDA.DataProvider.SDADBType.Boolean /* Boolean */, 1, entity.m_TervezettLego, entity.m_TervezettLego == null);
|
|
|
|
}
|
|
if (entity.HasChanged("VekonykliensAktualis"))
|
|
{
|
|
sb.Append("C_VEKONYKLIENSAKTUALIS = :pVEKONYKLIENSAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pVEKONYKLIENSAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_VekonykliensAktualis, entity.m_VekonykliensAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("VekonykliensIgeny"))
|
|
{
|
|
sb.Append("C_VEKONYKLIENSIGENY = :pVEKONYKLIENSIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pVEKONYKLIENSIGENY", SDA.DataProvider.SDADBType.Int, entity.m_VekonykliensIgeny, entity.m_VekonykliensIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("VirusvedelmiAktualis"))
|
|
{
|
|
sb.Append("C_VIRUSVEDELMIAKTUALIS = :pVIRUSVEDELMIAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pVIRUSVEDELMIAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_VirusvedelmiAktualis, entity.m_VirusvedelmiAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("VirusvedelmiIgeny"))
|
|
{
|
|
sb.Append("C_VIRUSVEDELMIIGENY = :pVIRUSVEDELMIIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pVIRUSVEDELMIIGENY", SDA.DataProvider.SDADBType.Int, entity.m_VirusvedelmiIgeny, entity.m_VirusvedelmiIgeny == null);
|
|
|
|
}
|
|
if (entity.HasChanged("VizualisOMAktualis"))
|
|
{
|
|
sb.Append("C_VIZUALISOMAKTUALIS = :pVIZUALISOMAKTUALIS,");
|
|
|
|
DAUtil.BindParameter(command, "pVIZUALISOMAKTUALIS", SDA.DataProvider.SDADBType.Int, entity.m_VizualisOMAktualis, entity.m_VizualisOMAktualis == null);
|
|
|
|
}
|
|
if (entity.HasChanged("VizualisOMIgeny"))
|
|
{
|
|
sb.Append("C_VIZUALISOMIGENY = :pVIZUALISOMIGENY,");
|
|
|
|
DAUtil.BindParameter(command, "pVIZUALISOMIGENY", SDA.DataProvider.SDADBType.Int, entity.m_VizualisOMIgeny, entity.m_VizualisOMIgeny == null);
|
|
|
|
}
|
|
command.CommandText = command.CommandText.Replace("{COLUMNS}", sb.ToString());
|
|
}
|
|
|
|
public override void BindAssociations(IntezmenyEszkozAdatszolgaltatas entity, SDA.DataProvider.SDACommand command)
|
|
{
|
|
DAUtil.BindIdParameter(command, "pINTEZMENYID", entity.InternalIntezmenyId);
|
|
DAUtil.BindIdParameter(command, "pTANEVID", entity.InternalTanevId);
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
|
|
internal class IntezmenyEszkozAdatszolgaltatasDA : EntityDataAccessor<IntezmenyEszkozAdatszolgaltatas>
|
|
{
|
|
private static IntezmenyEszkozAdatszolgaltatasDBHelper m_dbhelper = new IntezmenyEszkozAdatszolgaltatasDBHelper();
|
|
|
|
protected override IEntityDBHelper<IntezmenyEszkozAdatszolgaltatas> dbhelper
|
|
{
|
|
get { return m_dbhelper; }
|
|
}
|
|
|
|
#region Load
|
|
|
|
public override bool LoadEntity(IntezmenyEszkozAdatszolgaltatas entity, int entityId)
|
|
{
|
|
return LoadById(entity, entityId);
|
|
}
|
|
|
|
public override bool FilteredLoadEntity(IntezmenyEszkozAdatszolgaltatas entity, int entityId, ColumnFilterMode columnFilterMode, IEnumerable<string> columns)
|
|
{
|
|
return LoadById(entity, entityId, columnFilterMode, columns);
|
|
}
|
|
|
|
public bool LoadById(IntezmenyEszkozAdatszolgaltatas entity, int entityId)
|
|
{
|
|
using (SDA.DataProvider.SDACommand command = dbhelper.CreateEmptyQueryCommand())
|
|
{
|
|
command.CommandText += " and (T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.ID = :pID) ";
|
|
command.Parameters.Add("pID", SDA.DataProvider.SDADBType.Int).Value = entityId;
|
|
return dbhelper.LoadSingleEntity(entity, command);
|
|
}
|
|
}
|
|
|
|
public bool LoadById(IntezmenyEszkozAdatszolgaltatas entity, int entityId, ColumnFilterMode columnFilterMode, IEnumerable<string> columns)
|
|
{
|
|
using (SDA.DataProvider.SDACommand command = dbhelper.CreateDynamicQueryCommand(columnFilterMode, columns))
|
|
{
|
|
command.CommandText += " and (T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.ID = :pID) ";
|
|
command.Parameters.Add("pID", SDA.DataProvider.SDADBType.Int).Value = entityId;
|
|
return dbhelper.LoadSingleEntity(entity, command, 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 override void LoadWithFilter(IEntityCollection<IntezmenyEszkozAdatszolgaltatas> collection, string filter, Dictionary<string, object> commandParameters = null)
|
|
{
|
|
using (SDA.DataProvider.SDACommand command = dbhelper.CreateEmptyQueryCommand())
|
|
{
|
|
command.CommandText += filter;
|
|
dbhelper.CreateParameterBinding(command, commandParameters);
|
|
dbhelper.LoadEntityCollection(collection, command);
|
|
}
|
|
}
|
|
|
|
[Obsolete("Ezt ne használjátok, mert mindenhova bele kellene fogalmazni a tanév szűrést is! Meg fog majd szűnni!")]
|
|
public override void LoadWithFilter(IEntityCollection<IntezmenyEszkozAdatszolgaltatas> collection, string filter, ColumnFilterMode columnFilterMode, IEnumerable<string> columns, Dictionary<string, object> commandParameters = null)
|
|
{
|
|
using (SDA.DataProvider.SDACommand command = dbhelper.CreateDynamicQueryCommand(columnFilterMode, columns))
|
|
{
|
|
command.CommandText += filter;
|
|
dbhelper.CreateParameterBinding(command, commandParameters);
|
|
dbhelper.LoadEntityCollection(collection, command, columnFilterMode, columns);
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region InsertEntity
|
|
|
|
private const string m_InsertCommandText = @"
|
|
insert into T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES (
|
|
C_ALAPSZINTUAMAKTUALIS,
|
|
C_ALAPSZINTUAMIGENY,
|
|
C_BILLENTYUZETAKTUALIS,
|
|
C_BILLENTYUZETIGENY,
|
|
C_EGERAKTUALIS,
|
|
C_EGERIGENY,
|
|
C_EGYEBSZOFTVERAKTUALIS,
|
|
C_EGYEBSZOFTVERIGENY,
|
|
C_EGYEBSZOFTVERLEIRAS,
|
|
C_FFENAKTUALIS,
|
|
C_FFENIGENY,
|
|
C_FFTNAKTUALIS,
|
|
C_FFTNIGENY,
|
|
C_INTERAKTIVTABLAAKTUALIS,
|
|
C_INTERAKTIVTABLAIGENY,
|
|
C_IRODAISZOFTVERAKTUALIS,
|
|
C_IRODAISZOFTVERIGENY,
|
|
C_NOTEBOOKAKTUALIS,
|
|
C_NOTEBOOKIGENY,
|
|
C_PROFMAKTUALIS,
|
|
C_PROFMIGENY,
|
|
C_PROJEKTORAKTUALIS,
|
|
C_PROJEKTORIGENY,
|
|
C_SCANNERAKTUALIS,
|
|
C_SCANNERIGENY,
|
|
C_SZINESENAKTUALIS,
|
|
C_SZINESENIGENY,
|
|
C_SZINESTNAKTUALIS,
|
|
C_SZINESTNIGENY,
|
|
C_TABLETAKTUALIS,
|
|
C_TABLETIGENY,
|
|
C_TERVEZETT3D,
|
|
C_TERVEZETTLEGO,
|
|
C_VEKONYKLIENSAKTUALIS,
|
|
C_VEKONYKLIENSIGENY,
|
|
C_VIRUSVEDELMIAKTUALIS,
|
|
C_VIRUSVEDELMIIGENY,
|
|
C_VIZUALISOMAKTUALIS,
|
|
C_VIZUALISOMIGENY,
|
|
C_INTEZMENYID,
|
|
C_TANEVID,
|
|
TOROLT,
|
|
SERIAL,
|
|
CREATED,
|
|
CREATOR)
|
|
values (
|
|
:pALAPSZINTUAMAKTUALIS,
|
|
:pALAPSZINTUAMIGENY,
|
|
:pBILLENTYUZETAKTUALIS,
|
|
:pBILLENTYUZETIGENY,
|
|
:pEGERAKTUALIS,
|
|
:pEGERIGENY,
|
|
:pEGYEBSZOFTVERAKTUALIS,
|
|
:pEGYEBSZOFTVERIGENY,
|
|
:pEGYEBSZOFTVERLEIRAS,
|
|
:pFFENAKTUALIS,
|
|
:pFFENIGENY,
|
|
:pFFTNAKTUALIS,
|
|
:pFFTNIGENY,
|
|
:pINTERAKTIVTABLAAKTUALIS,
|
|
:pINTERAKTIVTABLAIGENY,
|
|
:pIRODAISZOFTVERAKTUALIS,
|
|
:pIRODAISZOFTVERIGENY,
|
|
:pNOTEBOOKAKTUALIS,
|
|
:pNOTEBOOKIGENY,
|
|
:pPROFMAKTUALIS,
|
|
:pPROFMIGENY,
|
|
:pPROJEKTORAKTUALIS,
|
|
:pPROJEKTORIGENY,
|
|
:pSCANNERAKTUALIS,
|
|
:pSCANNERIGENY,
|
|
:pSZINESENAKTUALIS,
|
|
:pSZINESENIGENY,
|
|
:pSZINESTNAKTUALIS,
|
|
:pSZINESTNIGENY,
|
|
:pTABLETAKTUALIS,
|
|
:pTABLETIGENY,
|
|
:pTERVEZETT3D,
|
|
:pTERVEZETTLEGO,
|
|
:pVEKONYKLIENSAKTUALIS,
|
|
:pVEKONYKLIENSIGENY,
|
|
:pVIRUSVEDELMIAKTUALIS,
|
|
:pVIRUSVEDELMIIGENY,
|
|
:pVIZUALISOMAKTUALIS,
|
|
:pVIZUALISOMIGENY,
|
|
:pINTEZMENYID,
|
|
:pTANEVID,
|
|
:pTOROLT,
|
|
:pSERIAL,
|
|
:pCREATED,
|
|
:pCREATOR);
|
|
|
|
SELECT SCOPE_IDENTITY() as ID;
|
|
|
|
";
|
|
|
|
public override void InsertEntity(IntezmenyEszkozAdatszolgaltatas entity)
|
|
{
|
|
entity.Serial = 0;
|
|
SetEntityCreator(entity, DateTime.Now, UserContext.Instance.UniqueIdentifier);
|
|
|
|
using (SDA.DataProvider.SDACommand command = DAUtil.CreateCommand(m_InsertCommandText))
|
|
{
|
|
dbhelper.BindAttributes(entity, command);
|
|
dbhelper.BindAssociations(entity, command);
|
|
command.Parameters.Add("pTOROLT", SDA.DataProvider.SDADBType.Boolean /* Boolean */).Value = false;
|
|
command.Parameters.Add("pSERIAL", SDA.DataProvider.SDADBType.Int).Value = 0;
|
|
command.Parameters.Add("pCREATED", SDA.DataProvider.SDADBType.DateTime).Value = entity.EntityCreated;
|
|
command.Parameters.Add("pCREATOR", SDA.DataProvider.SDADBType.Int).Value = entity.EntityCreator;
|
|
entity.ID = Convert.ToInt32(command.ExecuteScalar());
|
|
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region UpdateEntity
|
|
|
|
private const string m_UpdateAttributesCommandText = @"
|
|
update T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES
|
|
set
|
|
{COLUMNS}
|
|
SERIAL = ISNULL(SERIAL,0) + 1,
|
|
LASTCHANGED = :pLASTCHANGED,
|
|
MODIFIER = :pMODIFIER,
|
|
TOROLT = :pTOROLT
|
|
where
|
|
(ID = :pID) and (ISNULL(SERIAL,0) = :pSERIAL)
|
|
";
|
|
|
|
public override bool UpdateEntity(IntezmenyEszkozAdatszolgaltatas entity)
|
|
{
|
|
using (SDA.DataProvider.SDACommand command = DAUtil.CreateCommand(m_UpdateAttributesCommandText))
|
|
{
|
|
bool result = true;
|
|
dbhelper.DynamicBindAttributes(entity, command);
|
|
|
|
SetEntityModifier(entity, DateTime.Now, UserContext.Instance.UniqueIdentifier);
|
|
|
|
command.Parameters.Add("pID", SDA.DataProvider.SDADBType.Int).Value = entity.ID;
|
|
command.Parameters.Add("pSERIAL", SDA.DataProvider.SDADBType.Int).Value = entity.Serial;
|
|
command.Parameters.Add("pLASTCHANGED", SDA.DataProvider.SDADBType.DateTime).Value = entity.EntityLastChanged;
|
|
command.Parameters.Add("pMODIFIER", SDA.DataProvider.SDADBType.Int).Value = entity.EntityModifier;
|
|
command.Parameters.Add("pTOROLT", SDA.DataProvider.SDADBType.Boolean /* Boolean */).Value = entity.Torolt;
|
|
|
|
result = (command.ExecuteNonQuery() == 1);
|
|
if (result == true)
|
|
entity.Serial++;
|
|
|
|
return result;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region DeleteEntity
|
|
|
|
private const string m_FizikaiDeleteCommandText = @"DELETE FROM T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES WHERE (ID = :pID) ";
|
|
private const string m_LogikaiDeleteCommandText = @"
|
|
UPDATE T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES
|
|
SET TOROLT = 'T' ,
|
|
SERIAL = SERIAL + 1,
|
|
LASTCHANGED = :pLASTCHANGED,
|
|
MODIFIER = :pMODIFIER
|
|
WHERE (ID = :pID) ";
|
|
|
|
public override void DeleteEntity(IntezmenyEszkozAdatszolgaltatas entity, bool logikai = true)
|
|
{
|
|
var _deleteCommandText = logikai ? m_LogikaiDeleteCommandText : m_FizikaiDeleteCommandText;
|
|
using (SDA.DataProvider.SDACommand command = DAUtil.CreateCommand(_deleteCommandText))
|
|
{
|
|
command.Parameters.Add("pID", SDA.DataProvider.SDADBType.Int).Value = entity.ID;
|
|
|
|
if (logikai)
|
|
{
|
|
DateTime lastchanged = DateTime.Now;
|
|
var modifier = UserContext.Instance.UniqueIdentifier;
|
|
|
|
command.Parameters.Add("pLASTCHANGED", SDA.DataProvider.SDADBType.DateTime).Value = lastchanged;
|
|
command.Parameters.Add("pMODIFIER", SDA.DataProvider.SDADBType.Int).Value = modifier;
|
|
}
|
|
|
|
if (command.ExecuteNonQuery() != 1)
|
|
{
|
|
throw new EntityNotFoundException("IntezmenyEszkozAdatszolgaltatas", entity.ID);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region UpdateAssociations
|
|
|
|
private const string m_UpdateAssociationCommandText = @"
|
|
update T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES
|
|
set
|
|
C_INTEZMENYID = :pINTEZMENYID,
|
|
C_TANEVID = :pTANEVID,
|
|
SERIAL = ISNULL(SERIAL,0) + 1,
|
|
LASTCHANGED = :pLASTCHANGED,
|
|
MODIFIER = :pMODIFIER
|
|
where
|
|
(ID = :pID) and (ISNULL(SERIAL,0) = :pSERIAL)
|
|
";
|
|
|
|
public override bool UpdateAssociations(IntezmenyEszkozAdatszolgaltatas entity)
|
|
{
|
|
using (SDA.DataProvider.SDACommand command = DAUtil.CreateCommand(m_UpdateAssociationCommandText))
|
|
{
|
|
dbhelper.BindAssociations(entity, command);
|
|
|
|
DateTime lastchanged = DateTime.Now;
|
|
var modifier = UserContext.Instance.UniqueIdentifier;
|
|
|
|
command.Parameters.Add("pID", SDA.DataProvider.SDADBType.Int).Value = entity.ID;
|
|
command.Parameters.Add("pSERIAL", SDA.DataProvider.SDADBType.Int).Value = entity.Serial;
|
|
command.Parameters.Add("pLASTCHANGED", SDA.DataProvider.SDADBType.DateTime).Value = lastchanged;
|
|
command.Parameters.Add("pMODIFIER", SDA.DataProvider.SDADBType.Int).Value = modifier;
|
|
|
|
bool result = (command.ExecuteNonQuery() == 1);
|
|
if (result == true)
|
|
{
|
|
entity.Serial++;
|
|
SetEntityModifier(entity, lastchanged, modifier);
|
|
}
|
|
return result;
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Asszociációkkal kapcsolatos adatbázisműveletek (entitásspecifikus)
|
|
|
|
#region Mint asszociációs osztály
|
|
#endregion
|
|
|
|
|
|
#endregion
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Az osztály elvégzi az UML modell 'Intezmeny -> IntezmenyEszkozAdatszolgaltatas (IntezmenyEszkozAdatszolgaltatas)'
|
|
/// asszociációjának teljes kezelését.
|
|
/// </summary>
|
|
internal class Intezmeny_IntezmenyEszkozAdatszolgaltatas_DA : EntityCollectionDA<Intezmeny, IntezmenyEszkozAdatszolgaltatas>
|
|
{
|
|
internal protected Intezmeny_IntezmenyEszkozAdatszolgaltatas_DA(Intezmeny owner)
|
|
: base(owner)
|
|
{
|
|
}
|
|
|
|
// Nincs kapcsolótábla
|
|
private const string m_Filter = @" and (T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_INTEZMENYID = :pID) ";
|
|
|
|
public override void LoadCollection(IAssociatedEntityCollection<IntezmenyEszkozAdatszolgaltatas> collection)
|
|
{
|
|
new IntezmenyEszkozAdatszolgaltatasDBHelper().LoadByPartnerId(collection, m_Filter, Owner.ID);
|
|
}
|
|
|
|
private static SDA.DataProvider.SDACommand CreateInsertIntezmenyEszkozAdatszolgaltatasCommand()
|
|
{
|
|
SDA.DataProvider.SDACommand result = new SDA.DataProvider.SDACommand();
|
|
// nincs kapcsolótábla...
|
|
result.CommandText = @"update T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES set C_INTEZMENYID = :pINTEZMENYID where (ID = :pINTEZMENYESZKOZADATSZOLGALTAT)";
|
|
result.Parameters.Add("pINTEZMENYID", SDA.DataProvider.SDADBType.Int);
|
|
result.Parameters.Add("pINTEZMENYESZKOZADATSZOLGALTAT", SDA.DataProvider.SDADBType.Int);
|
|
return result;
|
|
}
|
|
|
|
private void DoAdd(Intezmeny owner, IntezmenyEszkozAdatszolgaltatas partner)
|
|
{
|
|
using (SDA.DataProvider.SDACommand command = CreateInsertIntezmenyEszkozAdatszolgaltatasCommand())
|
|
{
|
|
command.Connection = UserContext.Instance.SDAConnection;
|
|
command.Transaction = UserContext.Instance.SDATransaction;
|
|
command.Parameters["pINTEZMENYID"].Value = owner.ID;
|
|
command.Parameters["pINTEZMENYESZKOZADATSZOLGALTAT"].Value = partner.ID;
|
|
command.ExecuteNonQuery();
|
|
}
|
|
}
|
|
|
|
public override void AddItem(IntezmenyEszkozAdatszolgaltatas entity)
|
|
{
|
|
var assochandler = AssociationHandlerManager.Create<IntezmenyEszkozAdatszolgaltatas, Intezmeny>("IntezmenyEszkozAdatszolgaltatas_Intezmeny");
|
|
assochandler.BeforeInsert(entity, this.Owner);
|
|
entity.ModifyIntezmeny(this.Owner);
|
|
if (entity.State == EntityState.Modified)
|
|
{
|
|
entity.UpdateAssociations(true);
|
|
}
|
|
else
|
|
{
|
|
entity.Insert(true);
|
|
}
|
|
assochandler.AfterInsert(entity, this.Owner);
|
|
}
|
|
|
|
private static SDA.DataProvider.SDACommand CreateDeleteIntezmenyEszkozAdatszolgaltatasCommand()
|
|
{
|
|
SDA.DataProvider.SDACommand result = new SDA.DataProvider.SDACommand();
|
|
// nincs kapcsolótábla...
|
|
result.CommandText = @"update T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES set C_INTEZMENYID = null where (C_INTEZMENYID = :pINTEZMENYID and ID = :pINTEZMENYESZKOZADATSZOLGALTAT)";
|
|
result.Parameters.Add("pINTEZMENYID", SDA.DataProvider.SDADBType.Int);
|
|
result.Parameters.Add("pINTEZMENYESZKOZADATSZOLGALTAT", SDA.DataProvider.SDADBType.Int);
|
|
return result;
|
|
}
|
|
|
|
private void DoRemove(Intezmeny owner, IntezmenyEszkozAdatszolgaltatas partner)
|
|
{
|
|
using (SDA.DataProvider.SDACommand command = CreateDeleteIntezmenyEszkozAdatszolgaltatasCommand())
|
|
{
|
|
command.Connection = UserContext.Instance.SDAConnection;
|
|
command.Transaction = UserContext.Instance.SDATransaction;
|
|
command.Parameters["pINTEZMENYID"].Value = owner.ID;
|
|
command.Parameters["pINTEZMENYESZKOZADATSZOLGALTAT"].Value = partner.ID;
|
|
command.ExecuteNonQuery();
|
|
}
|
|
}
|
|
|
|
public override void DeleteItem(IntezmenyEszkozAdatszolgaltatas entity)
|
|
{
|
|
var assochandler = AssociationHandlerManager.Create<IntezmenyEszkozAdatszolgaltatas, Intezmeny>("IntezmenyEszkozAdatszolgaltatas_Intezmeny");
|
|
assochandler.BeforeDelete(entity, this.Owner);
|
|
entity.Delete(true);
|
|
assochandler.AfterDelete(entity, this.Owner);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Az osztály elvégzi az UML modell 'Tanev -> IntezmenyEszkozAdatszolgaltatas (IntezmenyEszkozAdatszolgaltatas)'
|
|
/// asszociációjának teljes kezelését.
|
|
/// </summary>
|
|
internal class Tanev_IntezmenyEszkozAdatszolgaltatas_DA : EntityCollectionDA<Tanev, IntezmenyEszkozAdatszolgaltatas>
|
|
{
|
|
internal protected Tanev_IntezmenyEszkozAdatszolgaltatas_DA(Tanev owner)
|
|
: base(owner)
|
|
{
|
|
}
|
|
|
|
// Nincs kapcsolótábla
|
|
private const string m_Filter = @" and (T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES.C_TANEVID = :pID) ";
|
|
|
|
public override void LoadCollection(IAssociatedEntityCollection<IntezmenyEszkozAdatszolgaltatas> collection)
|
|
{
|
|
new IntezmenyEszkozAdatszolgaltatasDBHelper().LoadByPartnerId(collection, m_Filter, Owner.ID);
|
|
}
|
|
|
|
private static SDA.DataProvider.SDACommand CreateInsertIntezmenyEszkozAdatszolgaltatasCommand()
|
|
{
|
|
SDA.DataProvider.SDACommand result = new SDA.DataProvider.SDACommand();
|
|
// nincs kapcsolótábla...
|
|
result.CommandText = @"update T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES set C_TANEVID = :pTANEVID where (ID = :pINTEZMENYESZKOZADATSZOLGALTAT)";
|
|
result.Parameters.Add("pTANEVID", SDA.DataProvider.SDADBType.Int);
|
|
result.Parameters.Add("pINTEZMENYESZKOZADATSZOLGALTAT", SDA.DataProvider.SDADBType.Int);
|
|
return result;
|
|
}
|
|
|
|
private void DoAdd(Tanev owner, IntezmenyEszkozAdatszolgaltatas partner)
|
|
{
|
|
using (SDA.DataProvider.SDACommand command = CreateInsertIntezmenyEszkozAdatszolgaltatasCommand())
|
|
{
|
|
command.Connection = UserContext.Instance.SDAConnection;
|
|
command.Transaction = UserContext.Instance.SDATransaction;
|
|
command.Parameters["pTANEVID"].Value = owner.ID;
|
|
command.Parameters["pINTEZMENYESZKOZADATSZOLGALTAT"].Value = partner.ID;
|
|
command.ExecuteNonQuery();
|
|
}
|
|
}
|
|
|
|
public override void AddItem(IntezmenyEszkozAdatszolgaltatas entity)
|
|
{
|
|
var assochandler = AssociationHandlerManager.Create<IntezmenyEszkozAdatszolgaltatas, Tanev>("IntezmenyEszkozAdatszolgaltatas_Tanev");
|
|
assochandler.BeforeInsert(entity, this.Owner);
|
|
entity.ModifyTanev(this.Owner);
|
|
if (entity.State == EntityState.Modified)
|
|
{
|
|
entity.UpdateAssociations(true);
|
|
}
|
|
else
|
|
{
|
|
entity.Insert(true);
|
|
}
|
|
assochandler.AfterInsert(entity, this.Owner);
|
|
}
|
|
|
|
private static SDA.DataProvider.SDACommand CreateDeleteIntezmenyEszkozAdatszolgaltatasCommand()
|
|
{
|
|
SDA.DataProvider.SDACommand result = new SDA.DataProvider.SDACommand();
|
|
// nincs kapcsolótábla...
|
|
result.CommandText = @"update T_INTEZMENYESZKOZADATSZOLGALTA_OSSZES set C_TANEVID = null where (C_TANEVID = :pTANEVID and ID = :pINTEZMENYESZKOZADATSZOLGALTAT)";
|
|
result.Parameters.Add("pTANEVID", SDA.DataProvider.SDADBType.Int);
|
|
result.Parameters.Add("pINTEZMENYESZKOZADATSZOLGALTAT", SDA.DataProvider.SDADBType.Int);
|
|
return result;
|
|
}
|
|
|
|
private void DoRemove(Tanev owner, IntezmenyEszkozAdatszolgaltatas partner)
|
|
{
|
|
using (SDA.DataProvider.SDACommand command = CreateDeleteIntezmenyEszkozAdatszolgaltatasCommand())
|
|
{
|
|
command.Connection = UserContext.Instance.SDAConnection;
|
|
command.Transaction = UserContext.Instance.SDATransaction;
|
|
command.Parameters["pTANEVID"].Value = owner.ID;
|
|
command.Parameters["pINTEZMENYESZKOZADATSZOLGALTAT"].Value = partner.ID;
|
|
command.ExecuteNonQuery();
|
|
}
|
|
}
|
|
|
|
public override void DeleteItem(IntezmenyEszkozAdatszolgaltatas entity)
|
|
{
|
|
var assochandler = AssociationHandlerManager.Create<IntezmenyEszkozAdatszolgaltatas, Tanev>("IntezmenyEszkozAdatszolgaltatas_Tanev");
|
|
assochandler.BeforeDelete(entity, this.Owner);
|
|
entity.Delete(true);
|
|
assochandler.AfterDelete(entity, this.Owner);
|
|
}
|
|
}
|
|
|
|
}
|
|
|