Skip to content

Commit

Permalink
tweak.
Browse files Browse the repository at this point in the history
  • Loading branch information
daisukenishino2 committed Sep 18, 2018
1 parent c4042a0 commit 5c8e744
Show file tree
Hide file tree
Showing 10 changed files with 662 additions and 150 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
<Compile Include="AsyncProcessingService.cs" />
<Compile Include="AsyncProcessingService.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ServiceInstaller.cs">
<SubType>Component</SubType>
Expand Down
116 changes: 101 additions & 15 deletions root/programs/CS/Frameworks/Infrastructure/Business/Business.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -63,33 +63,116 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="OpenTouryo.DamManagedOdp">
<HintPath>..\..\..\..\..\..\..\OpenTouryo\root\programs\CS\Frameworks\Infrastructure\Build\OpenTouryo.DamManagedOdp.dll</HintPath>
<Reference Include="DotNetZip, Version=1.10.1.0, Culture=neutral, PublicKeyToken=6583c7c814667745, processorArchitecture=MSIL">
<HintPath>..\packages\DotNetZip.1.10.1\lib\net20\DotNetZip.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTouryo.DamMySQL">
<HintPath>..\..\..\..\..\..\..\OpenTouryo\root\programs\CS\Frameworks\Infrastructure\Build\OpenTouryo.DamMySQL.dll</HintPath>
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.8\lib\net45-full\log4net.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTouryo.DamPstGrS">
<HintPath>..\..\..\..\..\..\..\OpenTouryo\root\programs\CS\Frameworks\Infrastructure\Build\OpenTouryo.DamPstGrS.dll</HintPath>
<Reference Include="Microsoft.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTouryo.Framework">
<HintPath>..\..\..\..\..\..\..\OpenTouryo\root\programs\CS\Frameworks\Infrastructure\Build\OpenTouryo.Framework.dll</HintPath>
<Reference Include="Microsoft.Owin.Security, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTouryo.Public">
<HintPath>..\..\..\..\..\..\..\OpenTouryo\root\programs\CS\Frameworks\Infrastructure\Build\OpenTouryo.Public.dll</HintPath>
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="MySql.Data, Version=6.9.12.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.6.9.12\lib\net45\MySql.Data.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Npgsql, Version=3.2.5.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
<HintPath>..\packages\Npgsql.3.2.5\lib\net451\Npgsql.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTouryo.DamManagedOdp, Version=2.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Touryo.Infrastructure.Public.Db.DamManagedOdp.2.3.0\lib\net46\OpenTouryo.DamManagedOdp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTouryo.DamMySQL, Version=2.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Touryo.Infrastructure.Public.Db.DamMySQL.2.3.0\lib\net46\OpenTouryo.DamMySQL.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTouryo.DamPstGrS, Version=2.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Touryo.Infrastructure.Public.Db.DamPstGrS.2.3.0\lib\net46\OpenTouryo.DamPstGrS.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTouryo.Framework, Version=2.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Touryo.Infrastructure.Framework.2.3.0\lib\net46\OpenTouryo.Framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="OpenTouryo.Public, Version=2.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Touryo.Infrastructure.Public.2.3.0\lib\net46\OpenTouryo.Public.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Oracle.ManagedDataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342, processorArchitecture=MSIL">
<HintPath>..\packages\Oracle.ManagedDataAccess.12.2.1100\lib\net40\Oracle.ManagedDataAccess.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.ServiceModel" />
<Reference Include="System.Threading.Tasks.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.3.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AsyncProcessingService\ApsUtility.cs" />
<Compile Include="AsyncProcessingService\ApsParameterValue.cs" />
<Compile Include="AsyncProcessingService\ApsReturnValue.cs" />
<Compile Include="AsyncProcessingService\ApsLayerB.cs" />
<Compile Include="AsyncProcessingService\ApsLayerD.cs" />
<Compile Include="AsyncProcessingService\ApsParameterValue.cs" />
<Compile Include="AsyncProcessingService\ApsReturnValue.cs" />
<Compile Include="AsyncProcessingService\ApsUtility.cs" />
<Compile Include="AsyncProcessingService\MyApsBaseLogic.cs" />
<Compile Include="Business\MyFcBaseLogic.cs" />
<Compile Include="Common\MyParameterValue.cs" />
Expand All @@ -112,11 +195,10 @@
</Compile>
<Compile Include="Str\JISX0208_1983Checker.cs" />
<Compile Include="Util\GMTMaster.cs" />
<Compile Include="Util\MyCmnFunction.cs" />
<Compile Include="Util\MyAttribute.cs" />
<Compile Include="Util\MyLiteral.cs" />
<Compile Include="Util\MySubsysInfo.cs" />
<Compile Include="Util\MyTimeZone.cs" />
<Compile Include="Util\MyTimeZoneEnum.cs" />
<Compile Include="Util\MyUserInfo.cs" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -150,6 +232,10 @@
<LastGenOutput>MyBusinessSystemExceptionMessageResource.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
34 changes: 31 additions & 3 deletions root/programs/CS/Frameworks/Infrastructure/Business/Dao/CmnDao.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
//* 2013/07/07 西野 大介 ExecGenerateSQL(SQL生成)メソッド(実行しない)を追加
//* 2014/11/20 Sandeep Implemented CommandTimeout property and SetCommandTimeout method.
//* 2014/11/20 Sai removed IDbCommand property in SetCommandTimeout method.
//* 2018/08/07 西野 大介 ストアド実行のためCommandType.StoredProcedureを設定可能に。
//**********************************************************************************

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

/// <summary>CommandType</summary>
private CommandType? _cmdType = null;

#region パラメタ

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

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

#endregion
#endregion

#region パラメタの制御

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

/// <summary>コンストラクタ</summary>
/// <remarks>自由に利用できる。</remarks>
public CmnDao(BaseDam dam, CommandType cmdType) : base(dam)
{
this._cmdType = cmdType;
}

#endregion

#region クエリ メソッド
Expand Down Expand Up @@ -384,12 +397,27 @@ private void SetSQL()
if (this._sQLFileName != "")
{
// ファイルから
this.SetSqlByFile2(this._sQLFileName);
if (this._cmdType.HasValue)
{
this.SetSqlByFile2(this._sQLFileName, this._cmdType.Value);
}
else
{
this.SetSqlByFile2(this._sQLFileName);
}
}
else if (this._sQLText != "")
{
// テキストから
this.SetSqlByCommand(this._sQLText);
if (this._cmdType.HasValue)
{
this.SetSqlByCommand(this._sQLText, this._cmdType.Value);
}
else
{
this.SetSqlByCommand(this._sQLText);
}

}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@
//* 2012/06/14 西野 大介 SetSqlByFile2を追加(SetSqlByFile強化版)
//* ・sqlTextFilePathを自動連結
//* ・EmbeddedResourceLoaderに対応
//* 2018/08/07 西野 大介 CommandType.StoredProcedureを設定可能に。
//**********************************************************************************

using System;
using System.IO;
using System.Data;

using Touryo.Infrastructure.Business.Util;
using Touryo.Infrastructure.Framework.Dao;
Expand All @@ -56,20 +58,45 @@ public abstract class MyBaseDao : BaseDao
/// <summary>SetSqlByFileの強化版メソッド</summary>
/// <param name="sQLFileName">ファイル名</param>
public void SetSqlByFile2(string sQLFileName)
{
this.SetSqlByFile2(sQLFileName, null);
}

/// <summary>SetSqlByFileの強化版メソッド</summary>
/// <param name="sQLFileName">ファイル名</param>
/// <param name="cmdType">CommandType</param>
public void SetSqlByFile2(string sQLFileName, CommandType? cmdType)
{
// SQLを設定する。
if (MyBaseDao.UseEmbeddedResource)
{
// 埋め込まれたリソースファイル
this.SetSqlByFile(
if (cmdType.HasValue)
{
this.SetSqlByFile(
GetConfigParameter.GetConfigValue("sqlTextFilePath") + "." + sQLFileName, cmdType.Value);
}
else
{
this.SetSqlByFile(
GetConfigParameter.GetConfigValue("sqlTextFilePath") + "." + sQLFileName);
}
}
else
{
// 通常のファイル
this.SetSqlByFile(
Path.Combine(
GetConfigParameter.GetConfigValue("sqlTextFilePath"), sQLFileName));
if (cmdType.HasValue)
{
this.SetSqlByFile(
Path.Combine(
GetConfigParameter.GetConfigValue("sqlTextFilePath"), sQLFileName), cmdType.Value);
}
else
{
this.SetSqlByFile(
Path.Combine(
GetConfigParameter.GetConfigValue("sqlTextFilePath"), sQLFileName));
}
}
}

Expand Down
Loading

0 comments on commit 5c8e744

Please sign in to comment.