|
|
@@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers |
|
|
|
[HttpGet] |
|
|
|
public ActionResult Index() |
|
|
|
{ |
|
|
|
return View(); |
|
|
|
return View(); |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 表单页 |
|
|
@@ -35,7 +35,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers |
|
|
|
[HttpGet] |
|
|
|
public ActionResult Form() |
|
|
|
{ |
|
|
|
return View(); |
|
|
|
return View(); |
|
|
|
} |
|
|
|
#endregion |
|
|
|
|
|
|
@@ -69,8 +69,9 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers |
|
|
|
[AjaxOnly] |
|
|
|
public ActionResult GetFormData(string keyValue) |
|
|
|
{ |
|
|
|
var Ass_StorageData = ass_StorageIBLL.GetAss_StorageEntity( keyValue ); |
|
|
|
var jsonData = new { |
|
|
|
var Ass_StorageData = ass_StorageIBLL.GetAss_StorageEntity(keyValue); |
|
|
|
var jsonData = new |
|
|
|
{ |
|
|
|
Ass_Storage = Ass_StorageData, |
|
|
|
}; |
|
|
|
return Success(jsonData); |
|
|
@@ -113,7 +114,22 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers |
|
|
|
public ActionResult SaveForm(string keyValue, string strEntity) |
|
|
|
{ |
|
|
|
Ass_StorageEntity entity = strEntity.ToObject<Ass_StorageEntity>(); |
|
|
|
ass_StorageIBLL.SaveEntity(keyValue,entity); |
|
|
|
var model = ass_StorageIBLL.NameOrcode(entity.SName, entity.SCode); |
|
|
|
if (string.IsNullOrEmpty(keyValue)) |
|
|
|
{ |
|
|
|
if (model != null) |
|
|
|
{ |
|
|
|
return Fail("编码,姓名已存在,请重命名"); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
if (model != null && model.SId != keyValue) |
|
|
|
{ |
|
|
|
return Fail("编码,姓名已存在,请重命名!"); |
|
|
|
} |
|
|
|
} |
|
|
|
ass_StorageIBLL.SaveEntity(keyValue, entity); |
|
|
|
return Success("保存成功!"); |
|
|
|
} |
|
|
|
#endregion |
|
|
|