mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-06-26 22:33:09 +08:00
调整流程详情显示效果
添加DataGrid数据格式
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenAuth.App.ViewModel;
|
||||
using OpenAuth.Domain;
|
||||
using OpenAuth.Domain.Interface;
|
||||
|
||||
@@ -32,14 +33,34 @@ namespace OpenAuth.App
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更改流程状态
|
||||
/// </summary>
|
||||
public void ChangeState(Guid id,string state, string statename)
|
||||
{
|
||||
_repository.Update(u =>u.Id == id, u =>new GoodsApply
|
||||
{
|
||||
State = state,
|
||||
StateName = statename
|
||||
});
|
||||
}
|
||||
|
||||
public GoodsApply Get(Guid value)
|
||||
{
|
||||
return _repository.FindSingle(u =>u.Id == value);
|
||||
}
|
||||
|
||||
public IEnumerable<GoodsApply> Load(Guid userid, Guid parentId, int pageCurrent, int pageSize)
|
||||
public GridData Load(Guid userid, Guid parentId, int pageCurrent, int pageSize)
|
||||
{
|
||||
return _repository.Find( pageCurrent, pageSize);
|
||||
var result = new GridData
|
||||
{
|
||||
pageCurrent = pageCurrent
|
||||
};
|
||||
|
||||
result.list= _repository.Find( pageCurrent, pageSize);
|
||||
result.total = _repository.GetCount(null);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,6 +95,7 @@
|
||||
<Compile Include="UserManagerApp.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="OrgManagerApp.cs" />
|
||||
<Compile Include="ViewModel\GridData.cs" />
|
||||
<Compile Include="ViewModel\UserWithAccessedCtrls.cs" />
|
||||
<Compile Include="ViewModel\ModuleElementVM.cs" />
|
||||
<Compile Include="ViewModel\ModuleView.cs" />
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace OpenAuth.App.SSO
|
||||
if (cache.InvalidTime > DateTime.Now)
|
||||
{
|
||||
//延长
|
||||
cache.InvalidTime = DateTime.Now.AddMinutes(5);
|
||||
cache.InvalidTime = DateTime.Now.AddDays(1);
|
||||
//设置缓存
|
||||
CacheContext.Set(cache.Token, cache);
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace OpenAuth.App
|
||||
/// <summary>
|
||||
/// 加载一个部门及子部门全部用户
|
||||
/// </summary>
|
||||
public dynamic Load(Guid orgId, int pageindex, int pagesize)
|
||||
public GridData Load(Guid orgId, int pageindex, int pagesize)
|
||||
{
|
||||
if (pageindex < 1) pageindex = 1; //TODO:如果列表为空新增加一个用户后,前端会传一个0过来,奇怪??
|
||||
IEnumerable<User> users;
|
||||
@@ -69,7 +69,7 @@ namespace OpenAuth.App
|
||||
userviews.Add(uv);
|
||||
}
|
||||
|
||||
return new
|
||||
return new GridData
|
||||
{
|
||||
total = total,
|
||||
list = userviews,
|
||||
|
||||
36
OpenAuth.App/ViewModel/GridData.cs
Normal file
36
OpenAuth.App/ViewModel/GridData.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
// ***********************************************************************
|
||||
// Assembly : FundationAdmin
|
||||
// Author : yubaolee
|
||||
// Created : 03-09-2016
|
||||
//
|
||||
// Last Modified By : yubaolee
|
||||
// Last Modified On : 03-09-2016
|
||||
// ***********************************************************************
|
||||
// <copyright file="JqData.cs" company="Microsoft">
|
||||
// 版权所有(C) Microsoft 2015
|
||||
// </copyright>
|
||||
// <summary>B-JUIDataGrid的数据格式</summary>
|
||||
// ***********************************************************************
|
||||
|
||||
namespace OpenAuth.App.ViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// jqGrid的返回值
|
||||
/// </summary>
|
||||
public class GridData
|
||||
{
|
||||
/// <summary>
|
||||
/// 页码
|
||||
/// </summary>
|
||||
public int pageCurrent;
|
||||
/// <summary>
|
||||
/// 总页数
|
||||
/// </summary>
|
||||
public int total;
|
||||
|
||||
/// <summary>
|
||||
/// 数据内容
|
||||
/// </summary>
|
||||
public dynamic list;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user