Skip to content

Commit c407939

Browse files
committed
v1.0 2014.05.05 首次发布版本。
0 parents  commit c407939

File tree

1,130 files changed

+221123
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,130 files changed

+221123
-0
lines changed

.gitignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
#ignore thumbnails created by windows
3+
Thumbs.db
4+
#Ignore files build by Visual Studio
5+
*.obj
6+
*.exe
7+
*.pdb
8+
*.user
9+
*.aps
10+
*.pch
11+
*.vspscc
12+
*_i.c
13+
*_p.c
14+
*.ncb
15+
*.suo
16+
*.tlb
17+
*.tlh
18+
*.bak
19+
*.cache
20+
*.ilk
21+
*.log
22+
[Bb]in
23+
[Dd]ebug*/
24+
*.lib
25+
*.sbr
26+
obj/
27+
[Rr]elease*/
28+
_ReSharper*/
29+
[Tt]est[Rr]esult*
30+
31+
*.scc
32+
*.psd
33+
src/RoadFlow/packages/*
34+
!src/RoadFlow/packages/*.config
35+
src/RoadFlow/Web/Content/Upload/*
36+
src/RoadFlow/Web/Platform/WorkFlow/FormDesigner/ueditor/net/tmp/*
37+
src/RoadFlow/Web/Platform/WorkFlow/FormDesigner/ueditor/net/upload*
38+
src/RoadFlow/Web/Platform/WorkFlow/Sign/*
39+
!src/RoadFlow/Web/Platform/WorkFlow/FormDesigner/ueditor/net/Uploader.cs
Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Business.Platform
6+
{
7+
public class AppLibrary
8+
{
9+
private string cacheKey = Utility.Keys.CacheKeys.AppLibrary.ToString();
10+
private Data.Interface.IAppLibrary dataAppLibrary;
11+
public AppLibrary()
12+
{
13+
this.dataAppLibrary = Data.Factory.Platform.GetAppLibraryInstance();
14+
}
15+
/// <summary>
16+
/// 新增
17+
/// </summary>
18+
public int Add(Data.Model.AppLibrary model)
19+
{
20+
return dataAppLibrary.Add(model);
21+
}
22+
/// <summary>
23+
/// 更新
24+
/// </summary>
25+
public int Update(Data.Model.AppLibrary model)
26+
{
27+
return dataAppLibrary.Update(model);
28+
}
29+
/// <summary>
30+
/// 查询所有记录
31+
/// </summary>
32+
public List<Data.Model.AppLibrary> GetAll(bool fromCache=false)
33+
{
34+
if (!fromCache)
35+
{
36+
return dataAppLibrary.GetAll();
37+
}
38+
else
39+
{
40+
object obj = MyCache.IO.Opation.Get(cacheKey);
41+
if (obj != null)
42+
{
43+
return obj as List<Data.Model.AppLibrary>;
44+
}
45+
else
46+
{
47+
var list = dataAppLibrary.GetAll();
48+
MyCache.IO.Opation.Set(cacheKey, list);
49+
return list;
50+
}
51+
}
52+
}
53+
/// <summary>
54+
/// 查询单条记录
55+
/// </summary>
56+
public Data.Model.AppLibrary Get(Guid id, bool fromCache=false)
57+
{
58+
if (!fromCache)
59+
{
60+
return dataAppLibrary.Get(id);
61+
}
62+
else
63+
{
64+
var all = GetAll(true);
65+
var app = all.Find(p => p.ID == id);
66+
return app == null ? dataAppLibrary.Get(id) : app;
67+
}
68+
}
69+
/// <summary>
70+
/// 清除缓存
71+
/// </summary>
72+
public void ClearCache()
73+
{
74+
MyCache.IO.Opation.Remove(cacheKey);
75+
}
76+
/// <summary>
77+
/// 删除
78+
/// </summary>
79+
public int Delete(Guid id)
80+
{
81+
return dataAppLibrary.Delete(id);
82+
}
83+
/// <summary>
84+
/// 查询记录条数
85+
/// </summary>
86+
public long GetCount()
87+
{
88+
return dataAppLibrary.GetCount();
89+
}
90+
/// <summary>
91+
/// 得到所有分类
92+
/// </summary>
93+
/// <returns></returns>
94+
public List<string> GetAllTypes()
95+
{
96+
return dataAppLibrary.GetAllTypes();
97+
}
98+
/// <summary>
99+
/// 得到一页数据
100+
/// </summary>
101+
/// <param name="pager"></param>
102+
/// <param name="query"></param>
103+
/// <param name="order"></param>
104+
/// <param name="size"></param>
105+
/// <param name="numbe"></param>
106+
/// <param name="title"></param>
107+
/// <param name="type"></param>
108+
/// <param name="address"></param>
109+
/// <returns></returns>
110+
public List<Data.Model.AppLibrary> GetPagerData(out string pager, string query = "", string title = "", string type = "", string address = "")
111+
{
112+
return dataAppLibrary.GetPagerData(out pager, query, "Type,Title", Utility.Tools.GetPageSize(),
113+
Utility.Tools.GetPageNumber(), title, type, address);
114+
}
115+
/// <summary>
116+
/// 查询一个类别下所有记录
117+
/// </summary>
118+
public List<Data.Model.AppLibrary> GetAllByType(string type)
119+
{
120+
return type.IsNullOrEmpty() ? new List<Data.Model.AppLibrary>() : dataAppLibrary.GetAllByType(type);
121+
}
122+
123+
/// <summary>
124+
/// 删除记录
125+
/// </summary>
126+
public int Delete(string[] idArray)
127+
{
128+
return dataAppLibrary.Delete(idArray);
129+
}
130+
/// <summary>
131+
/// 删除记录
132+
/// </summary>
133+
public int Delete(string idstring)
134+
{
135+
return idstring.IsNullOrEmpty() ? 0 : dataAppLibrary.Delete(idstring.Split(','));
136+
}
137+
/// <summary>
138+
/// 得到类型选择项
139+
/// </summary>
140+
/// <returns></returns>
141+
public string GetTypeOptions(string value="")
142+
{
143+
var types = GetAllTypes();
144+
StringBuilder options = new StringBuilder();
145+
foreach (var type in types)
146+
{
147+
options.AppendFormat("<option value=\"{0}\" {1}>{0}</option>", type, type == value ? "selected=\"selected\"" : "");
148+
}
149+
return options.ToString();
150+
}
151+
/// <summary>
152+
/// 得到一个类型选择项
153+
/// </summary>
154+
/// <param name="type">程序类型</param>
155+
/// <param name="value"></param>
156+
/// <returns></returns>
157+
public string GetAppsOptions(string type, string value = "")
158+
{
159+
if (type.IsNullOrEmpty()) return "";
160+
var apps = GetAllByType(type);
161+
StringBuilder options = new StringBuilder();
162+
foreach (var app in apps)
163+
{
164+
options.AppendFormat("<option value=\"{0}\" {1}>{2}</option>", app.ID,
165+
string.Compare(app.ID.ToString(), value, true) == 0 ? "selected=\"selected\"" : "",
166+
app.Title
167+
);
168+
}
169+
return options.ToString();
170+
}
171+
/// <summary>
172+
/// 根据ID得到类型
173+
/// </summary>
174+
/// <param name="id"></param>
175+
/// <returns></returns>
176+
public string GetTypeByID(Guid id)
177+
{
178+
var app = Get(id);
179+
return app == null ? "" : app.Type;
180+
}
181+
182+
/// <summary>
183+
/// 根据代码查询一条记录
184+
/// </summary>
185+
public Data.Model.AppLibrary GetByCode(string code)
186+
{
187+
return code.IsNullOrEmpty() ? null : dataAppLibrary.GetByCode(code.Trim());
188+
}
189+
190+
/// <summary>
191+
/// 得到流程运行时地址
192+
/// </summary>
193+
/// <param name="app"></param>
194+
/// <returns></returns>
195+
public string GetFlowRunAddress(Data.Model.AppLibrary app, string query="")
196+
{
197+
StringBuilder sb = new StringBuilder();
198+
if (app.Params.IsNullOrEmpty())
199+
{
200+
if (!app.Address.Contains("?"))
201+
{
202+
sb.Append(app.Address);
203+
sb.Append("?1=1");
204+
}
205+
}
206+
else
207+
{
208+
209+
if (app.Address.Contains("?"))
210+
{
211+
sb.Append(app.Address);
212+
sb.Append("&");
213+
sb.Append(app.Params.TrimStart('?').TrimStart('&'));
214+
}
215+
else
216+
{
217+
sb.Append(app.Address);
218+
sb.Append("?");
219+
sb.Append(app.Params.TrimStart('?').TrimStart('&'));
220+
}
221+
}
222+
if (!query.IsNullOrEmpty())
223+
{
224+
sb.Append("&");
225+
sb.Append(query.TrimStart('?').TrimStart('&'));
226+
}
227+
228+
return sb.ToString();
229+
230+
}
231+
}
232+
}
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{4853EEE1-204A-4501-A2A6-7D14CA7DCD0E}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>Business.Platform</RootNamespace>
12+
<AssemblyName>Business.Platform</AssemblyName>
13+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<DebugType>pdbonly</DebugType>
27+
<Optimize>true</Optimize>
28+
<OutputPath>bin\Release\</OutputPath>
29+
<DefineConstants>TRACE</DefineConstants>
30+
<ErrorReport>prompt</ErrorReport>
31+
<WarningLevel>4</WarningLevel>
32+
</PropertyGroup>
33+
<ItemGroup>
34+
<Reference Include="LitJSON">
35+
<HintPath>F:\TDDownload\LitJSON\LitJSON.dll</HintPath>
36+
</Reference>
37+
<Reference Include="System" />
38+
<Reference Include="System.Core" />
39+
<Reference Include="System.Drawing" />
40+
<Reference Include="System.Transactions" />
41+
<Reference Include="System.Web" />
42+
<Reference Include="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
43+
<Reference Include="System.Xml.Linq" />
44+
<Reference Include="System.Data.DataSetExtensions" />
45+
<Reference Include="Microsoft.CSharp" />
46+
<Reference Include="System.Data" />
47+
<Reference Include="System.Xml" />
48+
</ItemGroup>
49+
<ItemGroup>
50+
<Compile Include="AppLibrary.cs" />
51+
<Compile Include="DBConnection.cs" />
52+
<Compile Include="Dictionary.cs" />
53+
<Compile Include="Log.cs" />
54+
<Compile Include="OnlineUsers.cs" />
55+
<Compile Include="Organize.cs" />
56+
<Compile Include="Properties\AssemblyInfo.cs" />
57+
<Compile Include="Role.cs" />
58+
<Compile Include="RoleApp.cs" />
59+
<Compile Include="Users.cs" />
60+
<Compile Include="UsersInfo.cs" />
61+
<Compile Include="UsersRelation.cs" />
62+
<Compile Include="UsersRole.cs" />
63+
<Compile Include="WorkFlow.cs" />
64+
<Compile Include="WorkFlowButtons.cs" />
65+
<Compile Include="WorkFlowComment.cs" />
66+
<Compile Include="WorkFlowData.cs" />
67+
<Compile Include="WorkFlowForm.cs" />
68+
<Compile Include="WorkFlowTask.cs" />
69+
<Compile Include="WorkGroup.cs" />
70+
</ItemGroup>
71+
<ItemGroup>
72+
<ProjectReference Include="..\MyCache.Factory\MyCache.Factory.csproj">
73+
<Project>{1E605362-7767-45F9-9BC1-F8E495FA3F4E}</Project>
74+
<Name>MyCache.Factory</Name>
75+
</ProjectReference>
76+
<ProjectReference Include="..\MyCache.InProc\MyCache.InProc.csproj">
77+
<Project>{85CE9C4B-0E05-4951-83C0-BBB65F43DF28}</Project>
78+
<Name>MyCache.InProc</Name>
79+
</ProjectReference>
80+
<ProjectReference Include="..\MyCache.Interface\MyCache.Interface.csproj">
81+
<Project>{C3F609A8-6A7B-4BFF-9E21-02B785AD4F20}</Project>
82+
<Name>MyCache.Interface</Name>
83+
</ProjectReference>
84+
<ProjectReference Include="..\MyCache.IO\MyCache.IO.csproj">
85+
<Project>{41C4C5A0-0CF3-4E8F-9339-1F557C6D5A0F}</Project>
86+
<Name>MyCache.IO</Name>
87+
</ProjectReference>
88+
<ProjectReference Include="..\Data.Factory\Data.Factory.csproj">
89+
<Project>{C34A6499-929A-4F0E-B1BA-2A6A9734888E}</Project>
90+
<Name>Data.Factory</Name>
91+
</ProjectReference>
92+
<ProjectReference Include="..\Data.Interface\Data.Interface.csproj">
93+
<Project>{7F7EC855-EE2F-4EF5-861B-DA945961C1A2}</Project>
94+
<Name>Data.Interface</Name>
95+
</ProjectReference>
96+
<ProjectReference Include="..\Data.Model\Data.Model.csproj">
97+
<Project>{75FB2C86-F7D3-4E94-82E9-46DD9787B39D}</Project>
98+
<Name>Data.Model</Name>
99+
</ProjectReference>
100+
<ProjectReference Include="..\Data.MSSQL\Data.MSSQL.csproj">
101+
<Project>{EFCD6A7C-C598-4BBD-BDC6-3016AAABD26C}</Project>
102+
<Name>Data.MSSQL</Name>
103+
</ProjectReference>
104+
<ProjectReference Include="..\Utility\Utility.csproj">
105+
<Project>{CE3B0ADB-736E-4A7B-BEDE-801C9104F95E}</Project>
106+
<Name>Utility</Name>
107+
</ProjectReference>
108+
</ItemGroup>
109+
<ItemGroup />
110+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
111+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
112+
Other similar extension points exist, see Microsoft.Common.targets.
113+
<Target Name="BeforeBuild">
114+
</Target>
115+
<Target Name="AfterBuild">
116+
</Target>
117+
-->
118+
</Project>

0 commit comments

Comments
 (0)