init
This commit is contained in:
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.Classes.AsposeHelpers;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.HelperClasses.ApaczaiProgramCOs;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.Core;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.Nyomtatvanyok.Logic;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.Nyomtatvanyok.Controllers
|
||||
{
|
||||
public partial class NyomtatvanyokController : BaseNyomtatvanyokController
|
||||
{
|
||||
public ActionResult Apaczai16AlattiESZABelepo2022_23(NyomtatvanyModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
return StaticDocumentNyomtatas(Constants.ApaczaiDokumentumTipusok.Apaczai16AlattiESZABelepo2022_23, "Apaczai_16_alatti_ESZA_belepo_2022_23", NyomtatvanyFormatumEnum.PDF);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw NyomtatvanyokLogic.NyomtatvanyError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public ActionResult Apaczai16AlattiESZAKilepo2022_23(NyomtatvanyModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
return StaticDocumentNyomtatas(Constants.ApaczaiDokumentumTipusok.Apaczai16AlattiESZAKilepo2022_23, "Apaczai_16_alatti_ESZA_kilepo_2022_23", NyomtatvanyFormatumEnum.PDF);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw NyomtatvanyokLogic.NyomtatvanyError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public ActionResult Apaczai16FelettiESZABelepo2022_23(NyomtatvanyModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
return StaticDocumentNyomtatas(Constants.ApaczaiDokumentumTipusok.Apaczai16FelettiESZABelepo2022_23, "Apaczai_16_feletti_ESZA_belepo_2022_23", NyomtatvanyFormatumEnum.PDF);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw NyomtatvanyokLogic.NyomtatvanyError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public ActionResult Apaczai16FelettiESZAKilepo2022_23(NyomtatvanyModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
return StaticDocumentNyomtatas(Constants.ApaczaiDokumentumTipusok.Apaczai16FelettiESZAKilepo2022_23, "Apaczai_16_feletti_ESZA_kilepo_2022_23", NyomtatvanyFormatumEnum.PDF);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw NyomtatvanyokLogic.NyomtatvanyError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public ActionResult ApaczaiHozzajarulasiNyilatkozat2022_23(NyomtatvanyModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
return StaticDocumentNyomtatas(Constants.ApaczaiDokumentumTipusok.ApaczaiHozzajarulasiNyilatkozat2022_23, "Hozzajarulo_nyilatkozat 2022_23", NyomtatvanyFormatumEnum.PDF);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw NyomtatvanyokLogic.NyomtatvanyError(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public ActionResult ApaczaiMentoriTamogatoNyilatkozat2022_23(NyomtatvanyModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (model.TanuloId.IsEntityId())
|
||||
{
|
||||
var tanulohelper = new TanuloHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
var tanulo = tanulohelper.GetTanuloMentorAdatok(model.TanuloId);
|
||||
|
||||
if (tanulo.MentorId.IsEntityId())
|
||||
{
|
||||
var asposeHelper = new AsposeHelper();
|
||||
var asposeMethod = asposeHelper.GetType().GetMethod(nameof(asposeHelper.GetMentorTamogatoiNyilatkozat));
|
||||
var helper = new NyomtatvanyokHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
|
||||
var frxNyomtatvanyNeve = "Mentori_tamogato_nyilatkozat_2022_23.docx";
|
||||
var asposeHelperOptions = new AsposeHelperOptions(ClaimData.SelectedTanevID.Value)
|
||||
{
|
||||
DocumentParameters = new AsposeDocumentParameters()
|
||||
{
|
||||
Kelt = model.KeltDatum,
|
||||
KeltFormatum = (KeltFormatumTipusEnum)model.KeltFormatumId,
|
||||
}
|
||||
};
|
||||
|
||||
if (model.AlulirottMegnevezesId.IsEntityId())
|
||||
{
|
||||
var alulirott = new AlkalmazottMunkaugyiAdatokHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetAlkalmazottByVezetoiOraszamOk(true, nyomtatvanyNyelvEnum: 0, isNemzetisegiDokumentum: false).Where(x => x.Value == model.AlulirottMegnevezesId.ToString()).FirstOrDefault()?.Text;
|
||||
var index = alulirott.LastIndexOf(" - ");
|
||||
var nev = alulirott.Substring(0, index).ReplaceMultipleSpacesAndTrim();
|
||||
var beosztas = alulirott.Substring(index + " - ".Length).ReplaceMultipleSpacesAndTrim();
|
||||
asposeHelperOptions.DocumentParameters.AlairoSzemely = new Dictionary<string, string>()
|
||||
{
|
||||
{"Nev", nev },
|
||||
{"Beosztas", beosztas },
|
||||
};
|
||||
}
|
||||
|
||||
var intezmenyCo = new IntezmenyHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetAktivIntezmenyNevCim();
|
||||
asposeHelperOptions.DocumentParameters.TagintezmenyNeve = intezmenyCo.Nev;
|
||||
asposeHelperOptions.DocumentParameters.TagintezmenyCime = intezmenyCo.IntezmenyCim;
|
||||
asposeHelperOptions.DocumentParameters.TagintezmenyVaros = intezmenyCo.Varos;
|
||||
asposeHelperOptions.DocumentParameters.TagintezmenyAzonosito = intezmenyCo.OMKod;
|
||||
|
||||
asposeHelperOptions.DocumentParameters.Entity = tanulo;
|
||||
|
||||
return Nyomtatas(null, frxNyomtatvanyNeve, null, "Mentori_tamogato_nyilatkozat_2022_23", model.Iktatas, formatumId: model.FormatumId, osztalyId: null, dokumentumKategoria: null, dokumentumTipus: null, kulcsSzavak: null, foszamDefinicio: null, egyediLablecKellOldalszam: false, IsAspose: true, asposeMetodus: asposeMethod, asposeHelperOptions: asposeHelperOptions);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception(NyomtatvanyokResource.TanulohozNincsMentorHozzarendelve);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
throw new Exception(NyomtatvanyokResource.NemTartalmazRelevansAdatokat);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw NyomtatvanyokLogic.NyomtatvanyError(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user