Skip to content

Commit

Permalink
DB and BC
Browse files Browse the repository at this point in the history
  • Loading branch information
yscom-git committed Sep 27, 2023
1 parent 2083dd3 commit 6dbcbf4
Show file tree
Hide file tree
Showing 10 changed files with 269 additions and 43 deletions.
19 changes: 19 additions & 0 deletions YMES.DEPLOY/Config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>

<YMES_CONFIG>
<CORCD>5200</CORCD><!--Corporation Code-->
<BIZCD>5210</BIZCD><!--Business Code-->
<DB_CONNECTION>ORACLE</DB_CONNECTION><!--DB Type : ORACLE, MSSQL, WCF, ACCESS-->
<DBNAME>172.22.151.203;172.22.151.204</DBNAME><!--DB Server IP-->
<DBUID>mes</DBUID><!--DB User ID-->
<DBPWD>mes</DBPWD><!--DB User Password-->
<DBSERVICE>SYAP</DBSERVICE><!--DB Service(Oracle)-->


<DEBUG_CLIENT>@MES.TagPrt_PartCheck</DEBUG_CLIENT><!--Client IP or @namespace.BC-->
<DEBUG_MODE>Y</DEBUG_MODE><!--Debug Mode-->
</YMES_CONFIG>




14 changes: 14 additions & 0 deletions YMES.DEPLOY/CustomizedMainFrm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,19 @@ public CustomizedMainFrm()
{
InitializeComponent();
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
StartBC();
}
private void StartBC()
{
string pgmClassName = "";
if (GetXMLConfig("DEBUG_CLIENT").Contains("@"))
{
pgmClassName = Application.ProductName + "." + GetXMLConfig("DEBUG_CLIENT").Substring(1);
}
ChildBC = (YMES.FX.MainForm.BaseContainer)Activator.CreateInstance(Type.GetType(pgmClassName));
}
}
}
37 changes: 37 additions & 0 deletions YMES.DEPLOY/MES/TagPrt_PartCheck.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions YMES.DEPLOY/MES/TagPrt_PartCheck.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace YMES.DEPLOY.MES
{
public partial class TagPrt_PartCheck : YMES.FX.MainForm.BaseContainer
{
public TagPrt_PartCheck()
{
InitializeComponent();
}
}
}
11 changes: 11 additions & 0 deletions YMES.DEPLOY/YMES.DEPLOY.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
<Compile Include="CustomizedMainFrm.Designer.cs">
<DependentUpon>CustomizedMainFrm.cs</DependentUpon>
</Compile>
<Compile Include="MES\TagPrt_PartCheck.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="MES\TagPrt_PartCheck.Designer.cs">
<DependentUpon>TagPrt_PartCheck.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="CustomizedMainFrm.resx">
Expand Down Expand Up @@ -94,5 +100,10 @@
<Name>YMES.FX.PLC</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="Config.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
16 changes: 13 additions & 3 deletions YMES.FX.DB/CommonHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,25 @@ public class CommonHelper : DBComponent, IDBBase

public CommonHelper()
{

switch(m_DBKind)
AssignDBType(m_DBKind);
}
public CommonHelper(DBKindEnum ty)
{
AssignDBType(ty);


}
private void AssignDBType(DBKindEnum ty)
{
m_DBKind = ty;
switch (ty)
{
case DBKindEnum.Oracle:
m_DB = new OracleHelper();
break;
case DBKindEnum.MSSQL:
m_DB = new MSSqlHelper();
break;
break;
case DBKindEnum.WCF:
m_DB = new WCFHelper();
break;
Expand Down
13 changes: 13 additions & 0 deletions YMES.FX.Forms/BaseContainer.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 2 additions & 11 deletions YMES.FX.Forms/BaseMainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6dbcbf4

Please sign in to comment.