|
|
@@ -44,7 +44,8 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
[AjaxOnly] |
|
|
|
public ActionResult Getlist(string parentId, string keyword) { |
|
|
|
public ActionResult Getlist(string parentId, string keyword) |
|
|
|
{ |
|
|
|
var data = areaIBLL.GetList(parentId, keyword); |
|
|
|
return JsonResult(data); |
|
|
|
} |
|
|
@@ -74,6 +75,22 @@ namespace Learun.Application.Web.Areas.LR_SystemModule.Controllers |
|
|
|
[AjaxOnly] |
|
|
|
public ActionResult SaveForm(string keyValue, AreaEntity entity) |
|
|
|
{ |
|
|
|
var model = areaIBLL.GetEntityByCode(entity.F_AreaCode); |
|
|
|
if (string.IsNullOrEmpty(keyValue)) |
|
|
|
{ |
|
|
|
if (model.F_AreaCode == entity.F_AreaCode) |
|
|
|
{ |
|
|
|
return Fail("编号重复,新重新输入!"); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (model.F_AreaCode == entity.F_AreaCode && model.F_AreaId != keyValue) |
|
|
|
{ |
|
|
|
return Fail("编号重复,新重新输入!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
areaIBLL.SaveEntity(keyValue, entity); |
|
|
|
return Success("保存成功!"); |
|
|
|
} |
|
|
|