init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,41 @@
|
|||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Web.Http;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Web.Areas.Kerdoiv.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.Kerdoiv.ApiControllers
|
||||
{
|
||||
[ApiRoleClaimsAuthorize(true)]
|
||||
[ApiRolePackageAuthorize(KretaClaimPackages.Tanar.ClaimValue, KretaClaimPackages.Osztalyfonok.ClaimValue, KretaClaimPackages.SzuperOsztalyfonok.ClaimValue)]
|
||||
public class NatKerdoivApiController : ApiController
|
||||
{
|
||||
|
||||
[HttpPost]
|
||||
[ApiValidateAjaxAntiForgeryToken]
|
||||
public HttpResponseMessage Save(NatKerdoivModel model)
|
||||
{
|
||||
ModelState.Merge(model.Validate());
|
||||
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
var helper = new KerdoivHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
helper.Save(model.ToCo());
|
||||
return new HttpResponseMessage(HttpStatusCode.OK);
|
||||
}
|
||||
return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[ApiValidateAjaxAntiForgeryToken]
|
||||
public HttpResponseMessage SetNatKerdoivIsLattamTrue()
|
||||
{
|
||||
var helper = new KerdoivHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
helper.SetNatKerdoivIsLattamTrue();
|
||||
return new HttpResponseMessage(HttpStatusCode.OK);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue