94 lines
2.6 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Learun.Application.Base.SystemModule;
using System.Web.Mvc;
namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers
{
/// <summary>
/// 版 本 PIT-ADMS V7.0.3 敏捷开发框架
/// Copyright (c) 2013-2018 Hexagon PPM
/// 创建人:研发部
/// 日 期2017.04.01
/// 描 述:行政区域
/// </summary>
public class AreaController : MvcControllerBase
{
private AreaIBLL areaIBLL = new AreaBLL();
#region
/// <summary>
/// 行政区域管理
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion
#region
/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="parentId">父级主键</param>
/// <param name="keyword">关键字查询(名称/编号)</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult Getlist(string parentId, string keyword) {
var data = areaIBLL.GetList(parentId, keyword);
return Success(data);
}
/// <summary>
/// 获取树形数据
/// </summary>
/// <param name="parentId"></param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetTree(string parentId)
{
var data = areaIBLL.GetTree(parentId);
return Success(data);
}
#endregion
#region
/// <summary>
/// 保存表单数据
/// </summary>
/// <param name="keyValue"></param>
/// <param name="entity"></param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, AreaEntity entity)
{
areaIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
/// <summary>
/// 删除表单数据
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
areaIBLL.VirtualDelete(keyValue);
return Success("删除成功!");
}
#endregion
}
}