delete workflow

This commit is contained in:
yubaolee 2016-10-27 16:55:38 +08:00
parent b1ee459c9e
commit c12466e8f3
4 changed files with 9 additions and 7 deletions

View File

@ -1,4 +1,5 @@
using System.Linq;
using System.Web.Mvc;
using Infrastructure;
using OpenAuth.App.ViewModel;
using OpenAuth.Domain;
@ -28,10 +29,10 @@ namespace OpenAuth.App
return result;
}
public void Del(string code)
[HttpPost]
public void Del(string[] codes)
{
_repository.Delete(u =>u.Code == code);
_repository.Delete(u =>codes.Contains(u.Code));
}
}
}

View File

@ -43,7 +43,7 @@ $(function () {
location.reload();
}
else {
$(this).alertmsg('warn', data.Message);
alert(data.Message);
}
},'json');
});

View File

@ -55,7 +55,7 @@ function del() {
var selected = list.getSelectedProperties("Code");
if (selected == null) return;
$.post('/WorkflowSchemas/Delete',
$.post('/WorkflowSchemas/Del',
{ codes: selected },
function (data) {
if (data.Status) {
@ -76,6 +76,7 @@ function edit() {
layer.open({
type: 2,
title:selected.Code,
skin: 'layui-layer-rim', //加上边框
area: ['800px', '600px'], //宽高
maxmin: true, //开启最大化最小化按钮

View File

@ -24,11 +24,11 @@ namespace OpenAuth.Mvc.Controllers
}
[HttpPost]
public string Del(string code)
public string Del(string[] codes)
{
try
{
_app.Del(code);
_app.Del(codes);
}
catch (Exception e)
{