纽威
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.
 
 
 
 
 

68 lines
2.0 KiB

using NFine.Application.SystemManage;
using NFine.Code;
using NFine.Domain.Entity.SystemManage;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
namespace NFine.Web.Areas.SystemManage.Controllers
{
public class RoleController : ControllerBase
{
private RoleApp roleApp = new RoleApp();
private RoleAuthorizeApp roleAuthorizeApp = new RoleAuthorizeApp();
private ModuleApp moduleApp = new ModuleApp();
private ModuleButtonApp moduleButtonApp = new ModuleButtonApp();
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetGridJsonFY(Pagination pagination, string keyword)
{
var data = roleApp.GetList(pagination,keyword );
var JsonData = new
{
total = pagination.total,
page = pagination.page,
records = pagination.records,
rows = data
};
return Content(JsonData.ToJson());
}
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetGridJson( string keyword)
{
var data = roleApp.GetList( keyword);
return Content(data.ToJson());
}
[HttpGet]
[HandlerAjaxOnly]
public ActionResult GetFormJson(string keyValue)
{
var data = roleApp.GetForm(keyValue);
return Content(data.ToJson());
}
[HttpPost]
[HandlerAjaxOnly]
[ValidateAntiForgeryToken]
public ActionResult SubmitForm(RoleEntity roleEntity, string permissionIds, string keyValue)
{
roleApp.SubmitForm(roleEntity, permissionIds.Split(','), keyValue);
return Success("操作成功。");
}
[HttpPost]
[HandlerAjaxOnly]
[HandlerAuthorize]
[ValidateAntiForgeryToken]
public ActionResult DeleteForm(string keyValue)
{
roleApp.DeleteForm(keyValue);
return Success("删除成功。");
}
}
}