using Learun.Application.WorkFlow; using Learun.Util; using System.Web.Mvc; namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers { /// /// 版 本 Learun-ADMS V7.0.3 力软敏捷开发框架 /// Copyright (c) 2013-2018 上海力软信息技术有限公司 /// 创建人:力软-框架开发组 /// 日 期:2018.12.07 /// 描 述:流程委托 /// public class NWFDelegateController : MvcControllerBase { private NWFDelegateIBLL nWFDelegateIBLL = new NWFDelegateBLL(); #region 视图功能 /// /// 管理界面 /// /// [HttpGet] public ActionResult Index() { return View(); } /// /// 表单页面 /// /// [HttpGet] public ActionResult Form() { return View(); } #endregion #region 获取数据 /// /// 获取分页数据 /// /// 分页参数 /// 关键字 /// [HttpGet] [AjaxOnly] public ActionResult GetPageList(string pagination, string keyword) { UserInfo userInfo = LoginUserInfo.Get(); Pagination paginationobj = pagination.ToObject(); var data = nWFDelegateIBLL.GetPageList(paginationobj, keyword, userInfo); var jsonData = new { rows = data, total = paginationobj.total, page = paginationobj.page, records = paginationobj.records, }; return Success(jsonData); } /// /// 获取关联模板数据 /// /// 主键 /// [HttpGet] [AjaxOnly] public ActionResult GetRelationList(string keyValue) { var relationList = nWFDelegateIBLL.GetRelationList(keyValue); return Success(relationList); } #endregion #region 提交数据 /// /// 保存委托信息 /// /// 主键 /// 委托信息实体 /// 模板信息 /// [HttpPost] [ValidateAntiForgeryToken] [AjaxOnly] public ActionResult SaveForm(string keyValue, string strEntity, string strSchemeInfo) { NWFDelegateRuleEntity entity = strEntity.ToObject(); nWFDelegateIBLL.SaveEntity(keyValue, entity, strSchemeInfo.Split(',')); return Success("保存成功!"); } /// /// 删除模板数据 /// /// 主键 /// [HttpPost] [AjaxOnly] public ActionResult DeleteForm(string keyValue) { nWFDelegateIBLL.DeleteEntity(keyValue); return Success("删除成功!"); } /// /// 启用/停用表单 /// /// 主键 /// 状态1启用0禁用 /// [HttpPost] [AjaxOnly] public ActionResult UpDateSate(string keyValue, int state) { nWFDelegateIBLL.UpdateState(keyValue, state); return Success((state == 1 ? "启用" : "禁用") + "成功!"); } #endregion } }