OpenAuth.Net/OpenAuth.Mvc/Controllers/WorkflowSchemasController.cs

46 lines
992 B
C#
Raw Normal View History

2016-09-14 16:11:46 +08:00
using System;
using System.Web.Mvc;
using Infrastructure;
using OpenAuth.App;
namespace OpenAuth.Mvc.Controllers
{
public class WorkflowSchemasController : BaseController
{
private WorkflowSchemasManagerApp _app;
public WorkflowSchemasController()
{
_app = AutofacExt.GetFromFac<WorkflowSchemasManagerApp>();
}
public ActionResult Index()
{
return View();
}
public string Load(int pageCurrent = 1, int pageSize = 30)
{
return JsonHelper.Instance.Serialize(_app.Load(pageCurrent, pageSize));
}
[HttpPost]
2016-10-29 22:27:39 +08:00
public string Del(string[] ids)
2016-09-14 16:11:46 +08:00
{
try
{
2016-10-29 22:27:39 +08:00
_app.Del(ids);
2016-09-14 16:11:46 +08:00
}
catch (Exception e)
{
2016-10-14 11:22:16 +08:00
Result.Status = false;
Result.Message = e.Message;
2016-09-14 16:11:46 +08:00
}
2016-10-14 11:22:16 +08:00
return JsonHelper.Instance.Serialize(Result);
2016-09-14 16:11:46 +08:00
}
}
}