You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.3 KiB
33 lines
1.3 KiB
//using System.Linq;
|
|
//using Application.Domain.Entities;
|
|
//using Application.Models;
|
|
//using Infrastructure.Data;
|
|
//using Infrastructure.Extensions;
|
|
//using Infrastructure.Web.Mvc;
|
|
//using IoTShared.Controllers;
|
|
//using Microsoft.AspNetCore.Authorization;
|
|
//using Microsoft.AspNetCore.Mvc;
|
|
|
|
//namespace IoTCenter.Areas.Admin.Controllers
|
|
//{
|
|
// [Authorize]
|
|
// [Area(nameof(Admin))]
|
|
// public class ApiController : CrudController<Api, ApiSearchModel, EditApiModel, EditApiModel>
|
|
// {
|
|
// private readonly AjaxController _ajax;
|
|
|
|
// public ApiController(IRepository<Api> repo, AjaxController ajax) : base(repo)
|
|
// {
|
|
// this._ajax = ajax;
|
|
// }
|
|
|
|
// public override IQueryable<Api> Query(ApiSearchModel model, IQueryable<Api> query)
|
|
// {
|
|
// ViewData.SelectList(o => model.NodeId, () => this._ajax.GetNodeSelectList(model.NodeId));
|
|
// ViewData.SelectList(o => model.DeviceId, () => this._ajax.GetDeviceSelectList(model.NodeId.Value, model.DeviceId), model.NodeId.HasValue);
|
|
// return query.WhereIf(model.NodeId.HasValue, o => o.Device.NodeId == model.NodeId.Value)
|
|
// .WhereIf(model.DeviceId.HasValue, o => o.DeviceId == model.DeviceId.Value)
|
|
// .WhereIf(!string.IsNullOrEmpty(model.Keyword), o => o.Name.Contains(model.Keyword));
|
|
// }
|
|
// }
|
|
//} |