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.
43 lines
1.2 KiB
43 lines
1.2 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using Application.Domain.Entities;
|
|
using Infrastructure.Application;
|
|
using Infrastructure.Data;
|
|
using Infrastructure.Web.Mvc;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using SPService.Applicaiton.Models;
|
|
|
|
namespace FBeeService.Areas.Controllers
|
|
{
|
|
[Area("Admin")]
|
|
public class HomeController : CrudController<Device, PagedListModel<EditGatewayModel>, EditGatewayModel, EditGatewayModel>
|
|
{
|
|
private readonly DeviceService _deviceService;
|
|
|
|
public HomeController(IRepository<Device> repo, DeviceService deviceService) : base(repo)
|
|
{
|
|
this._deviceService = deviceService;
|
|
}
|
|
|
|
public override IActionResult Add(EditGatewayModel model)
|
|
{
|
|
var result = base.Add(model);
|
|
this._deviceService.Execute();
|
|
return result;
|
|
}
|
|
|
|
public override IActionResult Edit(EditGatewayModel model)
|
|
{
|
|
var result = base.Edit(model);
|
|
this._deviceService.Execute();
|
|
return result;
|
|
}
|
|
|
|
public override IActionResult Delete(List<Guid> list)
|
|
{
|
|
var result = base.Delete(list);
|
|
this._deviceService.Execute();
|
|
return result;
|
|
}
|
|
}
|
|
} |