init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,53 @@
|
|||
using System.Web.Http;
|
||||
using System.Web.Http.ModelBinding;
|
||||
using Kendo.Mvc.Extensions;
|
||||
using Kendo.Mvc.UI;
|
||||
using Kreta.BusinessLogic.Helpers;
|
||||
using Kreta.BusinessLogic.Security;
|
||||
using Kreta.Client.Eugyintezes.Configuration;
|
||||
using Kreta.Core.FileService;
|
||||
using Kreta.Web.Areas.Intezmeny.Logic;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Helpers.Grid;
|
||||
using Kreta.Web.Security;
|
||||
|
||||
namespace Kreta.Web.Areas.Intezmeny.ApiControllers
|
||||
{
|
||||
[ApiRoleClaimsAuthorize(true)]
|
||||
[ApiRolePackageAuthorize(KretaClaimPackages.Adminisztrator.ClaimValue, KretaClaimPackages.Dualis_Admin.ClaimValue)]
|
||||
public class TeremApiController : BaseTeremApiController
|
||||
{
|
||||
public TeremApiController(IFileService fileService, IEugyintezesClientConfiguration eugyintezesClientConfiguration)
|
||||
: base(fileService, eugyintezesClientConfiguration)
|
||||
{
|
||||
}
|
||||
|
||||
public DataSourceResult GetTeremEszkozei(string teremID, [ModelBinder(typeof(ModelBinder.DataSourceRequestModelBinder))] DataSourceRequest request)
|
||||
{
|
||||
var eszkozHelper = new EszkozHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
||||
eszkozHelper.GridParameters = Converter.GridParameter(request);
|
||||
var eszkozok = eszkozHelper.GetEszkozokForTerem(int.Parse(teremID));
|
||||
|
||||
return eszkozok.ToDataSourceResult();
|
||||
}
|
||||
|
||||
public DataSourceResult GetTeremBerbeadasIdopontjai(int teremId)
|
||||
{
|
||||
var berbeadasIdopontjai = new TeremHelper(ConnectionTypeExtensions.GetSessionConnectionType()).GetTeremBerbeadasIdopontjai(teremId);
|
||||
|
||||
return berbeadasIdopontjai.ToDataSourceResult();
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IHttpActionResult GetPicture(int? teremId, [ModelBinder(typeof(ModelBinder.DataSourceRequestModelBinder))] DataSourceRequest request)
|
||||
{
|
||||
return Json(TeremLogic.GetPicture(FileService, teremId).ToDataSourceResult(request));
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public (string FajNev, byte[] Content) GetDocument(int? teremId)
|
||||
{
|
||||
return TeremLogic.GetDocument(FileService, teremId);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue