using LeaRun.Application.Entity.BaseManage;
using LeaRun.Application.Busines.BaseManage;
using LeaRun.Util;
using LeaRun.Util.WebControl;
using System.Web.Mvc;
namespace LeaRun.Application.Web.Areas.BaseManage.Controllers
{
///
/// 版 本 6.1
/// Copyright (c) 2013-2016 上海力软信息技术有限公司
/// 创 建:超级管理员
/// 日 期:2017-02-22 21:03
/// 描 述:系统功能表
///
public class Base_ModuleController : MvcControllerBase
{
private Base_ModuleBLL base_modulebll = new Base_ModuleBLL();
#region 视图功能
///
/// 列表页面
///
///
[HttpGet]
public ActionResult Base_ModuleIndex()
{
return View();
}
///
/// 表单页面
///
///
[HttpGet]
public ActionResult Base_ModuleForm()
{
return View();
}
#endregion
#region 获取数据
///
/// 获取列表
///
/// 查询参数
/// 返回列表Json
[HttpGet]
public ActionResult GetListJson(string queryJson)
{
var data = base_modulebll.GetList(queryJson);
return ToJsonResult(data);
}
///
/// 获取实体
///
/// 主键值
/// 返回对象Json
[HttpGet]
public ActionResult GetFormJson(string keyValue)
{
var data = base_modulebll.GetEntity(keyValue);
return ToJsonResult(data);
}
#endregion
#region 提交数据
///
/// 删除数据
///
/// 主键值
///
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult RemoveForm(string keyValue)
{
base_modulebll.RemoveForm(keyValue);
return Success("删除成功。");
}
///
/// 保存表单(新增、修改)
///
/// 主键值
/// 实体对象
///
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, Base_ModuleEntity entity)
{
base_modulebll.SaveForm(keyValue, entity);
return Success("操作成功。");
}
#endregion
}
}