30 lines
1.1 KiB
C#
30 lines
1.1 KiB
C#
using System.Data;
|
|
using System.Web.Http;
|
|
using System.Web.Http.ModelBinding;
|
|
using Kendo.Mvc.UI;
|
|
using Kreta.BusinessLogic.Helpers;
|
|
using Kreta.BusinessLogic.Security;
|
|
using Kreta.Web.Areas.Tanulo.Models;
|
|
using Kreta.Web.Helpers;
|
|
using Kreta.Web.Helpers.Grid;
|
|
using Kreta.Web.Security;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace Kreta.Web.Areas.Tanulo.ApiControllers
|
|
{
|
|
[ApiRoleClaimsAuthorize(true)]
|
|
[ApiRolePackageAuthorize(KretaClaimPackages.Tanar.ClaimValue)]
|
|
public class TanarNemTanitottTanulokApiController : ApiController
|
|
{
|
|
public DataSourceResult GetTanarNemTanitottTanulokGrid(string data, [ModelBinder(typeof(ModelBinder.DataSourceRequestModelBinder))] DataSourceRequest request)
|
|
{
|
|
var model = JsonConvert.DeserializeObject<TanarNemTanitottTanulokSearchModel>(data);
|
|
|
|
var helper = new TanarHelper(ConnectionTypeExtensions.GetSessionConnectionType());
|
|
helper.GridParameters = Converter.GridParameter(request);
|
|
DataSet ds = helper.GetTanarNemTanitottTanulok(model.OsztalyCsoportID.HasValue ? model.OsztalyCsoportID : null);
|
|
|
|
return ds.ToDataSourceResult();
|
|
}
|
|
}
|
|
}
|