init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum
|
||||
{
|
||||
public enum ErtekelesErtekFajta
|
||||
{
|
||||
None,
|
||||
[Display(Name = "Elégtelen (1) és Jeles (5) között az öt alapértelmezett érték")]
|
||||
Osztalyzat = 1,
|
||||
[Display(Name = "Szöveges értékelés")]
|
||||
Szoveges = 2,
|
||||
[Display(Name = "Százalékos értékelés")]
|
||||
Szazalekos = 3,
|
||||
[Display(Name = "Rossz, Változó, Jó, Példás")]
|
||||
MagatartasErtek = 4,
|
||||
[Display(Name = "Hanyag, Változó, Jó, Példás")]
|
||||
SzorgalomErtek = 5
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using Kreta.Core.Validation.Exceptions;
|
||||
using Kreta.Core.Validation.Exceptions.Enum;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum
|
||||
{
|
||||
public class NaploEnumCo<T> where T : struct, IConvertible
|
||||
{
|
||||
public static implicit operator NaploEnumCo<T>(int id) => new NaploEnumCo<T>(id);
|
||||
public static implicit operator NaploEnumCo<T>(T enumValue) => new NaploEnumCo<T>(Convert.ToInt32(enumValue));
|
||||
public static bool operator ==(NaploEnumCo<T> lhsWrapperCo, T rhsEnum) => lhsWrapperCo.GetEnum().Equals(rhsEnum);
|
||||
public static bool operator !=(NaploEnumCo<T> lhsWrapperCo, T rhsEnum) => !lhsWrapperCo.GetEnum().Equals(rhsEnum);
|
||||
|
||||
public string EnumTypeNameWPostFix => typeof(T).Name;
|
||||
public string EnumTypeName => EnumTypeNameWPostFix.Replace("Enum", "").Replace("enum", "");
|
||||
public bool IsGeneratedEnum => !string.IsNullOrWhiteSpace(Nev);
|
||||
|
||||
public T GetEnum()
|
||||
{
|
||||
T enumValue;
|
||||
|
||||
if (!System.Enum.TryParse<T>(Nev, out enumValue))
|
||||
{
|
||||
throw new ValidationException(ValidationErrorType.ResourceNotFound, ErrorResource.NemEngedelyezettVagyNemLetezoEnum);
|
||||
}
|
||||
|
||||
return enumValue;
|
||||
}
|
||||
public int Id { get; private set; }
|
||||
public string Nev { get; private set; }
|
||||
|
||||
public NaploEnumCo(int id)
|
||||
{
|
||||
Fill(id);
|
||||
if (!typeof(T).IsEnum)
|
||||
{
|
||||
throw new ArgumentException("T must be an enum");
|
||||
}
|
||||
}
|
||||
|
||||
private void Fill(int id)
|
||||
{
|
||||
Id = id;
|
||||
Nev = System.Enum.GetName(typeof(T), id);
|
||||
if (!typeof(T).IsEnum)
|
||||
{
|
||||
throw new ArgumentException("T must be an enum");
|
||||
}
|
||||
}
|
||||
|
||||
public NaploEnumCo(int id, string nev)
|
||||
{
|
||||
Id = id;
|
||||
Nev = nev;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum
|
||||
{
|
||||
public class NaploEnumListCo<T> where T : struct, IConvertible
|
||||
{
|
||||
private T KretaEnum { get; }
|
||||
public List<NaploEnumListItemCo> ElemLista { get; } = new List<NaploEnumListItemCo>();
|
||||
|
||||
public string EnumTypeNameWPostFix => typeof(T).Name;
|
||||
public string EnumTypeName => EnumTypeNameWPostFix.Replace("Enum", "").Replace("enum", "");
|
||||
|
||||
public NaploEnumListCo()
|
||||
{
|
||||
if (!typeof(T).IsEnum)
|
||||
throw new ArgumentException("T must be an enum");
|
||||
}
|
||||
|
||||
public void Fill(List<KeyValuePair<int, string>> idAndDescriptionList)
|
||||
{
|
||||
foreach (var idAndDescription in idAndDescriptionList)
|
||||
{
|
||||
ElemLista.Add(new NaploEnumListItemCo(idAndDescription.Key, System.Enum.GetName(typeof(T), idAndDescription.Key), idAndDescription.Value));
|
||||
}
|
||||
}
|
||||
public void Fill(int id, string description)
|
||||
{
|
||||
ElemLista.Add(new NaploEnumListItemCo(id, System.Enum.GetName(typeof(T), id), description));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum
|
||||
{
|
||||
public class NaploEnumListItemCo
|
||||
{
|
||||
public int Id { get; }
|
||||
public string Name { get; }
|
||||
public string Description { get; }
|
||||
|
||||
public NaploEnumListItemCo(int Id, string name, string description)
|
||||
{
|
||||
this.Id = Id;
|
||||
this.Name = name;
|
||||
this.Description = description;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum;
|
||||
using Kreta.Enums.ManualEnums.WebApi.Naplo;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Enum
|
||||
{
|
||||
public class EnumRequestCo
|
||||
{
|
||||
public string Hash { get; set; }
|
||||
public NaploEnumCo<EngedelyezettEnumok> EngedelyezettEnum { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Felmentes
|
||||
{
|
||||
public class FelmentesGetRequestCo
|
||||
{
|
||||
public IEnumerable<int> TanuloIds { get; set; }
|
||||
public int FelhasznaloId { get; set; }
|
||||
public int IntezmenyId { get; set; }
|
||||
public string IntezmenyAzonosito { get; set; }
|
||||
public int TanevId { get; set; }
|
||||
public int TantargyId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Felmentes
|
||||
{
|
||||
using System;
|
||||
|
||||
public class FelmentesGetResponseCo
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public bool IsErtekelesAlolFelmentett { get; set; }
|
||||
|
||||
public bool IsOralatogatasAlolFelmentett { get; set; }
|
||||
|
||||
public bool IsSzovegesenErtekelheto { get; set; }
|
||||
|
||||
public string FelmentesOkSzovege { get; set; }
|
||||
|
||||
public DateTime? KezdetDatuma { get; set; }
|
||||
|
||||
public int TantargyId { get; set; }
|
||||
|
||||
public string TantargyNev { get; set; }
|
||||
|
||||
public DateTime? VegDatuma { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.OpenBoard
|
||||
{
|
||||
public class FeltolthetoFajlokSzamaRequestCo
|
||||
{
|
||||
public int? OrarendiOraId { get; set; }
|
||||
public int? TanitasiOraId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using Kreta.Core.Validation.Exceptions;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.OpenBoard
|
||||
{
|
||||
public class FeltolthetoFajlokSzamaResponseCo
|
||||
{
|
||||
public int FeltolthetoFajlokSzama { get; set; }
|
||||
public ValidationException Exception { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.Common
|
||||
{
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Enum;
|
||||
|
||||
public interface IJavasoltJelenletSzuroGetResponseCo
|
||||
{
|
||||
string Megjegyzes { get; set; }
|
||||
|
||||
JavasoltJelenletTemplateType Tipus { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.Common
|
||||
{
|
||||
public interface IJavasoltJelenletTanuloGetResponseCo
|
||||
{
|
||||
int TanuloId { get; set; }
|
||||
List<IJavasoltJelenletSzuroGetResponseCo> JavasoltJelenletTemplateTipusSzuroLista { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.EgyediOra.JavasoltJelenlet
|
||||
{
|
||||
public class JavasoltJelenletGetRequestCo
|
||||
{
|
||||
public JavasoltJelenletKeyGetRequestCo[] Key { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.EgyediOra.JavasoltJelenlet
|
||||
{
|
||||
public class JavasoltJelenletGetResponseCo
|
||||
{
|
||||
public int TantargyId { get; set; }
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
public DateTime OraKezdetDatuma { get; set; }
|
||||
public List<JavasoltJelenletTanuloGetResponseCo> TanuloLista { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.EgyediOra.JavasoltJelenlet
|
||||
{
|
||||
using System;
|
||||
|
||||
public class JavasoltJelenletKeyGetRequestCo
|
||||
{
|
||||
public DateTime OraKezdetDatuma { get; set; }
|
||||
|
||||
public DateTime OraVegDatuma { get; set; }
|
||||
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
|
||||
public int TantargyId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.EgyediOra.JavasoltJelenlet
|
||||
{
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.Common;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Enum;
|
||||
|
||||
public class JavasoltJelenletSzuroGetResponseCo : IJavasoltJelenletSzuroGetResponseCo
|
||||
{
|
||||
public JavasoltJelenletSzuroGetResponseCo(JavasoltJelenletTemplateType tipus)
|
||||
{
|
||||
this.Megjegyzes = Constant.GetMegjegyzesByJavasoltJelenletTemplateType(tipus);
|
||||
this.Tipus = tipus;
|
||||
}
|
||||
|
||||
private JavasoltJelenletSzuroGetResponseCo()
|
||||
{
|
||||
}
|
||||
|
||||
public string Megjegyzes { get; set; }
|
||||
|
||||
public JavasoltJelenletTemplateType Tipus { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.Common;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.EgyediOra.JavasoltJelenlet
|
||||
{
|
||||
public class JavasoltJelenletTanuloGetResponseCo : IJavasoltJelenletTanuloGetResponseCo
|
||||
{
|
||||
public int TanuloId { get; set; }
|
||||
public List<IJavasoltJelenletSzuroGetResponseCo> JavasoltJelenletTemplateTipusSzuroLista { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.JavasoltJelenletTemplate
|
||||
{
|
||||
using Kreta.Enums.ManualEnums;
|
||||
|
||||
public class JavasoltJelenletTemplateGetRequestCo
|
||||
{
|
||||
public string Hash { get; set; }
|
||||
public TanoraAllapotaEnum OraAllapot { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Enum;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.JavasoltJelenletTemplate
|
||||
{
|
||||
public class JavasoltJelenletTemplateGetResponseCo
|
||||
{
|
||||
public int Prioritas { get; set; }
|
||||
public JavasoltJelenletTemplateType Tipus { get; set; }
|
||||
public List<JavasoltJelenletTemplateItemGetResponseCo> SzuroElemLista { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.JavasoltJelenletTemplate
|
||||
{
|
||||
public class JavasoltJelenletTemplateItemGetResponseCo : IEquatable<JavasoltJelenletTemplateItemGetResponseCo>
|
||||
{
|
||||
public JavasoltJelenletTemplateItemGetResponseCo(bool isDefault, bool isEnabled, MulasztasTipusEnum mulasztasTipusAdatszotar)
|
||||
{
|
||||
IsDefault = isDefault;
|
||||
IsEnabled = isEnabled;
|
||||
MulasztasTipusAdatszotar = mulasztasTipusAdatszotar;
|
||||
}
|
||||
|
||||
public bool IsDefault { get; set; }
|
||||
public bool IsEnabled { get; set; }
|
||||
public MulasztasTipusEnum MulasztasTipusAdatszotar { get; set; }
|
||||
|
||||
public bool Equals(JavasoltJelenletTemplateItemGetResponseCo other) => MulasztasTipusAdatszotar == other.MulasztasTipusAdatszotar;
|
||||
|
||||
public override int GetHashCode() => MulasztasTipusAdatszotar.GetHashCode();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.OrarendiOra.JavasoltJelenlet
|
||||
{
|
||||
public class JavasoltJelenletGetRequestCo
|
||||
{
|
||||
public JavasoltJelenletKeyGetRequestCo[] Key { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.OrarendiOra.JavasoltJelenlet
|
||||
{
|
||||
public class JavasoltJelenletGetResponseCo
|
||||
{
|
||||
public int OrarendiOraId { get; set; }
|
||||
public DateTime OraKezdetDatuma { get; set; }
|
||||
public List<JavasoltJelenletTanuloGetResponseCo> TanuloLista { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.OrarendiOra.JavasoltJelenlet
|
||||
{
|
||||
public class JavasoltJelenletKeyGetRequestCo
|
||||
{
|
||||
public int OrarendiOraId { get; set; }
|
||||
public DateTime OraKezdetDatuma { get; set; }
|
||||
public DateTime OraVegDatuma { get; set; }
|
||||
public bool IsHelyettesitesKeresoAltalTalaltOra { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.OrarendiOra.JavasoltJelenlet
|
||||
{
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.Common;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Enum;
|
||||
|
||||
public class JavasoltJelenletSzuroGetResponseCo : IJavasoltJelenletSzuroGetResponseCo
|
||||
{
|
||||
public JavasoltJelenletSzuroGetResponseCo(JavasoltJelenletTemplateType tipus)
|
||||
{
|
||||
this.Megjegyzes = Constant.GetMegjegyzesByJavasoltJelenletTemplateType(tipus);
|
||||
this.Tipus = tipus;
|
||||
}
|
||||
|
||||
private JavasoltJelenletSzuroGetResponseCo()
|
||||
{
|
||||
}
|
||||
|
||||
public string Megjegyzes { get; set; }
|
||||
|
||||
public JavasoltJelenletTemplateType Tipus { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.Common;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.OrarendiOra.JavasoltJelenlet
|
||||
{
|
||||
public class JavasoltJelenletTanuloGetResponseCo : IJavasoltJelenletTanuloGetResponseCo
|
||||
{
|
||||
public int TanuloId { get; set; }
|
||||
public List<IJavasoltJelenletSzuroGetResponseCo> JavasoltJelenletTemplateTipusSzuroLista { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.TanitasiOra.JavasoltJelenlet
|
||||
{
|
||||
public class JavasoltJelenletGetRequestCo
|
||||
{
|
||||
public JavasoltJelenletKeyGetRequestCo[] Key { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.TanitasiOra.JavasoltJelenlet
|
||||
{
|
||||
public class JavasoltJelenletGetResponseCo
|
||||
{
|
||||
public int TanitasiOraId { get; set; }
|
||||
public List<JavasoltJelenletTanuloGetResponseCo> TanuloLista { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.TanitasiOra.JavasoltJelenlet
|
||||
{
|
||||
public class JavasoltJelenletKeyGetRequestCo
|
||||
{
|
||||
public int TanitasiOraId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.TanitasiOra.JavasoltJelenlet
|
||||
{
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.Common;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Enum;
|
||||
|
||||
public class JavasoltJelenletSzuroGetResponseCo : IJavasoltJelenletSzuroGetResponseCo
|
||||
{
|
||||
public JavasoltJelenletSzuroGetResponseCo(JavasoltJelenletTemplateType tipus)
|
||||
{
|
||||
this.Megjegyzes = Constant.GetMegjegyzesByJavasoltJelenletTemplateType(tipus);
|
||||
this.Tipus = tipus;
|
||||
}
|
||||
|
||||
private JavasoltJelenletSzuroGetResponseCo()
|
||||
{
|
||||
}
|
||||
|
||||
public string Megjegyzes { get; set; }
|
||||
|
||||
public JavasoltJelenletTemplateType Tipus { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.Common;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Ora.TanitasiOra.JavasoltJelenlet
|
||||
{
|
||||
public class JavasoltJelenletTanuloGetResponseCo : IJavasoltJelenletTanuloGetResponseCo
|
||||
{
|
||||
public int TanuloId { get; set; }
|
||||
public List<IJavasoltJelenletSzuroGetResponseCo> JavasoltJelenletTemplateTipusSzuroLista { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using System;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Orarend
|
||||
{
|
||||
public class OraGetRequestCo
|
||||
{
|
||||
public string Hash { get; set; }
|
||||
public DateTime Datum { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Orarend
|
||||
{
|
||||
public class OraGetResponseCo
|
||||
{
|
||||
public int? OrarendiOraId { get; set; }
|
||||
public int? TanitasiOraId { get; set; }
|
||||
public NaploEnumCo<TanoraAllapotaEnum> Allapot { get; set; }
|
||||
public DateTime Kezdete { get; set; }
|
||||
public DateTime Vege { get; set; }
|
||||
public int? Oraszam { get; set; }
|
||||
public int? EvesOraszam { get; set; }
|
||||
public bool IsElmaradt { get; set; }
|
||||
public string Tema { get; set; }
|
||||
public int TantargyId { get; set; }
|
||||
public string TantargyNev { get; set; }
|
||||
public string TantargyKategoria { get; set; }
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
public string OsztalyCsoportNev { get; set; }
|
||||
public string TeremNev { get; set; }
|
||||
public string HazifeladatSzovege { get; set; }
|
||||
public int? HazifeladatId { get; set; }
|
||||
public DateTime? HazifeladatHatarido { get; set; }
|
||||
public TanarSimplifiedGetResponseCo OraTulajdonosTanar { get; set; }
|
||||
public int? HelyettesitoId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Orarend
|
||||
{
|
||||
public class TanarSimplifiedGetResponseCo
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Nev { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanar
|
||||
{
|
||||
public class IskolaorRequestCo
|
||||
{
|
||||
public string Hash { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanar
|
||||
{
|
||||
public class IskolaorResponseCo
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Nev { get; set; }
|
||||
public int FeladatEllatasiHelyId { get; set; }
|
||||
public string FeladatEllatasiHely { get; set; }
|
||||
public string EmailCim { get; set; }
|
||||
public string Telefonszam { get; set; }
|
||||
public string IdpEgyediAzonosito { get; set; }
|
||||
public string IntezmenyAzonosito { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanar
|
||||
{
|
||||
public class ProfilRequestCo
|
||||
{
|
||||
public string Hash { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanar
|
||||
{
|
||||
public class ProfilResponseCo
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Nev { get; set; }
|
||||
public string Kep { get; set; }
|
||||
public int FeladatEllatasiHelyId { get; set; }
|
||||
public string FeladatEllatasiHely { get; set; }
|
||||
public string PublikusEmailCim { get; set; }
|
||||
public string MunkahelyiEmailCim { get; set; }
|
||||
public string PublikusTelefonszam { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanmenet
|
||||
{
|
||||
public class TanmenetGetRequestCo
|
||||
{
|
||||
public TanmenetKeyGetRequestCo[] Key { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanmenet
|
||||
{
|
||||
public class TanmenetGetResponseCo
|
||||
{
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
public int TantargyId { get; set; }
|
||||
public int FeltoltoTanarId { get; set; }
|
||||
public List<TanmenetItemGetResponseCo> Items { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanmenet
|
||||
{
|
||||
public class TanmenetItemGetResponseCo
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Megjegyzes { get; set; }
|
||||
public string Nev { get; set; }
|
||||
public string RovidNev { get; set; }
|
||||
public string Tema { get; set; }
|
||||
public int EvesOraszam { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanmenet
|
||||
{
|
||||
public class TanmenetKeyGetRequestCo
|
||||
{
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
public int TantargyId { get; set; }
|
||||
public int FeltoltoTanarId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo
|
||||
{
|
||||
public class ErtekelesFajtaCo
|
||||
{
|
||||
public int? Osztalyzat { get; set; }
|
||||
|
||||
public string Szoveg { get; set; }
|
||||
|
||||
public int? Szazalek { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo
|
||||
{
|
||||
public class ErtekelesGetRequestCo
|
||||
{
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
public int TantargyId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo
|
||||
{
|
||||
public class ErtekelesGetResponseCo
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public ErtekelesFajtaCo Ertekeles { get; set; }
|
||||
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
public NaploEnumCo<ErtekelesTipusEnum> Tipus { get; set; }
|
||||
|
||||
public NaploEnumCo<ErtekelesModEnum> Mod { get; set; }
|
||||
|
||||
public int Suly { get; set; }
|
||||
|
||||
public string Tema { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,125 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo
|
||||
{
|
||||
public class ErtekelesResponseDao
|
||||
{
|
||||
[ColumnName("TipusId")]
|
||||
public int TipusId { get; set; }
|
||||
|
||||
[ColumnName("TipusId_DNAME")]
|
||||
public string TipusNeve { get; set; }
|
||||
|
||||
[ColumnName("Datum")]
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
[ColumnName("ID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ColumnName("ErtekeloId")]
|
||||
public int ErtekeloId { get; set; }
|
||||
|
||||
[ColumnName("ErtekeloNyomtatasiNev")]
|
||||
public string ErtekeloNyomtatasiNev { get; set; }
|
||||
|
||||
[ColumnName("IsMagatartasSzorgalom")]
|
||||
public bool IsMagatartasSzorgalom { get; set; }
|
||||
|
||||
[ColumnName("RogzitesDatum")]
|
||||
public DateTime RogzitesDatum { get; set; }
|
||||
|
||||
[ColumnName("OsztalyCsoportId")]
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesModId")]
|
||||
public int? ErtekelesModId { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesModId_DNAME")]
|
||||
public string ErtekelesModNeve { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesTema")]
|
||||
public string ErtekelesTema { get; set; }
|
||||
|
||||
[ColumnName("TantargyId")]
|
||||
public int? TantargyId { get; set; }
|
||||
|
||||
[ColumnName("TantargyNev")]
|
||||
public string TantargyNev { get; set; }
|
||||
|
||||
[ColumnName("TantargyKategoriaId")]
|
||||
public int? TantargyKategoriaId { get; set; }
|
||||
|
||||
[ColumnName("TantargyKategoriaId_DNAME")]
|
||||
public string TantargyKategoriaNeve { get; set; }
|
||||
|
||||
[ColumnName("IsFotargy")]
|
||||
public bool? IsFotargy { get; set; }
|
||||
|
||||
[ColumnName("SorSzam")]
|
||||
public int? SorSzam { get; set; }
|
||||
|
||||
[ColumnName("FotargyId")]
|
||||
public int? FotargyId { get; set; }
|
||||
|
||||
[ColumnName("FotargyNev")]
|
||||
public string FotargyNev { get; set; }
|
||||
|
||||
[ColumnName("FotargyTantargyKategoriaId")]
|
||||
public int? FotargyTantargyKategoriaId { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesOsztalyzatId_DNAME")]
|
||||
public string ErtekelesOsztalyzatNeve { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesSzoveg")]
|
||||
public string ErtekelesSzoveg { get; set; }
|
||||
|
||||
[ColumnName("SzovegesErtekelesRovidNev")]
|
||||
public string SzovegesErtekelesRovidNev { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesSzovegFormazott")]
|
||||
public string ErtekelesSzovegFormazott { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesSzazalek")]
|
||||
public int? ErtekelesSzazalekErteke { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesOsztalyzatId")]
|
||||
public int? ErtekelesOsztalyzatId { get; set; }
|
||||
|
||||
[ColumnName("ErtekelesSuly")]
|
||||
public int ErtekelesSuly { get; set; }
|
||||
|
||||
[ColumnName("MagatartasOsztalyzatId_DNAME")]
|
||||
public string MagatartasOsztalyzatSzovegesen { get; set; }
|
||||
|
||||
[ColumnName("MagatartasSzoveg")]
|
||||
public string MagatartasSzoveg { get; set; }
|
||||
|
||||
[ColumnName("MagatartasSzovegFormazott")]
|
||||
public string MagatartasSzovegFormazott { get; set; }
|
||||
|
||||
[ColumnName("MagatartasErtekId_DNAME")]
|
||||
public string MagatartasErtekSzovegesen { get; set; }
|
||||
|
||||
[ColumnName("MagatartasOsztalyzatId")]
|
||||
public int? MagatartasOsztalyzatId { get; set; }
|
||||
|
||||
[ColumnName("SzorgalomOsztalyzatId_DNAME")]
|
||||
public string SzorgalomOsztalyzatSzovegesen { get; set; }
|
||||
|
||||
[ColumnName("SzorgalomSzoveg")]
|
||||
public string SzorgalomSzoveg { get; set; }
|
||||
|
||||
[ColumnName("SzorgalomSzovegFormazott")]
|
||||
public string SzorgalomSzovegFormazott { get; set; }
|
||||
|
||||
[ColumnName("SzorgalomErtekId_DNAME")]
|
||||
public string SzorgalomErtekSzoveges { get; set; }
|
||||
|
||||
[ColumnName("SzorgalomOsztalyzatId")]
|
||||
public int? SzorgalomOsztalyzatId { get; set; }
|
||||
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo
|
||||
{
|
||||
public class FeljegyzesRequestCo
|
||||
{
|
||||
public string Hash { get; set; }
|
||||
public int TanoraId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo
|
||||
{
|
||||
public class FeljegyzesResponseCo
|
||||
{
|
||||
public List<FeljegyzesInfoResponseCo> FeljegyzesLista { get; set; }
|
||||
public int TanuloId { get; set; }
|
||||
}
|
||||
|
||||
public class FeljegyzesInfoResponseCo
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public NaploEnumCo<EsemenyTipusEnum> Tipus { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo
|
||||
{
|
||||
public class MulasztasRequestCo
|
||||
{
|
||||
public string Hash { get; set; }
|
||||
public int TanoraId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo
|
||||
{
|
||||
public class MulasztasResponseCo
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public NaploEnumCo<MulasztasTipusEnum> Tipus { get; set; }
|
||||
public int? Keses { get; set; }
|
||||
public int TanuloId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo
|
||||
{
|
||||
using System;
|
||||
|
||||
public class OsztalyTanuloiRequestCo
|
||||
{
|
||||
private DateTime? oraShortDatuma;
|
||||
|
||||
public string Hash { get; set; }
|
||||
|
||||
public DateTime? OraShortDatuma { get => this.oraShortDatuma; set => this.oraShortDatuma = value?.Date; }
|
||||
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo
|
||||
{
|
||||
public class OsztalyTanuloiResponseCo
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Nev { get; set; }
|
||||
public List<TanuloResponseCo> TanuloLista { get; set; } = new List<TanuloResponseCo>();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo
|
||||
{
|
||||
public class TanugyiAdatokGetResponseCo
|
||||
{
|
||||
public bool IsJogviszonySzunetelteto { get; set; }
|
||||
|
||||
public bool IsSzakmaiGyakorlatonLevo { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo
|
||||
{
|
||||
public class TanuloMentessegResponseCo
|
||||
{
|
||||
public int TantargyId { get; set; }
|
||||
public bool IsErtkelesMentesseg { get; set; }
|
||||
public bool IsSzovegesenErtekelheto { get; set; }
|
||||
public bool IsTanoraLatogatasMentesseg { get; set; }
|
||||
|
||||
public TanuloMentessegResponseCo() { }
|
||||
|
||||
public TanuloMentessegResponseCo(int? tantargyId, bool? isErtekelesMentesseg, bool? isSzovegesenErtekelheto, bool? isOraMentesites)
|
||||
{
|
||||
TantargyId = tantargyId.Value;
|
||||
IsErtkelesMentesseg = isErtekelesMentesseg ?? false;
|
||||
IsSzovegesenErtekelheto = isSzovegesenErtekelheto ?? false;
|
||||
IsTanoraLatogatasMentesseg = isOraMentesites ?? false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo
|
||||
{
|
||||
public class TanuloResponseCo
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Nev { get; set; }
|
||||
public string AnyjaNev { get; set; }
|
||||
public DateTime Szuletes { get; set; }
|
||||
public bool IsMaganTanulo { get; set; }
|
||||
public DateTime? MaganTanulosagKezdetDatuma { get; set; }
|
||||
public DateTime? MaganTanulosagVegeDatuma { get; set; }
|
||||
public TanugyiAdatokGetResponseCo TanugyiAdatok { get; set; }
|
||||
public List<TanuloMentessegResponseCo> Felmentesek { get; set; } = new List<TanuloMentessegResponseCo>();
|
||||
|
||||
public TanuloResponseCo() { }
|
||||
|
||||
public TanuloResponseCo(TanuloResponseDao dao)
|
||||
{
|
||||
Id = dao.TanuloId;
|
||||
Nev = dao.NyomtatasiNev;
|
||||
AnyjaNev = dao.AnyjaNeve;
|
||||
Szuletes = dao.SzuletesiDatum;
|
||||
IsMaganTanulo = dao.IsMaganTanulo ?? false;
|
||||
MaganTanulosagKezdetDatuma = dao.MaganTanulosagKezdetDatuma;
|
||||
MaganTanulosagVegeDatuma = dao.MaganTanulosagVegeDatuma;
|
||||
TanugyiAdatok = new TanugyiAdatokGetResponseCo
|
||||
{
|
||||
IsJogviszonySzunetelteto = dao.IsJogviszonySzunetelteto ?? false,
|
||||
IsSzakmaiGyakorlatonLevo = dao.IsSzakmaiGyakorlatonLevo ?? false
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
using System;
|
||||
using Kreta.Core.CustomAttributes;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Get.Tanulo
|
||||
{
|
||||
public class TanuloResponseDao
|
||||
{
|
||||
[ColumnName("TanuloId")]
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
[ColumnName("TanuloNyomtatasiNev")]
|
||||
public string NyomtatasiNev { get; set; }
|
||||
|
||||
[ColumnName("TanuloAnyjaNev")]
|
||||
public string AnyjaNeve { get; set; }
|
||||
|
||||
[ColumnName("TanuloSzuletesiDatum")]
|
||||
public DateTime SzuletesiDatum { get; set; }
|
||||
|
||||
[ColumnName("OsztalyCsoportNev")]
|
||||
public string OsztalyCsoportNev { get; set; }
|
||||
|
||||
[ColumnName("IsMaganTanulo")]
|
||||
public bool? IsMaganTanulo { get; set; }
|
||||
|
||||
[ColumnName("MaganTanulosagKezdetDatuma")]
|
||||
public DateTime? MaganTanulosagKezdetDatuma { get; set; }
|
||||
|
||||
[ColumnName("MaganTanulosagVegeDatuma")]
|
||||
public DateTime? MaganTanulosagVegeDatuma { get; set; }
|
||||
|
||||
[ColumnName("IsJogviszonySzunetelteto")]
|
||||
public bool? IsJogviszonySzunetelteto { get; set; }
|
||||
|
||||
[ColumnName("IsSzakmaiGyakorlatonLevo")]
|
||||
public bool? IsSzakmaiGyakorlatonLevo { get; set; }
|
||||
|
||||
[ColumnName("TantargyId")]
|
||||
public int? TantargyId { get; set; }
|
||||
|
||||
[ColumnName("IsErtekelesMentesseg")]
|
||||
public bool? IsErtekelesMentesseg { get; set; }
|
||||
|
||||
[ColumnName("IsSzovegesenErtekelheto")]
|
||||
public bool? IsSzovegesenErtekelheto { get; set; }
|
||||
|
||||
[ColumnName("IsOraMentesites")]
|
||||
public bool? IsOraMentesites { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Post.Ertekeles
|
||||
{
|
||||
public class ErtekelesRequestCo
|
||||
{
|
||||
public NaploEnumCo<OsztalyzatTipusEnum> OsztalyzatTipus { get; set; }
|
||||
public int? Szazalek { get; set; }
|
||||
public string Szoveg { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Post.Ertekeles
|
||||
{
|
||||
using Kreta.Core.Validation.Exceptions;
|
||||
|
||||
public class ErtekelesResponseCo
|
||||
{
|
||||
public ValidationException Exception { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Post.Ertekeles
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum;
|
||||
using Kreta.Enums;
|
||||
|
||||
public class OsztalyCsoportErtekelesRequestCo
|
||||
{
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
public NaploEnumCo<ErtekelesModEnum> Mod { get; set; }
|
||||
|
||||
public NaploEnumCo<ErtekelesTipusEnum> Tipus { get; set; }
|
||||
|
||||
public string Tema { get; set; }
|
||||
|
||||
public int OsztalyCsoportId { get; set; }
|
||||
|
||||
public int TantargyId { get; set; }
|
||||
|
||||
public List<TanuloForOsztalyCsoportErtekelesRequestCo> TanuloLista { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Post.Ertekeles
|
||||
{
|
||||
public class OsztalyCsoportErtekelesResponseCo
|
||||
{
|
||||
public List<TanuloForOsztalyCsoportErtekelesResponseCo> TanuloLista { get; set; } = new List<TanuloForOsztalyCsoportErtekelesResponseCo>();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Post.Ertekeles
|
||||
{
|
||||
public class TanuloForOsztalyCsoportErtekelesRequestCo
|
||||
{
|
||||
public ErtekelesRequestCo Ertekeles { get; set; }
|
||||
|
||||
public int TanuloId { get; set; }
|
||||
|
||||
public int MobilId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Post.Ertekeles
|
||||
{
|
||||
public class TanuloForOsztalyCsoportErtekelesResponseCo
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ErtekelesId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum;
|
||||
using Kreta.Enums;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Post.Naplozas
|
||||
{
|
||||
public class MulasztasForOraNaplozasRequestCo
|
||||
{
|
||||
public NaploEnumCo<MulasztasTipusEnum> Tipus { get; set; }
|
||||
public int? Keses { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,126 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.BusinessLogic.Logic.Naplozas;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Post.Naplozas
|
||||
{
|
||||
public class OraNaplozasRequestCo : IValidatableObject
|
||||
{
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
public string Hazifeladat { get; set; }
|
||||
|
||||
public DateTime? HazifeladatHatarido { get; set; }
|
||||
|
||||
public int? HazifeladatId { get; set; }
|
||||
|
||||
public bool IsElmaradt { get; set; }
|
||||
|
||||
public int MobilId { get; set; }
|
||||
|
||||
public int? OrarendiOraId { get; set; }
|
||||
|
||||
public DateTime RogzitesDatum { get; set; }
|
||||
|
||||
public int? TanitasiOraId { get; set; }
|
||||
|
||||
public List<TanuloForOraNaplozasRequestCo> TanuloLista { get; set; }
|
||||
|
||||
public string Tema { get; set; }
|
||||
|
||||
public int? CsatolmanyId { get; set; }
|
||||
|
||||
public void ConvertTo(NaplozasMobilCo co)
|
||||
{
|
||||
co.OraAdat.Datum = Datum;
|
||||
co.OraAdat.IsElmaradt = IsElmaradt;
|
||||
co.OraAdat.Tema = Tema;
|
||||
co.OraAdat.OrarendiOraId = OrarendiOraId;
|
||||
co.OraAdat.TanitasiOraId = TanitasiOraId;
|
||||
co.Hazifeladat.Id = HazifeladatId;
|
||||
co.Hazifeladat.Szoveg = Hazifeladat;
|
||||
co.Hazifeladat.Hatarido = HazifeladatHatarido;
|
||||
co.Hazifeladat.CsatolmanyId = CsatolmanyId;
|
||||
co.OraAdat.RogzitesDatuma = RogzitesDatum;
|
||||
foreach (var tanulo in TanuloLista)
|
||||
{
|
||||
var tanuloMulasztas = new NaplozasMobilCo.MulasztasModel
|
||||
{
|
||||
TanuloId = tanulo.Id,
|
||||
MulasztasTipus = tanulo.Mulasztas.Tipus.Id,
|
||||
Keses = tanulo.Mulasztas.Keses
|
||||
};
|
||||
|
||||
foreach (var feljegyzesTipus in tanulo.FeljegyzesTipusLista)
|
||||
{
|
||||
switch (feljegyzesTipus.Id)
|
||||
{
|
||||
case (int)EsemenyTipusEnum.HaziFeladatHiany:
|
||||
tanuloMulasztas.HazifeladatHiany = true;
|
||||
break;
|
||||
case (int)EsemenyTipusEnum.Felszereleshiany:
|
||||
tanuloMulasztas.FelszerelesHiany = true;
|
||||
break;
|
||||
case (int)EsemenyTipusEnum.Dicseret:
|
||||
tanuloMulasztas.TanoraiDicseret = true;
|
||||
break;
|
||||
case (int)EsemenyTipusEnum.SzakmaiMentessegNemHivatalos:
|
||||
tanuloMulasztas.Felmentes = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
co.MulasztasList.Add(tanuloMulasztas);
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
if (HazifeladatHatarido < Datum.Date.AddDays(1))
|
||||
{
|
||||
yield return new ValidationResult(ErrorResource.HazifeladatNemrogzithetoHataridoKorabbiMintAzOraDatuma);
|
||||
}
|
||||
|
||||
if (HazifeladatHatarido < DateTime.Today.AddDays(1))
|
||||
{
|
||||
yield return new ValidationResult(ErrorResource.HazifeladatNemrogzithetoHataridoKorabbiMintAHolnapiNap);
|
||||
}
|
||||
|
||||
if (HazifeladatId.HasValue && string.IsNullOrWhiteSpace(Hazifeladat))
|
||||
{
|
||||
yield return new ValidationResult(OrarendResource.HazifeladatSzovegKotelezo);
|
||||
}
|
||||
|
||||
var occurrenceNumberByPrimaryKey = new Dictionary<int, int>();
|
||||
|
||||
foreach (var tanulo in TanuloLista)
|
||||
{
|
||||
if (occurrenceNumberByPrimaryKey.ContainsKey(tanulo.Id))
|
||||
{
|
||||
occurrenceNumberByPrimaryKey[tanulo.Id]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
occurrenceNumberByPrimaryKey.Add(tanulo.Id, 1);
|
||||
}
|
||||
|
||||
//TODO: késés értékének felső határát is validálni (nagyobb átalakítás)
|
||||
if (tanulo.Mulasztas.Tipus.Id == (int)MulasztasTipusEnum.keses && tanulo.Mulasztas.Keses <= 0)
|
||||
{
|
||||
yield return new ValidationResult(string.Format(ErrorResource.AKesesErtekeNemLehet0, tanulo.Mulasztas.Keses));
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var occurrenceNumberByPrimaryKeyItem in occurrenceNumberByPrimaryKey)
|
||||
{
|
||||
if (occurrenceNumberByPrimaryKeyItem.Value > 1)
|
||||
{
|
||||
yield return new ValidationResult($"A tanuló többször szerepel: {nameof(TanuloForOraNaplozasRequestCo.Id)}={occurrenceNumberByPrimaryKeyItem.Key}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using Kreta.Core.Validation.Exceptions;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Post.Naplozas
|
||||
{
|
||||
public class OraNaplozasResponseCo
|
||||
{
|
||||
public int MobilId { get; set; }
|
||||
public ValidationException Exception { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using System.Collections.Generic;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Enum;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Post.Naplozas
|
||||
{
|
||||
public class TanuloForOraNaplozasRequestCo
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public MulasztasForOraNaplozasRequestCo Mulasztas { get; set; }
|
||||
public List<NaploEnumCo<FeljegyzesTipusEnum>> FeljegyzesTipusLista { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Post.OpenBoard
|
||||
{
|
||||
public class FeltoltottFajlRequestCo
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string ContentAsBase64EncodedString { get; set; }
|
||||
public int? OrarendiOraId { get; set; }
|
||||
public int? TanitasiOraId { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
using Kreta.Core.Validation.Exceptions;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co.Post.OpenBoard
|
||||
{
|
||||
public class FeltoltottFajlResponseCo
|
||||
{
|
||||
public int FeltolthetoFajlokSzama { get; set; }
|
||||
public ValidationException Exception { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Logic;
|
||||
|
||||
namespace Kreta.BusinessLogic.Classes.MobileApi.Naplo.V2.Co
|
||||
{
|
||||
public sealed class ResponseWrapperCo<T> where T : class, new()
|
||||
{
|
||||
public HttpStatusCode StatusCode { get; private set; } = HttpStatusCode.NotFound;
|
||||
public DateTime UtolsoSzinkronDatumUtc { get; } = DateTime.UtcNow;
|
||||
public string Hash => string.IsNullOrWhiteSpace(DatabaseHash + SourceHash) ? null : DatabaseHash + "." + SourceHash;
|
||||
public bool IsHashesOk => IsDatabaseHashOk && IsSourceHashOk;
|
||||
public bool IsDatabaseHashOk
|
||||
=> !string.IsNullOrWhiteSpace(RequestHash) && !string.IsNullOrWhiteSpace(DatabaseHash) && RequestHash.StartsWith(DatabaseHash, StringComparison.CurrentCultureIgnoreCase);
|
||||
public bool IsSourceHashOk
|
||||
=> !string.IsNullOrWhiteSpace(RequestHash) && !string.IsNullOrWhiteSpace(SourceHash) && RequestHash.EndsWith(SourceHash, StringComparison.CurrentCultureIgnoreCase);
|
||||
private string RequestHash { get; }
|
||||
private string DatabaseHash { get; }
|
||||
private string SourceHash { get; set; }
|
||||
public T Adatcsomag { get; private set; } = null;
|
||||
|
||||
private ResponseWrapperCo() { }
|
||||
public ResponseWrapperCo(string requestHash, string databaseHash = null)
|
||||
{
|
||||
RequestHash = requestHash;
|
||||
DatabaseHash = databaseHash;
|
||||
}
|
||||
|
||||
/// <param name="isStrictMode">True: Adatcsomag prop is only assigned if all hash are ok.</param>
|
||||
public void FillData(T adatcsomag, bool isStrictMode = false)
|
||||
{
|
||||
StatusCode = HttpStatusCode.OK;
|
||||
SourceHash = HashLogic.CreateSourceHash(adatcsomag);
|
||||
if (isStrictMode)
|
||||
{
|
||||
Fill(IsHashesOk, adatcsomag);
|
||||
}
|
||||
else
|
||||
{
|
||||
Fill(IsSourceHashOk, adatcsomag);
|
||||
}
|
||||
}
|
||||
|
||||
private void Fill(bool isHashOk, T adatcsomag)
|
||||
{
|
||||
if (isHashOk)
|
||||
{
|
||||
StatusCode = HttpStatusCode.NotModified;
|
||||
}
|
||||
else
|
||||
{
|
||||
Adatcsomag = adatcsomag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue