|
|
@@ -18,6 +18,9 @@ namespace Learun.Application.Web.Areas.StudentWork.Controllers |
|
|
|
public class SW_Ask_TypeController : MvcControllerBase |
|
|
|
{ |
|
|
|
private SW_Ask_TypeIBLL sW_Ask_TypeIBLL = new SW_Ask_TypeBLL(); |
|
|
|
private SW_Ask_MainIBLL sW_Ask_MainIBLL = new SW_Ask_MainBLL(); |
|
|
|
private SW_Ask_Batch_TypeIBLL sW_Ask_Batch_TypeIBLL = new SW_Ask_Batch_TypeBLL(); |
|
|
|
private SW_Ask_NotHaveAll_TypeIBLL sW_Ask_NotHaveAll_TypeIBLL = new SW_Ask_NotHaveAll_TypeBLL(); |
|
|
|
|
|
|
|
#region 视图功能 |
|
|
|
|
|
|
@@ -173,6 +176,25 @@ namespace Learun.Application.Web.Areas.StudentWork.Controllers |
|
|
|
/// <returns></returns> |
|
|
|
public ActionResult ModifyStatus(string keyValue, int status, string processId) |
|
|
|
{ |
|
|
|
if (status == 0) |
|
|
|
{ |
|
|
|
var mainList = sW_Ask_MainIBLL.GetSW_Ask_MainListByTId(keyValue); |
|
|
|
if (mainList.Any()) |
|
|
|
{ |
|
|
|
return Fail("该类型在使用中,无法取消!"); |
|
|
|
} |
|
|
|
var batchList = sW_Ask_Batch_TypeIBLL.GetListByTId(keyValue); |
|
|
|
if (batchList.Any()) |
|
|
|
{ |
|
|
|
return Fail("该类型在使用中,无法取消!"); |
|
|
|
} |
|
|
|
var nothaveList = sW_Ask_NotHaveAll_TypeIBLL.GetListByTId(keyValue); |
|
|
|
if (nothaveList.Any()) |
|
|
|
{ |
|
|
|
return Fail("该类型在使用中,无法取消!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
sW_Ask_TypeIBLL.ModifyStatus(keyValue, status, processId); |
|
|
|
return Success("提交成功!"); |
|
|
|
} |
|
|
|