Former-commit-id: 00e544272b5367652a488505ba7e5b49621dadb7
Former-commit-id: ab52db06f330ec2d4d18bf1bc14164065f321e51
1.0
wanggang 5 years ago
parent cef2f98cdb
commit f8cb0368ee

@ -47,6 +47,7 @@ namespace Infrastructure.Web.Mvc
.Select(o =>
{
var m = o.To<TEditModel>();
this.EntityToModel(o,m);
this.ToDisplayModel(o, m);
return m;
})
@ -62,6 +63,7 @@ namespace Infrastructure.Web.Mvc
query = this.Include(query);
var entity = query.FirstOrDefault(o => o.Id == id);
var model = entity.To<TEditModel>();
this.EntityToModel(entity,model);
this.ToDisplayModel(entity, model);
return Result(model);
}
@ -136,6 +138,7 @@ namespace Infrastructure.Web.Mvc
query = this.Include(query);
var entity = query.FirstOrDefault(o => o.Id == id);
var model = entity.To<TEditModel>();
this.EntityToModel(entity,model);
this.ToEditModel(entity, model);
return Result(model);
}
@ -164,6 +167,7 @@ namespace Infrastructure.Web.Mvc
ModelState.AddModelError("", ex.Message);
}
}
this.EntityToModel(entity,model);
this.ToEditModel(entity, model);
return Result(model);
}
@ -256,6 +260,11 @@ namespace Infrastructure.Web.Mvc
return query;
}
public virtual void EntityToModel(TEntity entity, TEditModel model)
{
}
[ApiExplorerSettings(IgnoreApi = true)]
public virtual void ToEditModel(TEntity entity, TEditModel model)
{

@ -11,7 +11,7 @@ namespace IoT.Shared.Application.Models
[ReadOnlyForEdit]
[SelectList]
[Required(ErrorMessage = nameof(RequiredAttribute))]
public Guid? ProductId { get; set; }
public Guid? IoTProductId { get; set; }
[Display(Name = "名称")]
[ReadOnlyForEdit]

@ -33,9 +33,9 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
public override IQueryable<IoTApi> Query(PagedListModel<EditIoTApiModel> model, IQueryable<IoTApi> query)
{
ViewData.SelectList(o => model.Query.ProductId, () => this._ajax.GetIoTProduct(model.Query.ProductId).SelectList());
ViewData.SelectList(o => model.Query.IoTProductId, () => this._ajax.GetIoTProduct(model.Query.IoTProductId).SelectList());
return query
.WhereIf(model.Query.ProductId.HasValue, o => o.IoTProductId == model.Query.ProductId.Value)
.WhereIf(model.Query.IoTProductId.HasValue, o => o.IoTProductId == model.Query.IoTProductId.Value)
.WhereIf(!string.IsNullOrEmpty(model.Query.Name), o => o.Name.Contains(model.Query.Name))
.WhereIf(!string.IsNullOrEmpty(model.Query.Path), o => o.Path.Contains(model.Query.Path))
.WhereIf(!string.IsNullOrEmpty(model.Query.Command), o => o.Command.Contains(model.Query.Command))
@ -44,13 +44,13 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
public override void ToDisplayModel(IoTApi entity, EditIoTApiModel model)
{
ViewData.Add(model.ProductId, entity?.Product?.Name);
ViewData.Add(model.IoTProductId, entity?.Product?.Name);
}
public override void ToEditModel(IoTApi entity, EditIoTApiModel model)
{
this.ToDisplayModel(entity, model);
ViewData.SelectList(o => model.ProductId, () => this._ajax.GetIoTProduct(model.ProductId).SelectList());
ViewData.SelectList(o => model.IoTProductId, () => this._ajax.GetIoTProduct(model.IoTProductId).SelectList());
}
}
}

@ -10,7 +10,7 @@ namespace Platform.Application.Models.IoTCenter
{
[Display(Name = "分类")]
[ReadOnlyForEdit]
[SelectList(nameof(ProductId), nameof(AjaxController.GetIoTProductByCategory))]
public Guid? CategoryId { get; set; }
[SelectList(nameof(IoTProductId), nameof(AjaxController.GetIoTProductByCategory))]
public Guid? IoTProductCategoryId { get; set; }
}
}

@ -37,46 +37,49 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
public override IQueryable<IoTApi> Query(PagedListModel<EditPlatformIoTApiModel> model, IQueryable<IoTApi> query)
{
ViewData.SelectList(o => model.Query.ProductId, () => this._ajax.GetIoTProduct(model.Query.ProductId).SelectList());
ViewData.SelectList(o => model.Query.IoTProductId, () => this._ajax.GetIoTProduct(model.Query.IoTProductId).SelectList());
return query
.WhereIf(model.Query.CategoryId.HasValue, o => o.Product.IoTProductCategoryId == model.Query.CategoryId.Value)
.WhereIf(model.Query.ProductId.HasValue, o => o.IoTProductId == model.Query.ProductId.Value)
.WhereIf(model.Query.IoTProductCategoryId.HasValue, o => o.Product.IoTProductCategoryId == model.Query.IoTProductCategoryId.Value)
.WhereIf(model.Query.IoTProductId.HasValue, o => o.IoTProductId == model.Query.IoTProductId.Value)
.WhereIf(!string.IsNullOrEmpty(model.Query.Name), o => o.Name.Contains(model.Query.Name))
.WhereIf(!string.IsNullOrEmpty(model.Query.Path), o => o.Path.Contains(model.Query.Path))
.WhereIf(!string.IsNullOrEmpty(model.Query.Command), o => o.Command.Contains(model.Query.Command))
.WhereIf(!string.IsNullOrEmpty(model.Query.Method), o => o.Method.Contains(model.Query.Method));
}
public override void EntityToModel(IoTApi entity, EditPlatformIoTApiModel model)
{
model.IoTProductCategoryId = entity?.Product?.IoTProductCategoryId;
}
public override void ToDisplayModel(IoTApi entity, EditPlatformIoTApiModel model)
{
model.CategoryId = entity?.Product?.IoTProductCategoryId;
if (entity != null)
{
ViewData.Add(model.ProductId.Value, entity.Product.Name);
ViewData.Add(model.IoTProductId.Value, entity.Product?.Name);
}
if (model.CategoryId.HasValue)
if (model.IoTProductCategoryId.HasValue)
{
var name = this._categoryRepo.ReadOnlyTable()
.Where(o => o.ParentId != null)
.Where(o => o.Left <= entity.Product.IoTProductCategory.Left && o.Right >= entity.Product.IoTProductCategory.Right)
.ToList()
.ToTree()
.FirstOrDefault(o => o.Id == model.CategoryId.Value)?.GetDisplayName();
ViewData.Add(model.CategoryId.Value, name);
.FirstOrDefault(o => o.Id == model.IoTProductCategoryId.Value)?.GetDisplayName();
ViewData.Add(model.IoTProductCategoryId.Value, name);
}
}
public override void ToEditModel(IoTApi entity, EditPlatformIoTApiModel model)
{
model.CategoryId = entity?.Product?.IoTProductCategoryId;
ViewData.SelectList(o => model.CategoryId, () => this._ajax.GetIoTProductCategory(model.CategoryId).SelectList());
if (model.CategoryId.HasValue)
ViewData.SelectList(o => model.IoTProductCategoryId, () => this._ajax.GetIoTProductCategory(model.IoTProductCategoryId).SelectList());
if (model.IoTProductCategoryId.HasValue)
{
ViewData.SelectList(o => model.ProductId, () => this._ajax.GetIoTProductByCategory(model.CategoryId.Value, model.ProductId).SelectList());
ViewData.SelectList(o => model.IoTProductId, () => this._ajax.GetIoTProductByCategory(model.IoTProductCategoryId.Value, model.IoTProductId).SelectList());
}
else
{
ViewData.Add(model.ProductId, entity?.Product?.Name);
ViewData.Add(model.IoTProductId, entity?.Product?.Name);
}
}
}

@ -106,14 +106,15 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
return PartialView("_Code", model);
}
public override void EntityToModel(IoTCommand entity, EditIoTCommandModel model)
{
model.IoTGatewayId = entity.IoTDevice?.IoTGatewayId;
model.BuildingId = entity.IoTDevice?.IoTGateway?.BuildingId;
model.OrganId = entity.IoTDevice?.IoTGateway?.Building?.OrganId;
}
public override void ToDisplayModel(IoTCommand entity, EditIoTCommandModel model)
{
if (entity != null)
{
model.IoTGatewayId = entity.IoTDevice?.IoTGatewayId;
model.BuildingId = entity.IoTDevice?.IoTGateway?.BuildingId;
model.OrganId = entity.IoTDevice?.IoTGateway?.Building?.OrganId;
}
if (model.BuildingId.HasValue)
{
var name = this._buildingRepo.ReadOnlyTable()
@ -150,12 +151,6 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
public override void ToEditModel(IoTCommand entity, EditIoTCommandModel model)
{
if (entity != null)
{
model.IoTGatewayId = entity.IoTDevice?.IoTGatewayId;
model.BuildingId = entity.IoTDevice?.IoTGateway?.BuildingId;
model.OrganId = entity.IoTDevice?.IoTGateway?.Building?.OrganId;
}
ViewData.SelectList(o => model.OrganId, () => this._ajax.GetOrgan(model.OrganId).SelectList());
ViewData.SelectList(o => model.BuildingId, () => this._ajax.GetBuilding(model.OrganId.Value, model.BuildingId).SelectList(), model.OrganId.HasValue);
ViewData.SelectList(o => model.IoTGatewayId, () => this._ajax.GetIoTGatewayByBuilding(model.BuildingId.Value, model.IoTGatewayId).SelectList(), model.BuildingId.HasValue);

@ -74,16 +74,17 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
.OrderBy(o => o.IoTDevice.IoTProductId).ThenBy(o => o.IoTDevice.IoTGatewayId).ThenBy(o => o.IoTDeviceId);
}
public override void EntityToModel(IoTData entity, EditPlatformIoTDataModel model)
{
model.ProductId = entity.IoTDevice?.IoTProductId;
model.CategoryId = entity.IoTDevice?.IoTProduct?.IoTProductCategoryId;
model.IoTGatewayId = entity.IoTDevice?.IoTGatewayId;
model.BuildingId = entity.IoTDevice?.IoTGateway?.BuildingId;
model.OrganId = entity.IoTDevice?.IoTGateway?.Building?.OrganId;
}
public override void ToDisplayModel(IoTData entity, EditPlatformIoTDataModel model)
{
if (entity != null)
{
model.ProductId = entity.IoTDevice.IoTProductId;
model.CategoryId = entity.IoTDevice.IoTProduct.IoTProductCategoryId;
model.IoTGatewayId = entity.IoTDevice.IoTGatewayId;
model.BuildingId = entity.IoTDevice.IoTGateway.BuildingId;
model.OrganId = entity.IoTDevice.IoTGateway.Building.OrganId;
}
if (model.BuildingId.HasValue)
{
var name = this._buildingRepo.ReadOnlyTable()
@ -130,12 +131,6 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
public override void ToEditModel(IoTData entity, EditPlatformIoTDataModel model)
{
if (entity != null)
{
model.BuildingId = entity.IoTDevice.IoTGateway.BuildingId;
model.OrganId = entity.IoTDevice.IoTGateway.Building.OrganId;
model.CategoryId = entity.IoTDevice.IoTProduct.IoTProductCategoryId;
}
ViewData.SelectList(o => model.OrganId, () => this._ajax.GetOrgan(model.OrganId).SelectList());
ViewData.SelectList(o => model.BuildingId, () => this._ajax.GetBuilding(model.OrganId.Value, model.BuildingId).SelectList(), model.OrganId.HasValue);
ViewData.SelectList(o => model.IoTGatewayId, () => this._ajax.GetIoTGatewayByBuilding(model.BuildingId.Value, model.IoTGatewayId).SelectList(), model.BuildingId.HasValue);

@ -69,14 +69,15 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
.WhereIf(model.Query.Disabled.HasValue, o => o.Disabled == model.Query.Disabled.Value);
}
public override void EntityToModel(IoTDevice entity, EditPlatformIoTDeviceModel model)
{
model.BuildingId = entity.IoTGateway?.BuildingId;
model.OrganId = entity.IoTGateway?.Building?.OrganId;
model.CategoryId = entity.IoTProduct?.IoTProductCategoryId;
}
public override void ToDisplayModel(IoTDevice entity, EditPlatformIoTDeviceModel model)
{
if (entity != null)
{
model.BuildingId = entity.IoTGateway.BuildingId;
model.OrganId = entity.IoTGateway.Building.OrganId;
model.CategoryId = entity.IoTProduct.IoTProductCategoryId;
}
if (model.BuildingId.HasValue)
{
var name = this._buildingRepo.ReadOnlyTable()
@ -119,12 +120,6 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
public override void ToEditModel(IoTDevice entity, EditPlatformIoTDeviceModel model)
{
if (entity != null)
{
model.BuildingId = entity.IoTGateway.BuildingId;
model.OrganId = entity.IoTGateway.Building.OrganId;
model.CategoryId = entity.IoTProduct.IoTProductCategoryId;
}
ViewData.SelectList(o => model.OrganId, () => this._ajax.GetOrgan(model.OrganId).SelectList());
ViewData.SelectList(o => model.BuildingId, () => this._ajax.GetBuilding(model.OrganId.Value, model.BuildingId).SelectList(), model.OrganId.HasValue);
ViewData.SelectList(o => model.CategoryId, () => this._ajax.GetIoTProductCategory(model.CategoryId).SelectList());

@ -54,12 +54,13 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
.WhereIf(model.Query.Hidden.HasValue, o => o.Hidden == model.Query.Hidden.Value);
}
public override void EntityToModel(IoTGateway entity, EditPlatformIoTGatewayModel model)
{
model.OrganId = entity?.Building?.OrganId;
}
public override void ToDisplayModel(IoTGateway entity, EditPlatformIoTGatewayModel model)
{
if(entity!=null)
{
model.OrganId = entity?.Building?.OrganId;
}
if (model.BuildingId.HasValue)
{
var name = this._buildingRepo.ReadOnlyTable()
@ -84,10 +85,6 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
public override void ToEditModel(IoTGateway entity, EditPlatformIoTGatewayModel model)
{
if(entity!=null)
{
model.OrganId = entity?.Building?.OrganId;
}
ViewData.SelectList(o => model.OrganId, () => this._ajax.GetOrgan(model.OrganId).SelectList());
ViewData.SelectList(o => model.BuildingId, () => this._ajax.GetBuilding(model.OrganId.Value, model.BuildingId).SelectList(),model.OrganId.HasValue);
}

@ -48,13 +48,15 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
.WhereIf(!string.IsNullOrEmpty(model.Query.Minimum), o => o.Minimum == model.Query.Minimum)
.WhereIf(!string.IsNullOrEmpty(model.Query.Maxinum), o => o.Maxinum == model.Query.Maxinum);
}
public override void EntityToModel(IoTParameter entity, EditPlatformIoTParameterModel model)
{
model.ProductId = entity.IoTApi.IoTProductId;
model.CategoryId = entity.IoTApi.Product.IoTProductCategoryId;
}
public override void ToDisplayModel(IoTParameter entity, EditPlatformIoTParameterModel model)
{
if (entity != null)
{
model.ProductId = entity.IoTApi.IoTProductId;
model.CategoryId = entity.IoTApi.Product.IoTProductCategoryId;
ViewData.Add(model.ApiId, entity.IoTApi.Name);
}
if (model.CategoryId.HasValue)
@ -75,11 +77,6 @@ namespace IoT.Shared.Areas.IoTCenter.Controlls
public override void ToEditModel(IoTParameter entity, EditPlatformIoTParameterModel model)
{
if(entity!=null)
{
model.ProductId = entity.IoTApi.IoTProductId;
model.CategoryId = entity.IoTApi.Product.IoTProductCategoryId;
}
ViewData.SelectList(o => model.CategoryId, () => this._ajax.GetIoTProductCategory(model.CategoryId).SelectList());
ViewData.SelectList(o => model.ProductId, () => this._ajax.GetIoTProductByCategory(model.CategoryId.Value, model.ProductId).SelectList(), model.CategoryId.HasValue);
ViewData.SelectList(o => model.ApiId, () => this._ajax.GetIoTApi(model.ProductId.Value, model.ApiId).SelectList(), model.ProductId.HasValue);

@ -50,12 +50,13 @@ namespace Platform.Areas.IoTCenter.Controllers
.OrderBy(o => o.DisplayOrder);
}
public override void EntityToModel(IoTScene entity, EditIoTSceneModel model)
{
model.OrganId = entity.Building.OrganId;
}
public override void ToDisplayModel(IoTScene entity, EditIoTSceneModel model)
{
if(entity!=null)
{
model.OrganId = entity.Building.OrganId;
}
if (model.BuildingId.HasValue)
{
var name = this._buildingRepo.ReadOnlyTable()
@ -80,10 +81,6 @@ namespace Platform.Areas.IoTCenter.Controllers
public override void ToEditModel(IoTScene entity, EditIoTSceneModel model)
{
if (entity != null)
{
model.OrganId = entity.Building.OrganId;
}
ViewData.SelectList(o => model.OrganId, () => this._ajax.GetOrgan(model.OrganId).SelectList());
ViewData.SelectList(o => model.BuildingId, () => this._ajax.GetBuilding(model.OrganId.Value, model.BuildingId).SelectList(), model.OrganId.HasValue);
}

@ -54,14 +54,16 @@ namespace Platform.Areas.IoTCenter.Controllers
.WhereIf(model.Query.IoTCommandId.HasValue, o => o.IoTCommandId == model.Query.IoTCommandId.Value)
.OrderBy(o => o.IoTSceneId);
}
public override void EntityToModel(IoTSceneIoTCommand entity, EditIoTSceneIoTCommandModel model)
{
model.OrganId = entity.IoTScene?.Building?.OrganId;
model.IoTSceneBuildingId = entity.IoTScene?.BuildingId;
model.DeviceBuildingId = entity.IoTCommand?.IoTDevice?.IoTGateway?.BuildingId;
}
public override void ToDisplayModel(IoTSceneIoTCommand entity, EditIoTSceneIoTCommandModel model)
{
if(entity!=null)
{
model.OrganId = entity.IoTScene?.Building?.OrganId;
model.IoTSceneBuildingId = entity.IoTScene?.BuildingId;
model.DeviceBuildingId = entity.IoTCommand?.IoTDevice?.IoTGateway?.BuildingId;
}
if (model.OrganId.HasValue)
{
var name = this._organRepo.ReadOnlyTable()
@ -100,12 +102,6 @@ namespace Platform.Areas.IoTCenter.Controllers
}
public override void ToEditModel(IoTSceneIoTCommand entity, EditIoTSceneIoTCommandModel model)
{
if (entity != null)
{
model.OrganId = entity.IoTScene?.Building?.OrganId;
model.IoTSceneBuildingId = entity.IoTScene?.BuildingId;
model.DeviceBuildingId = entity.IoTCommand?.IoTDevice?.IoTGateway?.BuildingId;
}
ViewData.SelectList(o => model.OrganId, () => this._ajax.GetOrgan(model.OrganId).SelectList());
ViewData.SelectList(o => model.IoTSceneId, () => this._ajax.GetIoTScene(model.IoTSceneBuildingId.Value, model.IoTSceneId).SelectList(), model.IoTSceneBuildingId.HasValue);
ViewData.SelectList(o => model.IoTSceneBuildingId, () => this._ajax.GetBuilding(model.OrganId.Value, model.IoTSceneBuildingId).SelectList(), model.OrganId.HasValue);

@ -61,16 +61,18 @@ namespace Platform.Areas.IoTCenter.Controllers
.WhereIf(model.Query.Disabled.HasValue, o => o.Disabled == model.Query.Disabled.Value)
.OrderBy(o => o.IoTSceneId);
}
public override void EntityToModel(IoTTigger entity, EditIoTTiggerModel model)
{
model.OrganId = entity.IoTScene?.Building?.OrganId;
model.IoTSceneBuildingId = entity.IoTScene?.BuildingId;
model.IoTDeviceBuildingId = entity.IoTData?.IoTDevice?.IoTGateway?.BuildingId;
model.IoTDeviceId = entity.IoTData?.IoTDeviceId;
model.IoTGatewayId = entity.IoTData?.IoTDevice?.IoTGatewayId;
}
public override void ToDisplayModel(IoTTigger entity, EditIoTTiggerModel model)
{
if (entity != null)
{
model.OrganId = entity.IoTScene?.Building?.OrganId;
model.IoTSceneBuildingId = entity.IoTScene?.BuildingId;
model.IoTDeviceBuildingId = entity.IoTData?.IoTDevice?.IoTGateway?.BuildingId;
model.IoTDeviceId = entity.IoTData?.IoTDeviceId;
model.IoTGatewayId = entity.IoTData?.IoTDevice?.IoTGatewayId;
}
if (model.OrganId.HasValue)
{
var name = this._organRepo.ReadOnlyTable()
@ -111,22 +113,12 @@ namespace Platform.Areas.IoTCenter.Controllers
public override void ToEditModel(IoTTigger entity, EditIoTTiggerModel model)
{
if (entity != null)
{
model.OrganId = entity.IoTScene?.Building?.OrganId;
model.IoTSceneBuildingId = entity.IoTScene?.BuildingId;
model.IoTDeviceBuildingId = entity.IoTData?.IoTDevice?.IoTGateway?.BuildingId;
model.IoTDeviceId = entity.IoTData?.IoTDeviceId;
model.IoTGatewayId = entity.IoTData?.IoTDevice?.IoTGatewayId;
}
ViewData.SelectList(o => model.OrganId, () => this._ajax.GetOrgan(model.OrganId).SelectList());
ViewData.SelectList(o => model.IoTSceneBuildingId, () => this._ajax.GetBuilding(model.OrganId.Value, model.IoTSceneBuildingId).SelectList(), model.OrganId.HasValue);
ViewData.SelectList(o => model.IoTSceneId, () => this._ajax.GetIoTScene(model.IoTSceneBuildingId.Value, model.IoTSceneId).SelectList(), model.IoTSceneBuildingId.HasValue);
ViewData.SelectList(o => model.IoTDeviceBuildingId, () => this._ajax.GetBuildingByScene(model.IoTSceneId.Value, model.IoTDeviceBuildingId).SelectList(), model.IoTSceneId.HasValue);
ViewData.SelectList(o => model.IoTGatewayId, () => this._ajax.GetIoTGatewayByBuilding(model.IoTDeviceBuildingId.Value, model.IoTGatewayId).SelectList(), model.IoTDeviceBuildingId.HasValue);
ViewData.SelectList(o => model.IoTDeviceId, () => this._ajax.GetIoTDevice(model.IoTGatewayId.Value, model.IoTDeviceId).SelectList(), model.IoTGatewayId.HasValue);
ViewData.SelectList(o => model.IoTDataId, () => this._ajax.GetIoTData(model.IoTDeviceId.Value, model.IoTDataId).SelectList(), model.IoTDeviceId.HasValue);
}
}
}

@ -50,13 +50,14 @@ namespace Platform.Areas.IoTCenter.Controllers
return query.Include(o => o.IoTScene).ThenInclude(o => o.Building).ThenInclude(o => o.Organ);
}
public override void EntityToModel(IoTTimer entity, EditIoTTimerModel model)
{
model.BuildingId = entity.IoTScene?.BuildingId;
model.OrganId = entity.IoTScene?.Building?.OrganId;
}
public override void ToDisplayModel(IoTTimer entity, EditIoTTimerModel model)
{
if (entity != null)
{
model.BuildingId = entity.IoTScene?.BuildingId;
model.OrganId = entity.IoTScene?.Building?.OrganId;
}
if (model.BuildingId.HasValue)
{
var name = this._buildingRepo.ReadOnlyTable()
@ -82,11 +83,6 @@ namespace Platform.Areas.IoTCenter.Controllers
public override void ToEditModel(IoTTimer entity, EditIoTTimerModel model)
{
if (entity != null)
{
model.BuildingId = entity.IoTScene?.BuildingId;
model.OrganId = entity.IoTScene?.Building?.OrganId;
}
ViewData.SelectList(o => model.OrganId, () => this._ajax.GetOrgan(model.OrganId).SelectList());
ViewData.SelectList(o => model.BuildingId, () => this._ajax.GetBuilding(model.OrganId.Value, model.BuildingId).SelectList(), model.OrganId.HasValue);
ViewData.SelectList(o => model.IoTSceneId, () => this._ajax.GetIoTScene(model.BuildingId.Value, model.IoTSceneId).SelectList(), model.BuildingId.HasValue);

@ -1,8 +1,7 @@
using Hangfire;
using Hangfire.Dashboard.BasicAuthorization;
using Hangfire.Dashboard;
using Hangfire.MySql;
using Hangfire.Storage.SQLite;
using Infrastructure.Data;
using Infrastructure.Email;
using Infrastructure.Sms;
using Infrastructure.UI;
@ -21,8 +20,6 @@ using System;
using System.Collections.Generic;
using System.Transactions;
using UoN.ExpressiveAnnotations.NetCore.DependencyInjection;
using Hangfire.Annotations;
using Hangfire.Dashboard;
namespace Platform
{

Loading…
Cancel
Save