Преглед изворни кода

问卷管理分类删除提示删除子项

临城职教中职
ndbs пре 2 година
родитељ
комит
1be455a641
4 измењених фајлова са 51 додато и 4 уклоњено
  1. +10
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Ask_TypeController.cs
  2. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_Type/Ask_TypeBLL.cs
  3. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_Type/Ask_TypeIBLL.cs
  4. +20
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_Type/Ask_TypeService.cs

+ 10
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Ask_TypeController.cs Прегледај датотеку

@@ -27,7 +27,7 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
[HttpGet]
public ActionResult Index()
{
return View();
return View();
}
/// <summary>
/// 表单页
@@ -85,8 +85,9 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Ask_TypeData = ask_TypeIBLL.GetAsk_TypeEntity( keyValue );
var jsonData = new {
var Ask_TypeData = ask_TypeIBLL.GetAsk_TypeEntity(keyValue);
var jsonData = new
{
Ask_Type = Ask_TypeData,
};
return Success(jsonData);
@@ -104,6 +105,11 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
var SonList = ask_TypeIBLL.GetAsk_TypeEntity(keyValue);
if (SonList != null)
{
return Fail("删除失败,请先删除子项!");
}
ask_TypeIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
@@ -118,7 +124,7 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
public ActionResult SaveForm(string keyValue, string strEntity)
{
Ask_TypeEntity entity = strEntity.ToObject<Ask_TypeEntity>();
ask_TypeIBLL.SaveEntity(keyValue,entity);
ask_TypeIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
#endregion


+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_Type/Ask_TypeBLL.cs Прегледај датотеку

@@ -65,6 +65,25 @@ namespace Learun.Application.TwoDevelopment.Ask
}
}
}
public Ask_TypeEntity GetSonEntity(string keyValue)
{
try
{
return ask_TypeService.GetSonEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取树形数据
/// </summary>


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_Type/Ask_TypeIBLL.cs Прегледај датотеку

@@ -30,6 +30,8 @@ namespace Learun.Application.TwoDevelopment.Ask
/// <summary>
/// <returns></returns>
Ask_TypeEntity GetAsk_TypeEntity(string keyValue);
Ask_TypeEntity GetSonEntity(string keyValue);

#endregion

#region 提交数据


+ 20
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Ask_Type/Ask_TypeService.cs Прегледај датотеку

@@ -81,6 +81,26 @@ namespace Learun.Application.TwoDevelopment.Ask
}
}
}

public Ask_TypeEntity GetSonEntity(string keyValue)
{
try
{
return this.BaseRepository().FindEntity<Ask_TypeEntity>(x=>x.ATPId== keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public IEnumerable<Ask_TypeEntity> GetList(string queryJson)
{
try


Loading…
Откажи
Сачувај