From 40c305d182a51546db948e2c5e00fcc93d861d16 Mon Sep 17 00:00:00 2001 From: Panus Chachon Date: Mon, 17 Apr 2023 10:43:09 +0700 Subject: [PATCH] OPen by Complo --- DxOpenWebFw/DxOpenWebFw.csproj | 6 ++++++ DxOpenWebFw/Program.cs | 26 ++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/DxOpenWebFw/DxOpenWebFw.csproj b/DxOpenWebFw/DxOpenWebFw.csproj index 77d6b88..6b5af97 100644 --- a/DxOpenWebFw/DxOpenWebFw.csproj +++ b/DxOpenWebFw/DxOpenWebFw.csproj @@ -51,6 +51,12 @@ favicon.ico + + ..\..\..\Library_Debug\ClassGenDB.dll + + + ..\..\..\Library_Debug\ClassUtility.dll + diff --git a/DxOpenWebFw/Program.cs b/DxOpenWebFw/Program.cs index 39cdb0d..107d82f 100644 --- a/DxOpenWebFw/Program.cs +++ b/DxOpenWebFw/Program.cs @@ -1,3 +1,5 @@ +using ClassGenDB; +using ClassUtility; using System; using System.Collections.Generic; using System.Diagnostics; @@ -8,11 +10,28 @@ namespace DxOpenWebFw { class Program { + static string DevKey = "FCPcGMiYfsYPgUV+fulrHwQ2hbt4mv6HPgBsxkxvO+k="; + static void Main(string[] args) { - Console.WriteLine("BuildVersion : 1.0.0"); + DevCallContext devCallContext = new DevCallContext(DevKey); + + Console.WriteLine("BuildVersion : 1.1.0"); Console.WriteLine("Computer Name : " + System.Environment.MachineName); - string strUrl = DxOpenWebFw.Properties.Settings.Default.URL + "?COMPUTERNAME=" + System.Environment.MachineName; + Console.WriteLine("DB Connect : " + devCallContext.GetStringConnectionDev().Substring(0,60)); + + Class_Db dbDev = new Class_Db(devCallContext.GetStringConnectionDev()); + + TB_SETUP_COMPUTER_NAME tbComName = new TB_SETUP_COMPUTER_NAME(); + DBCondition xDBCondition = DBExpression.Normal(tbComName.Field_Code.ColumnName, DBComparisonOperator.EqualEver, System.Environment.MachineName); + string strComloURL = DxData.getValueString(dbDev.GetValueData(tbComName.TableName, tbComName.Field_DefaultURLHIS.ColumnName, xDBCondition.ToString(), "Code", true)); + + string strUrl = DxOpenWebFw.Properties.Settings.Default.URL; + if (!string.IsNullOrEmpty(strComloURL)) + { + strUrl = strComloURL; + } + strUrl = strUrl + "?COMPUTERNAME=" + System.Environment.MachineName; var prs = new ProcessStartInfo(@"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"); prs.Arguments = strUrl; @@ -25,6 +44,8 @@ namespace DxOpenWebFw { Process.Start(strUrl); } + + /* //// Console.WriteLine("Computer Name : " + DxOpenWebFw.Properties.Settings.Default.PATH_PRINTCENTER); //// @@ -37,6 +58,7 @@ namespace DxOpenWebFw printcenter.Arguments = string.Format("LOCALSTART|JOB={0}|COM={1}", strJOBLIST, strComputerName); Process.Start(printcenter); } + */ } }