越来越顺了~~

This commit is contained in:
yubaolee 2017-11-30 17:47:41 +08:00
parent c026f263f8
commit 38cb16d9e7
25 changed files with 48 additions and 93 deletions

View File

@ -15,6 +15,7 @@
public Response() public Response()
{ {
Code = 200; Code = 200;
Message = "操作成功";
} }
} }

View File

@ -1,6 +1,6 @@
using System.Linq; using System.Linq;
using Infrastructure; using Infrastructure;
using OpenAuth.App.ViewModel; using OpenAuth.App.Response;
using OpenAuth.Repository.Domain; using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface; using OpenAuth.Repository.Interface;

View File

@ -1,12 +1,11 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenAuth.App;
using OpenAuth.App.Request; using OpenAuth.App.Request;
using OpenAuth.App.Response; using OpenAuth.App.Response;
using OpenAuth.Repository.Domain; using OpenAuth.Repository.Domain;
namespace LwSolution.App namespace OpenAuth.App
{ {
/// <summary> /// <summary>
/// 分类管理 /// 分类管理

View File

@ -111,13 +111,12 @@
<Compile Include="UserManagerApp.cs" /> <Compile Include="UserManagerApp.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="OrgManagerApp.cs" /> <Compile Include="OrgManagerApp.cs" />
<Compile Include="ViewModel\CommandModel.cs" /> <Compile Include="Response\CommandModel.cs" />
<Compile Include="ViewModel\GridData.cs" /> <Compile Include="Response\UserWithAccessedCtrls.cs" />
<Compile Include="ViewModel\UserWithAccessedCtrls.cs" /> <Compile Include="Response\ModuleElementVM.cs" />
<Compile Include="ViewModel\ModuleElementVM.cs" /> <Compile Include="Response\ModuleView.cs" />
<Compile Include="ViewModel\ModuleView.cs" /> <Compile Include="Response\RoleVM.cs" />
<Compile Include="ViewModel\RoleVM.cs" /> <Compile Include="Response\UserView.cs" />
<Compile Include="ViewModel\UserView.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Infrastructure\Infrastructure.csproj"> <ProjectReference Include="..\Infrastructure\Infrastructure.csproj">

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenAuth.App.ViewModel; using OpenAuth.App.Response;
using OpenAuth.Repository.Domain; using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface; using OpenAuth.Repository.Interface;
@ -99,10 +99,10 @@ namespace OpenAuth.App
/// 得到部门的所有子部门 /// 得到部门的所有子部门
/// <para>如果orgId为0表示取得所有部门</para> /// <para>如果orgId为0表示取得所有部门</para>
/// </summary> /// </summary>
public GridData LoadAllChildren(string orgId) public TableData LoadAllChildren(string orgId)
{ {
var query = GetSubOrgs(orgId); var query = GetSubOrgs(orgId);
return new GridData return new TableData
{ {
data = query.ToList(), data = query.ToList(),
count = query.Count(), count = query.Count(),

View File

@ -11,7 +11,7 @@
using OptimaJet.Workflow.Core.Model; using OptimaJet.Workflow.Core.Model;
namespace OpenAuth.App.ViewModel namespace OpenAuth.App.Response
{ {
/// <summary> /// <summary>
/// workflow命令 /// workflow命令

View File

@ -1,4 +1,4 @@
namespace OpenAuth.App.ViewModel namespace OpenAuth.App.Response
{ {
/// <summary> /// <summary>
/// 用户ID /// 用户ID

View File

@ -1,8 +1,8 @@
using Infrastructure; using System.Collections.Generic;
using System.Collections.Generic; using Infrastructure;
using OpenAuth.Repository.Domain; using OpenAuth.Repository.Domain;
namespace OpenAuth.App.ViewModel namespace OpenAuth.App.Response
{ {
public class ModuleView public class ModuleView
{ {

View File

@ -15,7 +15,7 @@
using Infrastructure; using Infrastructure;
using OpenAuth.Repository.Domain; using OpenAuth.Repository.Domain;
namespace OpenAuth.App.ViewModel namespace OpenAuth.App.Response
{ {
public partial class RoleVM public partial class RoleVM
{ {

View File

@ -2,8 +2,7 @@
using Infrastructure; using Infrastructure;
using OpenAuth.Repository.Domain; using OpenAuth.Repository.Domain;
namespace OpenAuth.App.Response
namespace OpenAuth.App.ViewModel
{ {
public class UserView public class UserView
{ {

View File

@ -15,8 +15,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using OpenAuth.Repository.Domain; using OpenAuth.Repository.Domain;
namespace OpenAuth.App.Response
namespace OpenAuth.App.ViewModel
{ {
/// <summary> /// <summary>
/// 视图模型 /// 视图模型

View File

@ -14,7 +14,7 @@ using System;
using System.Configuration; using System.Configuration;
using System.Web; using System.Web;
using Infrastructure; using Infrastructure;
using OpenAuth.App.ViewModel; using OpenAuth.App.Response;
namespace OpenAuth.App.SSO namespace OpenAuth.App.SSO
{ {

View File

@ -1,8 +1,8 @@
using OpenAuth.App.ViewModel; using System;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenAuth.App.Request; using OpenAuth.App.Request;
using OpenAuth.App.Response;
using OpenAuth.Repository.Domain; using OpenAuth.Repository.Domain;
@ -22,7 +22,7 @@ namespace OpenAuth.App
/// <summary> /// <summary>
/// 加载一个部门及子部门全部用户 /// 加载一个部门及子部门全部用户
/// </summary> /// </summary>
public GridData Load(QueryUserListReq request) public TableData Load(QueryUserListReq request)
{ {
IEnumerable<User> users; IEnumerable<User> users;
int records = 0; int records = 0;
@ -52,7 +52,7 @@ namespace OpenAuth.App
userviews.Add(uv); userviews.Add(uv);
} }
return new GridData return new TableData
{ {
count = records, count = records,
data = userviews, data = userviews,

View File

@ -1,41 +0,0 @@
// ***********************************************************************
// 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 code;
/// <summary>
/// 操作消息
/// </summary>
public string msg;
/// <summary>
/// 总记录条数
/// </summary>
public int count;
/// <summary>
/// 数据内容
/// </summary>
public dynamic data;
}
}

View File

@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenAuth.App.ViewModel; using OpenAuth.App.Response;
using OpenAuth.Repository.Domain; using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface; using OpenAuth.Repository.Interface;
@ -29,9 +29,9 @@ namespace OpenAuth.App
_unitWork.Delete<WFFrmMain>(u =>keyValue.Contains(u.Id)); _unitWork.Delete<WFFrmMain>(u =>keyValue.Contains(u.Id));
} }
public GridData Load(int pageCurrent, int pageSize) public TableData Load(int pageCurrent, int pageSize)
{ {
var result = new GridData var result = new TableData
{ {
count = _unitWork.Find<WFFrmMain>(null).Count(), count = _unitWork.Find<WFFrmMain>(null).Count(),
data = _unitWork.Find<WFFrmMain>(pageCurrent, pageSize, "ModifyDate descending", null).ToList() data = _unitWork.Find<WFFrmMain>(pageCurrent, pageSize, "ModifyDate descending", null).ToList()

View File

@ -3,8 +3,8 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using Infrastructure; using Infrastructure;
using OpenAuth.App.Extention; using OpenAuth.App.Extention;
using OpenAuth.App.Response;
using OpenAuth.App.SSO; using OpenAuth.App.SSO;
using OpenAuth.App.ViewModel;
using OpenAuth.Repository.Domain; using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface; using OpenAuth.Repository.Interface;
@ -298,10 +298,10 @@ namespace OpenAuth.App
} }
#endregion #endregion
public GridData Load(string userid, string type, int pageCurrent, int pageSize) public TableData Load(string userid, string type, int pageCurrent, int pageSize)
{ {
//todo:待办/已办/我的 //todo:待办/已办/我的
var result = new GridData(); var result = new TableData();
result.count = _unitWork.Find<WFProcessInstance>(u => u.CreateUserId == userid).Count(); result.count = _unitWork.Find<WFProcessInstance>(u => u.CreateUserId == userid).Count();
if (type == "inbox") //待办事项 if (type == "inbox") //待办事项

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenAuth.App.ViewModel; using OpenAuth.App.Response;
using OpenAuth.Repository.Domain; using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface; using OpenAuth.Repository.Interface;
@ -102,9 +102,9 @@ namespace OpenAuth.App
return _unitWork.Find<WFSchemeInfo>(null).ToList(); return _unitWork.Find<WFSchemeInfo>(null).ToList();
} }
public GridData Load(int pageCurrent, int pageSize) public TableData Load(int pageCurrent, int pageSize)
{ {
var result = new GridData(); var result = new TableData();
result.count = _unitWork.Find<WFSchemeInfo>(null).Count(); result.count = _unitWork.Find<WFSchemeInfo>(null).Count();
result.data = _unitWork.Find<WFSchemeInfo>(pageCurrent, pageSize, "ModifyDate descending", null).ToList(); result.data = _unitWork.Find<WFSchemeInfo>(pageCurrent, pageSize, "ModifyDate descending", null).ToList();

View File

@ -6,7 +6,6 @@ using System.Web.UI.WebControls;
using Infrastructure; using Infrastructure;
using OpenAuth.App; using OpenAuth.App;
using OpenAuth.App.SSO; using OpenAuth.App.SSO;
using OpenAuth.App.ViewModel;
using OpenAuth.Mvc.Controllers; using OpenAuth.Mvc.Controllers;
using OpenAuth.Repository.Domain; using OpenAuth.Repository.Domain;

View File

@ -19,8 +19,8 @@ using System.Reflection;
using System.Web; using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
using Infrastructure; using Infrastructure;
using OpenAuth.App.Response;
using OpenAuth.App.SSO; using OpenAuth.App.SSO;
using OpenAuth.App.ViewModel;
namespace OpenAuth.Mvc.Controllers namespace OpenAuth.Mvc.Controllers
{ {

View File

@ -2,7 +2,7 @@
using System.Web.Http; using System.Web.Http;
using System.Web.Mvc; using System.Web.Mvc;
using Infrastructure; using Infrastructure;
using LwSolution.App; using OpenAuth.App;
using OpenAuth.App.Request; using OpenAuth.App.Request;
using OpenAuth.App.Response; using OpenAuth.App.Response;
using OpenAuth.Repository.Domain; using OpenAuth.Repository.Domain;

View File

@ -1,13 +1,13 @@
using Infrastructure; using Infrastructure;
using OpenAuth.App; using OpenAuth.App;
using OpenAuth.App.SSO; using OpenAuth.App.SSO;
using OpenAuth.App.ViewModel;
using OpenAuth.Mvc.Models; using OpenAuth.Mvc.Models;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Web.Mvc; using System.Web.Mvc;
using OpenAuth.App.Response;
using OpenAuth.Repository.Domain; using OpenAuth.Repository.Domain;
namespace OpenAuth.Mvc.Controllers namespace OpenAuth.Mvc.Controllers

View File

@ -5,7 +5,7 @@ using System.Web.Mvc;
using Infrastructure; using Infrastructure;
using OpenAuth.App; using OpenAuth.App;
using OpenAuth.App.Request; using OpenAuth.App.Request;
using OpenAuth.App.ViewModel; using OpenAuth.App.Response;
using OpenAuth.Mvc.Models; using OpenAuth.Mvc.Models;
namespace OpenAuth.Mvc.Controllers namespace OpenAuth.Mvc.Controllers

View File

@ -1,8 +1,8 @@
using System.Linq; using System.Linq;
using System.Web.Mvc; using System.Web.Mvc;
using Infrastructure; using Infrastructure;
using OpenAuth.App.Response;
using OpenAuth.App.SSO; using OpenAuth.App.SSO;
using OpenAuth.App.ViewModel;
namespace OpenAuth.Mvc.Controllers namespace OpenAuth.Mvc.Controllers
{ {
@ -28,7 +28,7 @@ namespace OpenAuth.Mvc.Controllers
{ {
query = query.Where(u => u.ParentId == pId).ToList(); query = query.Where(u => u.ParentId == pId).ToList();
} }
var data = new GridData var data = new TableData
{ {
data = query, data = query,
count = query.Count(), count = query.Count(),

View File

@ -2,7 +2,7 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenAuth.App; using OpenAuth.App;
using OpenAuth.App.Request; using OpenAuth.App.Request;
using OpenAuth.App.ViewModel; using OpenAuth.App.Response;
namespace OpenAuth.UnitTest namespace OpenAuth.UnitTest
{ {

View File

@ -16,7 +16,7 @@ using Infrastructure.Cache;
using OpenAuth.App; using OpenAuth.App;
using OpenAuth.App.SSO; using OpenAuth.App.SSO;
using System.Web.Mvc; using System.Web.Mvc;
using OpenAuth.App.ViewModel; using OpenAuth.App.Response;
namespace OpenAuth.WebApi.Areas.SSO.Controllers namespace OpenAuth.WebApi.Areas.SSO.Controllers
{ {