mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-19 01:58:01 +08:00
表单设计
This commit is contained in:
@@ -86,6 +86,7 @@
|
||||
<Compile Include="Extention\WF_Runtime.cs" />
|
||||
<Compile Include="Extention\WF_RuntimeInitModel.cs" />
|
||||
<Compile Include="Extention\WF_RuntimeModel.cs" />
|
||||
<Compile Include="WFFormService.cs" />
|
||||
<Compile Include="WFProcessInstanceService.cs" />
|
||||
<Compile Include="WFRuntimeService.cs" />
|
||||
<Compile Include="WFSchemeService.cs" />
|
||||
|
52
OpenAuth.App/WFFormService.cs
Normal file
52
OpenAuth.App/WFFormService.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenAuth.App.ViewModel;
|
||||
using OpenAuth.Domain;
|
||||
using OpenAuth.Domain.Interface;
|
||||
|
||||
namespace OpenAuth.App
|
||||
{
|
||||
/// <summary>
|
||||
/// 表单服务
|
||||
/// <para>李玉宝新增于2017-01-13 17:48:00</para>
|
||||
/// </summary>
|
||||
public class WFFormService
|
||||
{
|
||||
protected IUnitWork _unitWork;
|
||||
|
||||
public WFFormService(IUnitWork unitWork)
|
||||
{
|
||||
_unitWork = unitWork;
|
||||
}
|
||||
|
||||
public List<WFFrmMain> GetAllList()
|
||||
{
|
||||
return _unitWork.Find<WFFrmMain>(null).ToList();
|
||||
}
|
||||
|
||||
public WFFrmMain GetForm(Guid keyValue)
|
||||
{
|
||||
return _unitWork.FindSingle<WFFrmMain>(u => u.Id == keyValue);
|
||||
}
|
||||
|
||||
public void RemoveForm(Guid[] keyValue)
|
||||
{
|
||||
_unitWork.Delete<WFFrmMain>(u =>keyValue.Contains(u.Id));
|
||||
}
|
||||
|
||||
public GridData Load(int pageCurrent, int pageSize)
|
||||
{
|
||||
var result = new GridData
|
||||
{
|
||||
page = pageCurrent
|
||||
};
|
||||
|
||||
int cnt = _unitWork.Find<WFFrmMain>(null).Count();
|
||||
result.total = cnt % pageSize == 0 ? cnt / pageSize : cnt / pageSize + 1;
|
||||
result.rows = _unitWork.Find<WFFrmMain>(pageCurrent, pageSize, "ModifyDate descending", null).ToList();
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user