init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
|
@ -0,0 +1,38 @@
|
|||
using System.Collections.Generic;
|
||||
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.OsztalyCsoport.Models;
|
||||
using Kreta.Web.Helpers;
|
||||
using Kreta.Web.Helpers.Grid;
|
||||
using Kreta.Web.Security;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kreta.Web.Areas.OsztalyCsoport.ApiControllers
|
||||
{
|
||||
[ApiRoleClaimsAuthorize(true)]
|
||||
[ApiRolePackageAuthorize(KretaClaimPackages.AMImodul.ClaimValue)]
|
||||
public class AmiBesorolasModOsztalybolKiirtTanulokApiController : ApiController
|
||||
{
|
||||
public DataSourceResult GetAmiBesorolasModOsztalybolKiirtTanulokGrid(string data, [ModelBinder(typeof(ModelBinder.DataSourceRequestModelBinder))] DataSourceRequest request)
|
||||
{
|
||||
var model = JsonConvert.DeserializeObject<AmiBesorolasSearchModel>(data);
|
||||
var co = model.ConvertToCo();
|
||||
var gridParameter = Converter.GridParameter(request);
|
||||
var helper = new TanuloHelper(ConnectionTypeExtensions.GetActiveSessionConnectionType());
|
||||
var coList = helper.GetKiirtTanulokEsOsztalyokGridItemCoList(co);
|
||||
|
||||
var modelList = new List<AmiBesorolasGridModel>();
|
||||
|
||||
foreach (var item in coList)
|
||||
{
|
||||
var gridModel = new AmiBesorolasGridModel(item);
|
||||
modelList.Add(gridModel);
|
||||
}
|
||||
|
||||
return modelList.ToDataSourceResult(gridParameter);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue