Skip to content

Commit 5c8e744

Browse files
tweak.
1 parent c4042a0 commit 5c8e744

10 files changed

Lines changed: 662 additions & 150 deletions

File tree

root/programs/CS/Frameworks/Infrastructure/AsyncProcessingService/AsyncProcessingService.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@
5151
<Reference Include="System.Data" />
5252
</ItemGroup>
5353
<ItemGroup>
54-
<Compile Include="AsyncProcessingService.cs" />
54+
<Compile Include="AsyncProcessingService.cs">
55+
<SubType>Component</SubType>
56+
</Compile>
5557
<Compile Include="Properties\AssemblyInfo.cs" />
5658
<Compile Include="ServiceInstaller.cs">
5759
<SubType>Component</SubType>

root/programs/CS/Frameworks/Infrastructure/Business/Business.csproj

Lines changed: 101 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,33 +63,116 @@
6363
<Prefer32Bit>false</Prefer32Bit>
6464
</PropertyGroup>
6565
<ItemGroup>
66-
<Reference Include="OpenTouryo.DamManagedOdp">
67-
<HintPath>..\..\..\..\..\..\..\OpenTouryo\root\programs\CS\Frameworks\Infrastructure\Build\OpenTouryo.DamManagedOdp.dll</HintPath>
66+
<Reference Include="DotNetZip, Version=1.10.1.0, Culture=neutral, PublicKeyToken=6583c7c814667745, processorArchitecture=MSIL">
67+
<HintPath>..\packages\DotNetZip.1.10.1\lib\net20\DotNetZip.dll</HintPath>
68+
<Private>True</Private>
6869
</Reference>
69-
<Reference Include="OpenTouryo.DamMySQL">
70-
<HintPath>..\..\..\..\..\..\..\OpenTouryo\root\programs\CS\Frameworks\Infrastructure\Build\OpenTouryo.DamMySQL.dll</HintPath>
70+
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
71+
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
72+
<Private>True</Private>
7173
</Reference>
72-
<Reference Include="OpenTouryo.DamPstGrS">
73-
<HintPath>..\..\..\..\..\..\..\OpenTouryo\root\programs\CS\Frameworks\Infrastructure\Build\OpenTouryo.DamPstGrS.dll</HintPath>
74+
<Reference Include="Microsoft.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
75+
<HintPath>..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
76+
<Private>True</Private>
7477
</Reference>
75-
<Reference Include="OpenTouryo.Framework">
76-
<HintPath>..\..\..\..\..\..\..\OpenTouryo\root\programs\CS\Frameworks\Infrastructure\Build\OpenTouryo.Framework.dll</HintPath>
78+
<Reference Include="Microsoft.Owin.Security, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
79+
<HintPath>..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll</HintPath>
80+
<Private>True</Private>
7781
</Reference>
78-
<Reference Include="OpenTouryo.Public">
79-
<HintPath>..\..\..\..\..\..\..\OpenTouryo\root\programs\CS\Frameworks\Infrastructure\Build\OpenTouryo.Public.dll</HintPath>
82+
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
83+
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
84+
<Private>True</Private>
85+
</Reference>
86+
<Reference Include="MySql.Data, Version=6.9.12.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
87+
<HintPath>..\packages\MySql.Data.6.9.12\lib\net45\MySql.Data.dll</HintPath>
88+
<Private>True</Private>
89+
</Reference>
90+
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
91+
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
92+
<Private>True</Private>
93+
</Reference>
94+
<Reference Include="Npgsql, Version=3.2.5.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
95+
<HintPath>..\packages\Npgsql.3.2.5\lib\net451\Npgsql.dll</HintPath>
96+
<Private>True</Private>
97+
</Reference>
98+
<Reference Include="OpenTouryo.DamManagedOdp, Version=2.3.0.0, Culture=neutral, processorArchitecture=MSIL">
99+
<HintPath>..\packages\Touryo.Infrastructure.Public.Db.DamManagedOdp.2.3.0\lib\net46\OpenTouryo.DamManagedOdp.dll</HintPath>
100+
<Private>True</Private>
101+
</Reference>
102+
<Reference Include="OpenTouryo.DamMySQL, Version=2.3.0.0, Culture=neutral, processorArchitecture=MSIL">
103+
<HintPath>..\packages\Touryo.Infrastructure.Public.Db.DamMySQL.2.3.0\lib\net46\OpenTouryo.DamMySQL.dll</HintPath>
104+
<Private>True</Private>
105+
</Reference>
106+
<Reference Include="OpenTouryo.DamPstGrS, Version=2.3.0.0, Culture=neutral, processorArchitecture=MSIL">
107+
<HintPath>..\packages\Touryo.Infrastructure.Public.Db.DamPstGrS.2.3.0\lib\net46\OpenTouryo.DamPstGrS.dll</HintPath>
108+
<Private>True</Private>
109+
</Reference>
110+
<Reference Include="OpenTouryo.Framework, Version=2.3.0.0, Culture=neutral, processorArchitecture=MSIL">
111+
<HintPath>..\packages\Touryo.Infrastructure.Framework.2.3.0\lib\net46\OpenTouryo.Framework.dll</HintPath>
112+
<Private>True</Private>
113+
</Reference>
114+
<Reference Include="OpenTouryo.Public, Version=2.3.0.0, Culture=neutral, processorArchitecture=MSIL">
115+
<HintPath>..\packages\Touryo.Infrastructure.Public.2.3.0\lib\net46\OpenTouryo.Public.dll</HintPath>
116+
<Private>True</Private>
117+
</Reference>
118+
<Reference Include="Oracle.ManagedDataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=MSIL">
119+
<HintPath>..\packages\Oracle.ManagedDataAccess.12.2.1100\lib\net40\Oracle.ManagedDataAccess.dll</HintPath>
120+
<Private>True</Private>
121+
</Reference>
122+
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
123+
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
124+
<Private>True</Private>
80125
</Reference>
81126
<Reference Include="System" />
82127
<Reference Include="System.Configuration" />
83128
<Reference Include="System.Data" />
129+
<Reference Include="System.Net.Http" />
130+
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
131+
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
132+
<Private>True</Private>
133+
</Reference>
84134
<Reference Include="System.ServiceModel" />
135+
<Reference Include="System.Threading.Tasks.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
136+
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.3.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
137+
<Private>True</Private>
138+
</Reference>
139+
<Reference Include="System.Web" />
140+
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
141+
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
142+
<Private>True</Private>
143+
</Reference>
144+
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
145+
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
146+
<Private>True</Private>
147+
</Reference>
148+
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
149+
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
150+
<Private>True</Private>
151+
</Reference>
152+
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
153+
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
154+
<Private>True</Private>
155+
</Reference>
156+
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
157+
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
158+
<Private>True</Private>
159+
</Reference>
160+
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
161+
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
162+
<Private>True</Private>
163+
</Reference>
164+
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
165+
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
166+
<Private>True</Private>
167+
</Reference>
85168
<Reference Include="System.Xml" />
86169
</ItemGroup>
87170
<ItemGroup>
88-
<Compile Include="AsyncProcessingService\ApsUtility.cs" />
89-
<Compile Include="AsyncProcessingService\ApsParameterValue.cs" />
90-
<Compile Include="AsyncProcessingService\ApsReturnValue.cs" />
91171
<Compile Include="AsyncProcessingService\ApsLayerB.cs" />
92172
<Compile Include="AsyncProcessingService\ApsLayerD.cs" />
173+
<Compile Include="AsyncProcessingService\ApsParameterValue.cs" />
174+
<Compile Include="AsyncProcessingService\ApsReturnValue.cs" />
175+
<Compile Include="AsyncProcessingService\ApsUtility.cs" />
93176
<Compile Include="AsyncProcessingService\MyApsBaseLogic.cs" />
94177
<Compile Include="Business\MyFcBaseLogic.cs" />
95178
<Compile Include="Common\MyParameterValue.cs" />
@@ -112,11 +195,10 @@
112195
</Compile>
113196
<Compile Include="Str\JISX0208_1983Checker.cs" />
114197
<Compile Include="Util\GMTMaster.cs" />
198+
<Compile Include="Util\MyCmnFunction.cs" />
115199
<Compile Include="Util\MyAttribute.cs" />
116200
<Compile Include="Util\MyLiteral.cs" />
117201
<Compile Include="Util\MySubsysInfo.cs" />
118-
<Compile Include="Util\MyTimeZone.cs" />
119-
<Compile Include="Util\MyTimeZoneEnum.cs" />
120202
<Compile Include="Util\MyUserInfo.cs" />
121203
</ItemGroup>
122204
<ItemGroup>
@@ -150,6 +232,10 @@
150232
<LastGenOutput>MyBusinessSystemExceptionMessageResource.Designer.cs</LastGenOutput>
151233
</EmbeddedResource>
152234
</ItemGroup>
235+
<ItemGroup>
236+
<None Include="app.config" />
237+
<None Include="packages.config" />
238+
</ItemGroup>
153239
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
154240
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
155241
Other similar extension points exist, see Microsoft.Common.targets.

root/programs/CS/Frameworks/Infrastructure/Business/Dao/CmnDao.cs

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
//* 2013/07/07 西野 大介 ExecGenerateSQL(SQL生成)メソッド(実行しない)を追加
4040
//* 2014/11/20 Sandeep Implemented CommandTimeout property and SetCommandTimeout method.
4141
//* 2014/11/20 Sai removed IDbCommand property in SetCommandTimeout method.
42+
//* 2018/08/07 西野 大介 ストアド実行のためCommandType.StoredProcedureを設定可能に。
4243
//**********************************************************************************
4344

4445
using System;
@@ -57,6 +58,9 @@ public class CmnDao : MyBaseDao
5758
{
5859
#region インスタンス変数
5960

61+
/// <summary>CommandType</summary>
62+
private CommandType? _cmdType = null;
63+
6064
#region パラメタ
6165

6266
/// <summary>ユーザ パラメタ(文字列置換)用ディクショナリ</summary>
@@ -65,14 +69,16 @@ public class CmnDao : MyBaseDao
6569
/// <summary>パラメタ ライズド クエリのパラメタ用ディクショナリ</summary>
6670
private Dictionary<string, object> DicParameter = new Dictionary<string, object>();
6771

72+
#region 追加のDictionary
6873
/// <summary>パラメタ ライズド クエリの指定されたパラメータ(の型)を保持するディクショナリ</summary>
6974
private Dictionary<string, object> DicParameterType = new Dictionary<string, object>();
7075
/// <summary>パラメタ ライズド クエリの指定されたパラメータ(のサイズ)を保持するディクショナリ</summary>
7176
private Dictionary<string, int> DicParameterSize = new Dictionary<string, int>();
7277
/// <summary>パラメタ ライズド クエリの指定されたパラメータ(の方向)を保持するディクショナリ</summary>
7378
private Dictionary<string, ParameterDirection> DicParameterDirection = new Dictionary<string, ParameterDirection>();
79+
#endregion
7480

75-
#endregion
81+
#endregion
7682

7783
#region パラメタの制御
7884

@@ -252,6 +258,13 @@ public int CommandTimeout
252258
/// <remarks>自由に利用できる。</remarks>
253259
public CmnDao(BaseDam dam) : base(dam) { }
254260

261+
/// <summary>コンストラクタ</summary>
262+
/// <remarks>自由に利用できる。</remarks>
263+
public CmnDao(BaseDam dam, CommandType cmdType) : base(dam)
264+
{
265+
this._cmdType = cmdType;
266+
}
267+
255268
#endregion
256269

257270
#region クエリ メソッド
@@ -384,12 +397,27 @@ private void SetSQL()
384397
if (this._sQLFileName != "")
385398
{
386399
// ファイルから
387-
this.SetSqlByFile2(this._sQLFileName);
400+
if (this._cmdType.HasValue)
401+
{
402+
this.SetSqlByFile2(this._sQLFileName, this._cmdType.Value);
403+
}
404+
else
405+
{
406+
this.SetSqlByFile2(this._sQLFileName);
407+
}
388408
}
389409
else if (this._sQLText != "")
390410
{
391411
// テキストから
392-
this.SetSqlByCommand(this._sQLText);
412+
if (this._cmdType.HasValue)
413+
{
414+
this.SetSqlByCommand(this._sQLText, this._cmdType.Value);
415+
}
416+
else
417+
{
418+
this.SetSqlByCommand(this._sQLText);
419+
}
420+
393421
}
394422
else
395423
{

root/programs/CS/Frameworks/Infrastructure/Business/Dao/MyBaseDao.cs

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@
3333
//* 2012/06/14 西野 大介 SetSqlByFile2を追加(SetSqlByFile強化版)
3434
//* ・sqlTextFilePathを自動連結
3535
//* ・EmbeddedResourceLoaderに対応
36+
//* 2018/08/07 西野 大介 CommandType.StoredProcedureを設定可能に。
3637
//**********************************************************************************
3738

3839
using System;
3940
using System.IO;
41+
using System.Data;
4042

4143
using Touryo.Infrastructure.Business.Util;
4244
using Touryo.Infrastructure.Framework.Dao;
@@ -56,20 +58,45 @@ public abstract class MyBaseDao : BaseDao
5658
/// <summary>SetSqlByFileの強化版メソッド</summary>
5759
/// <param name="sQLFileName">ファイル名</param>
5860
public void SetSqlByFile2(string sQLFileName)
61+
{
62+
this.SetSqlByFile2(sQLFileName, null);
63+
}
64+
65+
/// <summary>SetSqlByFileの強化版メソッド</summary>
66+
/// <param name="sQLFileName">ファイル名</param>
67+
/// <param name="cmdType">CommandType</param>
68+
public void SetSqlByFile2(string sQLFileName, CommandType? cmdType)
5969
{
6070
// SQLを設定する。
6171
if (MyBaseDao.UseEmbeddedResource)
6272
{
6373
// 埋め込まれたリソースファイル
64-
this.SetSqlByFile(
74+
if (cmdType.HasValue)
75+
{
76+
this.SetSqlByFile(
77+
GetConfigParameter.GetConfigValue("sqlTextFilePath") + "." + sQLFileName, cmdType.Value);
78+
}
79+
else
80+
{
81+
this.SetSqlByFile(
6582
GetConfigParameter.GetConfigValue("sqlTextFilePath") + "." + sQLFileName);
83+
}
6684
}
6785
else
6886
{
6987
// 通常のファイル
70-
this.SetSqlByFile(
71-
Path.Combine(
72-
GetConfigParameter.GetConfigValue("sqlTextFilePath"), sQLFileName));
88+
if (cmdType.HasValue)
89+
{
90+
this.SetSqlByFile(
91+
Path.Combine(
92+
GetConfigParameter.GetConfigValue("sqlTextFilePath"), sQLFileName), cmdType.Value);
93+
}
94+
else
95+
{
96+
this.SetSqlByFile(
97+
Path.Combine(
98+
GetConfigParameter.GetConfigValue("sqlTextFilePath"), sQLFileName));
99+
}
73100
}
74101
}
75102

0 commit comments

Comments
 (0)