init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,75 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Web.Mvc;
|
||||
using Kreta.BusinessLogic.HelperClasses;
|
||||
using Kreta.BusinessLogic.Utils;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Resources;
|
||||
using Kreta.Web.Areas.Adminisztracio.Models;
|
||||
using Kreta.Web.Areas.Nyomtatvanyok.Logic;
|
||||
using Kreta.Web.Classes;
|
||||
using Kreta.Web.Helpers.Error;
|
||||
using Kreta.Web.Helpers.ReCaptcha;
|
||||
using Kreta.Web.Models;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.Adminisztracio.Controllers
|
||||
{
|
||||
[AllowAnonymous]
|
||||
[MvcCsokkentettGondviseloAccess]
|
||||
public class GondviseloJelszoIgenyloController : Controller
|
||||
{
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View(new GondviseloJelszoIgenyloModel
|
||||
{
|
||||
FormSettings = new List<string>() {
|
||||
CimElerhetosegConstant.CimSectionVisible,
|
||||
CimElerhetosegConstant.EmailSectionVisible,
|
||||
CimElerhetosegConstant.IsNew,
|
||||
CimElerhetosegConstant.AllandoLakcimCimTipus
|
||||
},
|
||||
TanulovalEgyezik = false,
|
||||
IsGondviseloJelszoIgenylo = true,
|
||||
CimTipus = (int)CimTipusEnum.allando_lakcim,
|
||||
ComboBoxApiControllerName = Constants.ApiControllers.GondviseloJelszoIgenyloApi,
|
||||
EmailcimKotelezo = true
|
||||
});
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public JsonResult GondviseloJelszoIgenyles(GondviseloJelszoIgenyloModel model)
|
||||
{
|
||||
if (!model.AdatvedelmiTajekozatatoCheck)
|
||||
{
|
||||
ModelState.AddModelError("AdatvedelmiTajekozatatoCheck", ErrorResource.AdatvedelmiElfogadasHibaUzenet);
|
||||
}
|
||||
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
Response.StatusCode = 400;
|
||||
Response.TrySkipIisCustomErrors = true;
|
||||
|
||||
var modelErrors = ModelState.AllErrors();
|
||||
return Json(modelErrors);
|
||||
}
|
||||
|
||||
var captcha = ReCaptchaValidator.Validate(model.ReCaptcha);
|
||||
|
||||
if (!captcha.Success)
|
||||
{
|
||||
return Json(new IsSuccessResponseCo(false, string.Join(",", captcha.ErrorCodes)));
|
||||
}
|
||||
|
||||
using (var loginManager = new LoginManager())
|
||||
{
|
||||
var result = loginManager.GondviseloJelszoIgenyles(model.ConvertToCo());
|
||||
return Json(result);
|
||||
}
|
||||
}
|
||||
|
||||
public string PdfLetoltes(GondviseloJelszoIgenyloModel model)
|
||||
{
|
||||
return NyomtatvanyokLogic.GetFileLetoltesUrlGondviseo(model.ConvertToCo(), CommonUtils.GetAktualisTanevId(ClaimData.FelhasznaloId));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue