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

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<Button, PagedListModel<EditButtonModel>, EditButtonModel, EditButtonModel>
{
private readonly DeviceService _spService;
public HomeController(IRepository<Button> repo, DeviceService spService) : base(repo)
{
this._spService = spService;
}
public override IActionResult Add(EditButtonModel model)
{
var result = base.Add(model);
this._spService.Notify();
return result;
}
public override IActionResult Edit(EditButtonModel model)
{
var result = base.Edit(model);
this._spService.Notify();
return result;
}
public override IActionResult Delete(List<Guid> list)
{
var result = base.Delete(list);
this._spService.Notify();
return result;
}
}
}