init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.Logic;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
[Serializable]
|
||||
public class AdatszotarUid : IReadonlyUidRaw, IEqualityComparer<AdatszotarUid>
|
||||
{
|
||||
public AdatszotarUid(int id, string nev)
|
||||
{
|
||||
Id = id;
|
||||
Nev = nev;
|
||||
UidRaw = UidLogic.Concat(id, nev);
|
||||
}
|
||||
|
||||
public AdatszotarUid(string uidRaw)
|
||||
{
|
||||
var compositeKeyElements = UidLogic.GetCompositeKeyElements(uidRaw);
|
||||
Id = int.TryParse(compositeKeyElements[0], out int result) ? result : 0; //HACK DevKornél: Lehetnek kivételek
|
||||
Nev = compositeKeyElements[1];
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string Nev { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(AdatszotarUid x, AdatszotarUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(AdatszotarUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class AlkalmazottUid : IReadonlyUidRaw, IEqualityComparer<AlkalmazottUid>
|
||||
{
|
||||
public AlkalmazottUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public AlkalmazottUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(AlkalmazottUid x, AlkalmazottUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(AlkalmazottUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class BejelentettSzamonkeresUid : IReadonlyUidRaw, IEqualityComparer<BejelentettSzamonkeresUid>
|
||||
{
|
||||
public BejelentettSzamonkeresUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public BejelentettSzamonkeresUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(BejelentettSzamonkeresUid x, BejelentettSzamonkeresUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(BejelentettSzamonkeresUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.Logic;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class CsatolmanyUid : IReadonlyUidRaw, IEqualityComparer<CsatolmanyUid>
|
||||
{
|
||||
public CsatolmanyUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public CsatolmanyUid(string uidRaw)
|
||||
{
|
||||
var compositeKeyElements = UidLogic.GetCompositeKeyElements(uidRaw);
|
||||
Id = int.Parse(compositeKeyElements[0]);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(CsatolmanyUid x, CsatolmanyUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(CsatolmanyUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class CsoportUid : IReadonlyUidRaw, IEqualityComparer<CsoportUid>
|
||||
{
|
||||
public CsoportUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public CsoportUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(CsoportUid x, CsoportUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(CsoportUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class EloadasUid : IReadonlyUidRaw, IEqualityComparer<EloadasUid>
|
||||
{
|
||||
public EloadasUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public EloadasUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(EloadasUid x, EloadasUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(EloadasUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class EmailUid : IReadonlyUidRaw, IEqualityComparer<EmailUid>
|
||||
{
|
||||
public EmailUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public EmailUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(EmailUid x, EmailUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(EmailUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.Logic;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class ErtekelesUid : IReadonlyUidRaw, IEqualityComparer<ErtekelesUid>
|
||||
{
|
||||
public ErtekelesUid(int id, ErtekelesJelleg jelleg)
|
||||
{
|
||||
Id = id;
|
||||
Jelleg = jelleg;
|
||||
UidRaw = UidLogic.Concat(id, jelleg);
|
||||
}
|
||||
|
||||
public ErtekelesUid(string uidRaw)
|
||||
{
|
||||
var compositeKeyElements = UidLogic.GetCompositeKeyElements(uidRaw);
|
||||
Id = int.Parse(compositeKeyElements[0]);
|
||||
Jelleg = (ErtekelesJelleg)Enum.Parse(typeof(ErtekelesJelleg), compositeKeyElements[1]);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public ErtekelesJelleg Jelleg { get; set; }
|
||||
|
||||
public bool Equals(ErtekelesUid x, ErtekelesUid y) => x == y || (x.UidRaw == y.UidRaw && x.Jelleg == y.Jelleg);
|
||||
|
||||
public int GetHashCode(ErtekelesUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class FaliujsagUid : IReadonlyUidRaw, IEqualityComparer<FaliujsagUid>
|
||||
{
|
||||
public FaliujsagUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public FaliujsagUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(FaliujsagUid x, FaliujsagUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(FaliujsagUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class FelhasznaloUid : IReadonlyUidRaw, IEqualityComparer<FelhasznaloUid>
|
||||
{
|
||||
public FelhasznaloUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public FelhasznaloUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(FelhasznaloUid x, FelhasznaloUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(FelhasznaloUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class FeljegyzesUid : IReadonlyUidRaw, IEqualityComparer<FeljegyzesUid>
|
||||
{
|
||||
public FeljegyzesUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public FeljegyzesUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(FeljegyzesUid x, FeljegyzesUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(FeljegyzesUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class FogadooraIdopontUid : IReadonlyUidRaw, IEqualityComparer<FogadooraIdopontUid>
|
||||
{
|
||||
public FogadooraIdopontUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public FogadooraIdopontUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(FogadooraIdopontUid x, FogadooraIdopontUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(FogadooraIdopontUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class FogadooraUid : IReadonlyUidRaw, IEqualityComparer<FogadooraUid>
|
||||
{
|
||||
public FogadooraUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public FogadooraUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(FogadooraUid x, FogadooraUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(FogadooraUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class GondviseloUid : IReadonlyUidRaw, IEqualityComparer<GondviseloUid>
|
||||
{
|
||||
public GondviseloUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public GondviseloUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(GondviseloUid x, GondviseloUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(GondviseloUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.Logic;
|
||||
using Kreta.Ellenorzo.Enums.VN;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class HaziFeladatCsatolmanyUid : IReadonlyUidRaw, IEqualityComparer<HaziFeladatCsatolmanyUid>
|
||||
{
|
||||
public HaziFeladatCsatolmanyUid(int id, CsatolmanyTipus tipus)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
Tipus = tipus;
|
||||
}
|
||||
|
||||
public HaziFeladatCsatolmanyUid(string uidRaw)
|
||||
{
|
||||
var compositeKeyElements = UidLogic.GetCompositeKeyElements(uidRaw);
|
||||
Id = int.Parse(compositeKeyElements[0]);
|
||||
Tipus = (CsatolmanyTipus)Enum.Parse(typeof(CsatolmanyTipus), compositeKeyElements[1]);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public CsatolmanyTipus Tipus { get; set; }
|
||||
|
||||
public bool Equals(HaziFeladatCsatolmanyUid x, HaziFeladatCsatolmanyUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(HaziFeladatCsatolmanyUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class HaziFeladatKommentUid : IReadonlyUidRaw, IEqualityComparer<HaziFeladatKommentUid>
|
||||
{
|
||||
public HaziFeladatKommentUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public HaziFeladatKommentUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(HaziFeladatKommentUid x, HaziFeladatKommentUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(HaziFeladatKommentUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class HaziFeladatUid : IReadonlyUidRaw, IEqualityComparer<HaziFeladatUid>
|
||||
{
|
||||
public HaziFeladatUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public HaziFeladatUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(HaziFeladatUid x, HaziFeladatUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(HaziFeladatUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class HetirendUid : IReadonlyUidRaw, IEqualityComparer<HetirendUid>
|
||||
{
|
||||
public HetirendUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public HetirendUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(HetirendUid x, HetirendUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(HetirendUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class IntezmenyUid : IReadonlyUidRaw, IEqualityComparer<IntezmenyUid>
|
||||
{
|
||||
public IntezmenyUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public IntezmenyUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(IntezmenyUid x, IntezmenyUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(IntezmenyUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class MulasztasUid : IReadonlyUidRaw, IEqualityComparer<MulasztasUid>
|
||||
{
|
||||
public MulasztasUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public MulasztasUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(MulasztasUid x, MulasztasUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(MulasztasUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class NyelviFeladatGroupUid : IReadonlyUidRaw, IEqualityComparer<NyelviFeladatGroupUid>
|
||||
{
|
||||
public NyelviFeladatGroupUid(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public NyelviFeladatGroupUid(string uidRaw)
|
||||
{
|
||||
Id = Guid.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public Guid Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(NyelviFeladatGroupUid x, NyelviFeladatGroupUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(NyelviFeladatGroupUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Core;
|
||||
using Kreta.Core.Enum;
|
||||
using Kreta.Core.Exceptions;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.Logic;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class OktatasiNevelesiFeladatUid : IReadonlyUidRaw, IEqualityComparer<OktatasiNevelesiFeladatUid>
|
||||
{
|
||||
public OktatasiNevelesiFeladatUid(int? id, OktatasiNevelesiFeladatEnum? oktatasiNevelesiFeladat)
|
||||
{
|
||||
Id = id;
|
||||
OktatasiNevelesiFeladat = oktatasiNevelesiFeladat;
|
||||
UidRaw = UidLogic.Concat(id, oktatasiNevelesiFeladat);
|
||||
}
|
||||
|
||||
public OktatasiNevelesiFeladatUid(string uidRaw)
|
||||
{
|
||||
var compositeKeyElements = UidLogic.GetCompositeKeyElements(uidRaw);
|
||||
if (compositeKeyElements != null)
|
||||
{
|
||||
Id = Extensions.ToNullableInt(compositeKeyElements[0]);
|
||||
OktatasiNevelesiFeladat = Enum.IsDefined(typeof(OktatasiNevelesiFeladatEnum), compositeKeyElements[1]) ? (OktatasiNevelesiFeladatEnum?)Enum.Parse(typeof(OktatasiNevelesiFeladatEnum), compositeKeyElements[1]) : null;
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BlException(BlExceptionType.ValtozoErtekeNemLehetNull);
|
||||
}
|
||||
}
|
||||
|
||||
public int? Id { get; private set; }
|
||||
|
||||
public OktatasiNevelesiFeladatEnum? OktatasiNevelesiFeladat { get; set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(OktatasiNevelesiFeladatUid x, OktatasiNevelesiFeladatUid y) => x == y || (x.Id == y.Id && x.OktatasiNevelesiFeladat == y.OktatasiNevelesiFeladat);
|
||||
|
||||
public int GetHashCode(OktatasiNevelesiFeladatUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class OraiFeladatGroupUid : IReadonlyUidRaw, IEqualityComparer<OraiFeladatGroupUid>
|
||||
{
|
||||
public OraiFeladatGroupUid(Guid id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public OraiFeladatGroupUid(string uidRaw)
|
||||
{
|
||||
Id = Guid.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public Guid Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(OraiFeladatGroupUid x, OraiFeladatGroupUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(OraiFeladatGroupUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.Logic;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class OrarendElemUid : IReadonlyUidRaw, IEqualityComparer<OrarendElemUid>
|
||||
{
|
||||
public OrarendElemUid()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public OrarendElemUid(int id, CalendarOraTypeEnum tipus, DateTime datum)
|
||||
{
|
||||
Id = id;
|
||||
Tipus = tipus;
|
||||
Datum = datum;
|
||||
UidRaw = UidLogic.Concat(id, tipus, datum);
|
||||
}
|
||||
|
||||
public OrarendElemUid(string uidRaw)
|
||||
{
|
||||
var compositeKeyElements = UidLogic.GetCompositeKeyElements(uidRaw);
|
||||
Id = int.Parse(compositeKeyElements[0]);
|
||||
Tipus = (CalendarOraTypeEnum)Enum.Parse(typeof(CalendarOraTypeEnum), compositeKeyElements[1]);
|
||||
Datum = DateTime.Parse(compositeKeyElements[2]).ToLocalTime().Date;
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public int OrarendiOraId { get; set; }
|
||||
|
||||
public int OrarendiOraGroupId { get; set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public CalendarOraTypeEnum Tipus { get; set; }
|
||||
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
public bool Equals(OrarendElemUid x, OrarendElemUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(OrarendElemUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class OrarendUid : IReadonlyUidRaw, IEqualityComparer<OrarendUid>
|
||||
{
|
||||
public OrarendUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public OrarendUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(OrarendUid x, OrarendUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(OrarendUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class OsztalyCsoportUid : IReadonlyUidRaw, IEqualityComparer<OsztalyCsoportUid>
|
||||
{
|
||||
public OsztalyCsoportUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public OsztalyCsoportUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(OsztalyCsoportUid x, OsztalyCsoportUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(OsztalyCsoportUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class OsztalyUid : IReadonlyUidRaw, IEqualityComparer<OsztalyUid>
|
||||
{
|
||||
public OsztalyUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public OsztalyUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(OsztalyUid x, OsztalyUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(OsztalyUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class OsztalyfonokHelyettesUid : IReadonlyUidRaw, IEqualityComparer<OsztalyfonokHelyettesUid>
|
||||
{
|
||||
public OsztalyfonokHelyettesUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public OsztalyfonokHelyettesUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(OsztalyfonokHelyettesUid x, OsztalyfonokHelyettesUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(OsztalyfonokHelyettesUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class OsztalyfonokUid : IReadonlyUidRaw, IEqualityComparer<OsztalyfonokUid>
|
||||
{
|
||||
public OsztalyfonokUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public OsztalyfonokUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(OsztalyfonokUid x, OsztalyfonokUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(OsztalyfonokUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class TanarUid : IReadonlyUidRaw, IEqualityComparer<TanarUid>
|
||||
{
|
||||
public TanarUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public TanarUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(TanarUid x, TanarUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(TanarUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
using Kreta.Ellenorzo.Domain.VN.Logic;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class TanevRendjeUid : IReadonlyUidRaw, IEqualityComparer<TanevRendjeUid>
|
||||
{
|
||||
public TanevRendjeUid(int id, int? osztalyCsoportId)
|
||||
{
|
||||
Id = id;
|
||||
OsztalyCsoportId = osztalyCsoportId;
|
||||
UidRaw = UidLogic.Concat(id, osztalyCsoportId);
|
||||
}
|
||||
|
||||
public TanevRendjeUid(string uidRaw)
|
||||
{
|
||||
var compositeKeyElements = UidLogic.GetCompositeKeyElements(uidRaw);
|
||||
Id = int.Parse(compositeKeyElements[0]);
|
||||
OsztalyCsoportId = int.TryParse(compositeKeyElements[1], out var result) ? (int?)result : null;
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public int? OsztalyCsoportId { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(TanevRendjeUid x, TanevRendjeUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(TanevRendjeUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class TantargyFelosztasUid : IReadonlyUidRaw, IEqualityComparer<TantargyFelosztasUid>
|
||||
{
|
||||
public TantargyFelosztasUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public TantargyFelosztasUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(TantargyFelosztasUid x, TantargyFelosztasUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(TantargyFelosztasUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
[Serializable]
|
||||
public sealed class TantargyUid : IReadonlyUidRaw, IEqualityComparer<TantargyUid>, IEquatable<TantargyUid>
|
||||
{
|
||||
public TantargyUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public TantargyUid(string uidRaw)
|
||||
{
|
||||
// Magatartás, Szorgalom tantárgyak miatt van 0-ás Id
|
||||
Id = int.TryParse(uidRaw, out int result) ? result : 0;
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public TantargyUid()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(TantargyUid x, TantargyUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public bool Equals(TantargyUid y) => this == y || UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(TantargyUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
[Serializable]
|
||||
public class TanuloUid : IReadonlyUidRaw, IEqualityComparer<TanuloUid>
|
||||
{
|
||||
public TanuloUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public TanuloUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(TanuloUid x, TanuloUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(TanuloUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class TelefonUid : IReadonlyUidRaw, IEqualityComparer<TelefonUid>
|
||||
{
|
||||
public TelefonUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public TelefonUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(TelefonUid x, TelefonUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(TelefonUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.Ellenorzo.Domain.VN.Interfaces;
|
||||
|
||||
namespace Kreta.Ellenorzo.Domain.VN.UniqueIdentifier
|
||||
{
|
||||
public class TeremUid : IReadonlyUidRaw, IEqualityComparer<TeremUid>
|
||||
{
|
||||
public TeremUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public TeremUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(TeremUid x, TeremUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(TeremUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue