diff --git a/Project/Dialog/fDashboard.cs b/Project/Dialog/fDashboard.cs index ae76866..32a17b7 100644 --- a/Project/Dialog/fDashboard.cs +++ b/Project/Dialog/fDashboard.cs @@ -22,9 +22,9 @@ namespace Project.Dialog { InitializeComponent(); -#if WEB + InitializeWebView2(); -#endif + } private void InitializeWebView2() diff --git a/Project/Dialog/fWarning.Designer.cs b/Project/Dialog/fWarning.Designer.cs new file mode 100644 index 0000000..893175c --- /dev/null +++ b/Project/Dialog/fWarning.Designer.cs @@ -0,0 +1,63 @@ +namespace Project.Dialog +{ + partial class fWarning + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label1 + // + this.label1.Dock = System.Windows.Forms.DockStyle.Fill; + this.label1.Location = new System.Drawing.Point(0, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(543, 66); + this.label1.TabIndex = 0; + this.label1.Text = " 실행 환경을 검사하고 있습니다"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // fWarning + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(543, 66); + this.Controls.Add(this.label1); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "fWarning"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "fWarning"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/Project/Dialog/fWarning.cs b/Project/Dialog/fWarning.cs new file mode 100644 index 0000000..f927ec6 --- /dev/null +++ b/Project/Dialog/fWarning.cs @@ -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 Project.Dialog +{ + public partial class fWarning : Form + { + public fWarning() + { + InitializeComponent(); + } + } +} diff --git a/Project/Dialog/fWarning.resx b/Project/Dialog/fWarning.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Project/Dialog/fWarning.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Project/EETGW.csproj b/Project/EETGW.csproj index 6dc38dd..cd16ce6 100644 --- a/Project/EETGW.csproj +++ b/Project/EETGW.csproj @@ -51,7 +51,7 @@ Full False ..\..\..\..\..\Amkor\GroupWare\ - TRACE;DEBUG;WEB + TRACE;DEBUG;WEB1 prompt 4 false @@ -265,6 +265,12 @@ fLogin_WB.cs + + Form + + + fWarning.cs + @@ -493,6 +499,9 @@ fUnZip.cs + + fWarning.cs + fLog.cs diff --git a/Project/Pub.cs b/Project/Pub.cs index 5c32e26..7c2dda5 100644 --- a/Project/Pub.cs +++ b/Project/Pub.cs @@ -9,6 +9,10 @@ using System.Net.NetworkInformation; using System.Net; using System.Data.SqlClient; using System.Data; +using Microsoft.Web.WebView2.Core; +using Microsoft.Web.WebView2.WinForms; +using System.Drawing; +using System.Windows.Forms; namespace Project { @@ -19,14 +23,14 @@ namespace Project public static UserSetting uSetting; //user setting public static Setting setting; //global setting - + public static arUtil.Log log; //global logging system - + public static DateTime LastInputTime = DateTime.Now; public static CResult Result = new CResult(); public static DatabaseConnectionString.DatabaseInfo dbinfo = null; - - public static void init() + + public static void init() { FCOMMON.info.Path = Util.CurrentPath; if (Util.isLocalApplication()) @@ -48,67 +52,116 @@ namespace Project //log log = new arUtil.Log(); - //clear login info + //clear login info FCOMMON.info.Login = new FCOMMON.info.sUserInfo(); //language Lang.Loading(Pub.setting.Language + ".ini"); } + private static WebView2 webView21; + public static void InitializeWebView2() + { + // 수동으로 WebView2 컨트롤 생성 + webView21 = new WebView2(); + + // 기본 속성 설정 + webView21.CreationProperties = null; + webView21.DefaultBackgroundColor = Color.White; + webView21.Dock = System.Windows.Forms.DockStyle.Fill; + webView21.Location = new Point(0, 0); + webView21.Name = "webView21"; + webView21.Size = new Size(800, 600); + webView21.TabIndex = 0; + webView21.ZoomFactor = 1D; + + // 비동기 초기화 + InitializeAsync(); + } + async private static void InitializeAsync() + { + try + { + // Fixed Version 경로 설정 + string runtimePath = System.IO.Path.Combine(Application.StartupPath, "WebView2Runtime"); + + if (System.IO.Directory.Exists(runtimePath)) + { + var env = await CoreWebView2Environment.CreateAsync(runtimePath); + await webView21.EnsureCoreWebView2Async(env); + + } + else + { + // 시스템에 설치된 WebView2 사용 + await webView21.EnsureCoreWebView2Async(); + } + + // OWIN 서버의 Login 페이지로 연결 + //webView21.Source = new Uri("http://127.0.0.1:9000/Home/Login"); + InitWebView = 1; + } + catch (Exception ex) + { + InitWebView = 2; + } + } + public static byte InitWebView = 0; + public static string MakePasswordEnc(string data) - { - var sha1 = new System.Security.Cryptography.SHA1CryptoServiceProvider(); - var buffer = System.Text.Encoding.Default.GetBytes(data); - var hashbuf = sha1.ComputeHash(buffer); - var encpass = hashbuf.GetHexString(); - var ta = new dsMSSQLTableAdapters.UsersTableAdapter(); - encpass = encpass.Replace(" ", ""); - return encpass; - } - public static void SetFormStatus(ref System.Windows.Forms.Form f, string formid,Boolean read) - { - var fi = new System.IO.FileInfo(Util.CurrentPath + "formSetting\\" + formid + ".xml"); - if (fi.Directory.Exists == false) fi.Directory.Create(); - arUtil.XMLHelper xml = new arUtil.XMLHelper(fi.FullName); - if (!xml.Exist()) - { - xml.CreateFile(); - if (read) return; //읽기인데 파일이 없으므로 넘어간다. - } - if (read) - { - var leftStr = xml.get_Data("position", "left"); - var topStr = xml.get_Data("position", "top"); - int l = 0; - int t = 0; - if (!int.TryParse(leftStr, out l)) l = 0; - if (!int.TryParse(topStr, out t)) t = 0; - if (l != 0 || t != 0) - { - f.Location = new System.Drawing.Point(l, t); - } + { + var sha1 = new System.Security.Cryptography.SHA1CryptoServiceProvider(); + var buffer = System.Text.Encoding.Default.GetBytes(data); + var hashbuf = sha1.ComputeHash(buffer); + var encpass = hashbuf.GetHexString(); + var ta = new dsMSSQLTableAdapters.UsersTableAdapter(); + encpass = encpass.Replace(" ", ""); + return encpass; + } + public static void SetFormStatus(ref System.Windows.Forms.Form f, string formid, Boolean read) + { + var fi = new System.IO.FileInfo(Util.CurrentPath + "formSetting\\" + formid + ".xml"); + if (fi.Directory.Exists == false) fi.Directory.Create(); + arUtil.XMLHelper xml = new arUtil.XMLHelper(fi.FullName); + if (!xml.Exist()) + { + xml.CreateFile(); + if (read) return; //읽기인데 파일이 없으므로 넘어간다. + } + if (read) + { + var leftStr = xml.get_Data("position", "left"); + var topStr = xml.get_Data("position", "top"); + int l = 0; + int t = 0; + if (!int.TryParse(leftStr, out l)) l = 0; + if (!int.TryParse(topStr, out t)) t = 0; + if (l != 0 || t != 0) + { + f.Location = new System.Drawing.Point(l, t); + } - var wStr = xml.get_Data("size", "width"); - var hStr = xml.get_Data("size", "height"); - int w = 0; - int h = 0; - if (!int.TryParse(wStr, out w)) w = 0; - if (!int.TryParse(hStr, out h)) h = 0; - if (w != 0 || h != 0) - { - f.Size = new System.Drawing.Size(w, h); - } - } - else - { - xml.set_Data("position", "left", f.Left.ToString()); - xml.set_Data("position", "top", f.Top.ToString()); - xml.set_Data("size", "width", f.Width.ToString()); - xml.set_Data("size", "height", f.Height.ToString()); - xml.Save(); - } + var wStr = xml.get_Data("size", "width"); + var hStr = xml.get_Data("size", "height"); + int w = 0; + int h = 0; + if (!int.TryParse(wStr, out w)) w = 0; + if (!int.TryParse(hStr, out h)) h = 0; + if (w != 0 || h != 0) + { + f.Size = new System.Drawing.Size(w, h); + } + } + else + { + xml.set_Data("position", "left", f.Left.ToString()); + xml.set_Data("position", "top", f.Top.ToString()); + xml.set_Data("size", "width", f.Width.ToString()); + xml.set_Data("size", "height", f.Height.ToString()); + xml.Save(); + } - } + } public static void CheckNRegister3(string prgmName, string develop, string prgmVersion) { if (prgmName.Length > 50) prgmName = prgmName.Substring(0, 50); //길이제한 diff --git a/Project/Web/Controller/APIController.cs b/Project/Web/Controller/APIController.cs index cfeeff7..0fefd27 100644 --- a/Project/Web/Controller/APIController.cs +++ b/Project/Web/Controller/APIController.cs @@ -28,9 +28,6 @@ namespace Project.Web.Controllers if (p_order.Key != null) sql += " order by " + p_order.Value; } - - if (FCOMMON.info.Login.gcode == null) - FCOMMON.info.Login.gcode = "EET1P"; sql = sql.Replace("{gcode}", FCOMMON.info.Login.gcode); var cs = Properties.Settings.Default.gwcs; // "Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Info=True;User ID=eeadm;Password=uJnU8a8q&DJ+ug-D!"; @@ -80,8 +77,6 @@ namespace Project.Web.Controllers } - if (FCOMMON.info.Login.gcode == null) - FCOMMON.info.Login.gcode = "EET1P"; sql = sql.Replace("{gcode}", FCOMMON.info.Login.gcode); var cs = Properties.Settings.Default.gwcs;// "Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Info=True;User ID=eeadm;Password=uJnU8a8q&DJ+ug-D!"; diff --git a/Project/Web/Controller/DashBoardController.cs b/Project/Web/Controller/DashBoardController.cs index 9aa8a63..9db0ca0 100644 --- a/Project/Web/Controller/DashBoardController.cs +++ b/Project/Web/Controller/DashBoardController.cs @@ -17,26 +17,35 @@ namespace Project.Web.Controllers } - // PUT api/values/5 - public void Put(int id, [FromBody] string value) - { - } + //// PUT api/values/5 + //public void Put(int id, [FromBody] string value) + //{ + //} - // DELETE api/values/5 - public void Delete(int id) - { - } + //// DELETE api/values/5 + //public void Delete(int id) + //{ + //} [HttpGet] public string TodayCountH() { var sql = "select count(*) from EETGW_HolydayRequest " + - "where gcode = 'EET1P' and conf = 1 and HolyDays > 0 and " + - "sdate <= GETDATE() and edate >= GETDATE()"; - var cnt = DBM.ExecuteScalar(sql); - return cnt.ToString(); + " where gcode = @gcode and isnull(conf,0) = 1 "+ + " and HolyDays > 0 and " + + " sdate <= GETDATE() and edate >= GETDATE()"; + var cn = DBM.getCn(); + cn.Open(); + + var cmd = new System.Data.SqlClient.SqlCommand(sql, cn); + cmd.Parameters.Add("gcode", SqlDbType.VarChar).Value = FCOMMON.info.Login.gcode; + var cnt1 = (int)cmd.ExecuteScalar(); + cmd.Dispose(); + cn.Dispose(); + + return cnt1.ToString(); } [HttpGet] @@ -47,7 +56,7 @@ namespace Project.Web.Controllers { var cn = DBM.getCn(); - var sql = "select count(*) from EETGW_HolydayRequest" + + var sql = "select count(*) from EETGW_HolydayRequest" + " where gcode = @gcode" + " and conf = 0"; @@ -74,11 +83,88 @@ namespace Project.Web.Controllers }; return CreateJsonResponse(response); } + } + + [HttpGet] + public HttpResponseMessage GetholyRequestUser() + { + var sql = string.Empty; + sql = $" select uid,cate,sdate,edate,HolyReason,Users.name,holydays,holytimes,remark " + + $" from EETGW_HolydayRequest INNER JOIN " + + $" Users ON EETGW_HolydayRequest.uid = Users.id " + + $" where EETGW_HolydayRequest.gcode = @gcode" + + $" and isnull(conf,0) = 0 and HolyDays > 0 and sdate <= GETDATE() and edate >= GETDATE()"; + //sql = sql.Replace("{gcode}", FCOMMON.info.Login.gcode); + + var cs = Properties.Settings.Default.gwcs;// "Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Info=True;User ID=eeadm;Password=uJnU8a8q&DJ+ug-D!"; + var cn = new System.Data.SqlClient.SqlConnection(cs); + var cmd = new System.Data.SqlClient.SqlCommand(sql, cn); + cmd.Parameters.AddWithValue("gcode", FCOMMON.info.Login.gcode); + var da = new System.Data.SqlClient.SqlDataAdapter(cmd); + var dt = new System.Data.DataTable(); + da.Fill(dt); + da.Dispose(); + cmd.Dispose(); + cn.Dispose(); + + var txtjson = JsonConvert.SerializeObject(dt, new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }); + + var resp = new HttpResponseMessage() + { + Content = new StringContent( + txtjson, + System.Text.Encoding.UTF8, + "application/json") + }; + + return resp; } + [HttpGet] + public HttpResponseMessage GetCurrentUserCount() + { + + try + { + var cn = DBM.getCn(); + + var sql = "select count(*) " + + " from EETGW_GroupUser" + + " where gcode = @gcode" + + " and useUserState = 1 and useJobReport =1"; + + cn.Open(); + + var cmd = new System.Data.SqlClient.SqlCommand(sql, cn); + cmd.Parameters.Add("gcode", SqlDbType.VarChar).Value = FCOMMON.info.Login.gcode; + var cnt1 = (int)cmd.ExecuteScalar(); + cn.Dispose(); + + var response = new + { + Count = cnt1, + Message = string.Empty, + }; + return CreateJsonResponse(response); + } + catch (Exception ex) + { + var response = new + { + Count = 0, + Message = ex.Message, + }; + return CreateJsonResponse(response); + } + + + } [HttpGet] public HttpResponseMessage GetPurchaseWaitCount() @@ -86,7 +172,7 @@ namespace Project.Web.Controllers try { - FCOMMON.DBM.GetPurchaseWaitCount(FCOMMON.info.Login.gcode, out int cnt1, out int cnt2); + FCOMMON.DBM.GetPurchaseWaitCount(FCOMMON.info.Login.gcode, out int cnt1, out int cnt2); var response = new { NR = cnt1, @@ -141,7 +227,7 @@ namespace Project.Web.Controllers $" Users ON EETGW_HolydayRequest.uid = Users.id " + $" where EETGW_HolydayRequest.gcode = @gcode" + $" and conf = 1 and HolyDays > 0 and sdate <= GETDATE() and edate >= GETDATE()"; - + //sql = sql.Replace("{gcode}", FCOMMON.info.Login.gcode); var cs = Properties.Settings.Default.gwcs;// "Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Info=True;User ID=eeadm;Password=uJnU8a8q&DJ+ug-D!"; @@ -171,6 +257,135 @@ namespace Project.Web.Controllers return resp; } + [HttpGet] + public HttpResponseMessage GetPresentUserList() + { + try + { + var sql = "select * from vGroupUser where gcode = @gcode and useUserState = 1 and useJobReport = 1"; + + var cs = Properties.Settings.Default.gwcs; + var cn = new System.Data.SqlClient.SqlConnection(cs); + var cmd = new System.Data.SqlClient.SqlCommand(sql, cn); + cmd.Parameters.AddWithValue("gcode", FCOMMON.info.Login.gcode); + var da = new System.Data.SqlClient.SqlDataAdapter(cmd); + var dt = new System.Data.DataTable(); + da.Fill(dt); + da.Dispose(); + cmd.Dispose(); + cn.Dispose(); + + var txtjson = JsonConvert.SerializeObject(dt, new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }); + + var resp = new HttpResponseMessage() + { + Content = new StringContent( + txtjson, + System.Text.Encoding.UTF8, + "application/json") + }; + + return resp; + } + catch (Exception ex) + { + var response = new + { + Message = ex.Message, + }; + return CreateJsonResponse(response); + } + } + + [HttpGet] + public HttpResponseMessage GetPurchaseNRList() + { + try + { + var sql = "select pdate, process, pumname, pumscale, pumunit, pumqtyreq, pumprice, pumamt from Purchase where gcode = @gcode and state = '---' order by pdate desc"; + + var cs = Properties.Settings.Default.gwcs; + var cn = new System.Data.SqlClient.SqlConnection(cs); + var cmd = new System.Data.SqlClient.SqlCommand(sql, cn); + cmd.Parameters.AddWithValue("gcode", FCOMMON.info.Login.gcode); + var da = new System.Data.SqlClient.SqlDataAdapter(cmd); + var dt = new System.Data.DataTable(); + da.Fill(dt); + da.Dispose(); + cmd.Dispose(); + cn.Dispose(); + + var txtjson = JsonConvert.SerializeObject(dt, new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }); + + var resp = new HttpResponseMessage() + { + Content = new StringContent( + txtjson, + System.Text.Encoding.UTF8, + "application/json") + }; + + return resp; + } + catch (Exception ex) + { + var response = new + { + Message = ex.Message, + }; + return CreateJsonResponse(response); + } + } + + [HttpGet] + public HttpResponseMessage GetPurchaseCRList() + { + try + { + var sql = "select pdate, process, pumname, pumscale, pumunit, pumqtyreq, pumprice, pumamt from EETGW_PurchaseCR where gcode = @gcode and state = '---' order by pdate desc"; + + var cs = Properties.Settings.Default.gwcs; + var cn = new System.Data.SqlClient.SqlConnection(cs); + var cmd = new System.Data.SqlClient.SqlCommand(sql, cn); + cmd.Parameters.AddWithValue("gcode", FCOMMON.info.Login.gcode); + var da = new System.Data.SqlClient.SqlDataAdapter(cmd); + var dt = new System.Data.DataTable(); + da.Fill(dt); + da.Dispose(); + cmd.Dispose(); + cn.Dispose(); + + var txtjson = JsonConvert.SerializeObject(dt, new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }); + + var resp = new HttpResponseMessage() + { + Content = new StringContent( + txtjson, + System.Text.Encoding.UTF8, + "application/json") + }; + + return resp; + } + catch (Exception ex) + { + var response = new + { + Message = ex.Message, + }; + return CreateJsonResponse(response); + } + } + [HttpGet] public HttpResponseMessage Index() diff --git a/Project/Web/wwwroot/DashBoard/index.html b/Project/Web/wwwroot/DashBoard/index.html index 0f4cd52..7204e07 100644 --- a/Project/Web/wwwroot/DashBoard/index.html +++ b/Project/Web/wwwroot/DashBoard/index.html @@ -94,6 +94,26 @@ transform: translateY(-5px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); } + + /* 스크롤바 스타일링 */ + .custom-scrollbar::-webkit-scrollbar { + width: var(--scrollbar-width, 16px); /* 동적 스크롤바 너비 */ + } + + .custom-scrollbar::-webkit-scrollbar-track { + background: rgba(255, 255, 255, 0.1); + border-radius: 8px; + } + + .custom-scrollbar::-webkit-scrollbar-thumb { + background: rgba(255, 255, 255, 0.3); + border-radius: 8px; + border: 2px solid rgba(255, 255, 255, 0.1); + } + + .custom-scrollbar::-webkit-scrollbar-thumb:hover { + background: rgba(255, 255, 255, 0.5); + } @@ -101,14 +121,27 @@

근태현황 대시보드

-

실시간 근태 현황을 확인하세요

+

-- 기능 테스트 중입니다 --

+ + +
+ + +
-
+

출근

@@ -138,7 +171,7 @@
-
+

휴가요청

@@ -153,7 +186,7 @@
-
+

구매요청(NR)

@@ -168,7 +201,7 @@
-
+

구매요청(CR)

@@ -220,6 +253,207 @@ 데이터 업데이트 중...
+ + + + + + + + + + + +
\ No newline at end of file diff --git a/Project/Web/wwwroot/login.html b/Project/Web/wwwroot/login.html index e64bb0f..883f458 100644 --- a/Project/Web/wwwroot/login.html +++ b/Project/Web/wwwroot/login.html @@ -154,11 +154,8 @@ class="input-field w-full px-4 py-3 bg-white/10 border border-white/20 rounded-xl text-white focus:outline-none focus:border-primary-400 input-focus appearance-none" required > - + -
@@ -172,13 +169,10 @@ type="text" id="userId" name="userId" - class="input-field w-full px-4 py-3 bg-white/10 border border-white/20 rounded-xl text-white placeholder-transparent focus:outline-none focus:border-primary-400 input-focus" - placeholder="사용자 ID" + class="input-field w-full px-4 py-3 bg-white/10 border border-white/20 rounded-xl text-white placeholder-white/60 focus:outline-none focus:border-primary-400 input-focus" + placeholder="사원번호" required > -
@@ -192,13 +186,10 @@ type="password" id="password" name="password" - class="input-field w-full px-4 py-3 bg-white/10 border border-white/20 rounded-xl text-white placeholder-transparent focus:outline-none focus:border-primary-400 input-focus" + class="input-field w-full px-4 py-3 bg-white/10 border border-white/20 rounded-xl text-white placeholder-white/60 focus:outline-none focus:border-primary-400 input-focus" placeholder="비밀번호" required > -
@@ -439,27 +430,13 @@ // 부서 선택 const gcodeSelect = document.getElementById('gcode'); gcodeSelect.value = data.Gcode; - - // 부서 선택 시 라벨 애니메이션 적용 - const label = gcodeSelect.nextElementSibling; - if (label && label.classList.contains('floating-label')) { - label.style.transform = 'translateY(-1.5rem) scale(0.85)'; - label.style.color = '#3b82f6'; - } hasPreviousInfo = true; } if (data && data.UserId) { - // 사용자 ID 설정 - document.getElementById('userId').value = data.UserId; - - // 사용자 ID 입력 시 라벨 애니메이션 적용 - const userIdInput = document.getElementById('userId'); - const label = userIdInput.nextElementSibling; - if (label && label.classList.contains('floating-label')) { - label.style.transform = 'translateY(-1.5rem) scale(0.85)'; - label.style.color = '#3b82f6'; - } + // 사용자 ID 설정 - 세미콜론으로 구분된 경우 첫 번째 요소만 사용 + const userId = data.UserId.split(';')[0]; + document.getElementById('userId').value = userId; hasPreviousInfo = true; } diff --git a/Project/fMain.cs b/Project/fMain.cs index d35de86..507244a 100644 --- a/Project/fMain.cs +++ b/Project/fMain.cs @@ -105,10 +105,12 @@ namespace Project this.Text = Application.ProductName + " v" + Application.ProductVersion; Pub.init(); - - + Pub.InitializeWebView2(); setToolbar(); + var f = new Dialog.fWarning(); + f.TopMost = true; + f.Show(); _SetLang(); if (Pub.setting.FullScreen) this.WindowState = FormWindowState.Maximized; @@ -137,10 +139,6 @@ namespace Project //Data Source=K4FASQL.kr.ds.amkor.com,50150;Initial Catalog=EE;Persist Security Info=True;User ID=eeadm;Password=uJnU8a8q&DJ+ug-D;Encrypt=False;TrustServerCertificate=True - - - - Pub.barcode = new Device.Barcode(); if (!Pub.setting.Barcode.isEmpty()) Pub.barcode.PortName = Pub.setting.Barcode; Pub.barcode.ReceiveData += barcode_ReceiveData; @@ -167,8 +165,22 @@ namespace Project webok = false; } + var wat = new System.Diagnostics.Stopwatch(); + wat.Restart(); + while(true) + { + if (Pub.InitWebView != 0) break; + if (wat.ElapsedMilliseconds > 5000) break; + System.Threading.Thread.Sleep(1000); + Application.DoEvents(); + } + + f.Dispose(); + Func_Login(); + + ///즐겨찾기 목록 갱신 Update_FavoriteSite(); @@ -204,18 +216,19 @@ namespace Project void Func_Login() { -#if WEB - - using (var f = new Dialog.fLogin_WB()) - if (f.ShowDialog() != System.Windows.Forms.DialogResult.OK) - Application.ExitThread(); - -#else - + //Pub.InitWebView = 2; + if (Pub.InitWebView == 1) + { + using (var f = new Dialog.fLogin_WB()) + if (f.ShowDialog() != System.Windows.Forms.DialogResult.OK) + Application.ExitThread(); + } + else + { using (var f = new Dialog.fLogin()) if (f.ShowDialog() != System.Windows.Forms.DialogResult.OK) Application.ExitThread(); -#endif + } this.mn_purchase.Visible = FCOMMON.Util.getBit(FCOMMON.info.Login.gpermission, (int)FCOMMON.eGroupPermission.menu_purchase); diff --git a/Sub/AmkorRestfulService b/Sub/AmkorRestfulService deleted file mode 160000 index 69b33b6..0000000 --- a/Sub/AmkorRestfulService +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 69b33b6e3c193f2ab6c3abf4bfede691a77509cb diff --git a/SubProject/FCOMMON/DataBaseManager.cs b/SubProject/FCOMMON/DataBaseManager.cs index d56132a..1aa0d02 100644 --- a/SubProject/FCOMMON/DataBaseManager.cs +++ b/SubProject/FCOMMON/DataBaseManager.cs @@ -78,7 +78,7 @@ namespace FCOMMON var retval = new UserGroupModel(); var cn = getCn(); - var sql = "select * from UserGroup where gcode = @gcode"; + var sql = "select gcode,dept,isnull(permission,0) as permission from UserGroup where gcode = @gcode"; var cmd = new System.Data.SqlClient.SqlCommand(sql, cn); cmd.Parameters.Add("gcode", SqlDbType.VarChar).Value = gcode; cn.Open(); @@ -88,6 +88,7 @@ namespace FCOMMON { retval.gcode = rdr["gcode"].ToString(); retval.name = rdr["dept"].ToString(); + retval.perm = int.Parse(rdr["permission"].ToString()); cnt += 1; } cn.Dispose();