udpate login.html
This commit is contained in:
		| @@ -21,7 +21,11 @@ namespace Project.Dialog | |||||||
|         public fDashboard() |         public fDashboard() | ||||||
|         { |         { | ||||||
|             InitializeComponent(); |             InitializeComponent(); | ||||||
|  |  | ||||||
|  | #if WEB | ||||||
|             InitializeWebView2(); |             InitializeWebView2(); | ||||||
|  | #endif | ||||||
|  |  | ||||||
|         } |         } | ||||||
|         private void InitializeWebView2() |         private void InitializeWebView2() | ||||||
|         { |         { | ||||||
|   | |||||||
| @@ -76,7 +76,10 @@ namespace Project.Dialog | |||||||
|                     // 시스템에 설치된 WebView2 사용 |                     // 시스템에 설치된 WebView2 사용 | ||||||
|                     await this.webView21.EnsureCoreWebView2Async(); |                     await this.webView21.EnsureCoreWebView2Async(); | ||||||
|                 } |                 } | ||||||
|                 // OWIN 서버의 DashBoard 페이지로 연결 |                 // WebView2에서 C# 메서드를 호출할 수 있도록 설정 | ||||||
|  |                 webView21.CoreWebView2.WebMessageReceived += WebView2_WebMessageReceived; | ||||||
|  |  | ||||||
|  |                 // OWIN 서버의 Login 페이지로 연결 | ||||||
|                 webView21.Source = new Uri("http://127.0.0.1:9000/Home/Login"); |                 webView21.Source = new Uri("http://127.0.0.1:9000/Home/Login"); | ||||||
|                 label1.Visible = false; |                 label1.Visible = false; | ||||||
|             } |             } | ||||||
| @@ -85,6 +88,62 @@ namespace Project.Dialog | |||||||
|                 MessageBox.Show($"WebView2 초기화 실패: {ex.Message}"); |                 MessageBox.Show($"WebView2 초기화 실패: {ex.Message}"); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  |         // WebView2에서 보낸 메시지를 받아서 처리 | ||||||
|  |         private void WebView2_WebMessageReceived(object sender, CoreWebView2WebMessageReceivedEventArgs e) | ||||||
|  |         { | ||||||
|  |             try | ||||||
|  |             { | ||||||
|  |                 var message = e.TryGetWebMessageAsString(); | ||||||
|  |                  | ||||||
|  |                 if (message == "LOGIN_SUCCESS") | ||||||
|  |                 { | ||||||
|  |                     // UI 스레드에서 실행 | ||||||
|  |                     this.Invoke(new Action(() => | ||||||
|  |                     { | ||||||
|  |                         // button1_Click과 동일한 로직 실행 | ||||||
|  |                         ExecuteLoginLogic(); | ||||||
|  |                     })); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             catch (Exception ex) | ||||||
|  |             { | ||||||
|  |                 Console.WriteLine($"WebView2 메시지 처리 오류: {ex.Message}"); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         // 로그인 성공 시 실행할 로직 (button1_Click과 동일) | ||||||
|  |         private void ExecuteLoginLogic() | ||||||
|  |         { | ||||||
|  |             DateTime dt = DateTime.Now; | ||||||
|  |  | ||||||
|  |             // 로그인 정보가 이미 설정되어 있다고 가정 (웹에서 처리됨) | ||||||
|  |             if (string.IsNullOrEmpty(FCOMMON.info.Login.no)) | ||||||
|  |             { | ||||||
|  |                 MessageBox.Show("로그인 정보가 설정되지 않았습니다."); | ||||||
|  |                 return; | ||||||
|  |             } | ||||||
|  |  | ||||||
|  |             try | ||||||
|  |             { | ||||||
|  |                 // 로그인정보 기록 | ||||||
|  |                 AddLoginInfo(); | ||||||
|  |  | ||||||
|  |                 //210221 | ||||||
|  |                 MakeAutoJobReportbyLogin(); | ||||||
|  |  | ||||||
|  |                 //210613     | ||||||
|  |                 MakeAutoJobReportByAuto(); | ||||||
|  |  | ||||||
|  |                 DialogResult = DialogResult.OK; | ||||||
|  |                 FCOMMON.info.Login.loginusetime = (DateTime.Now - dt).TotalMilliseconds; | ||||||
|  |             } | ||||||
|  |             catch (Exception ex) | ||||||
|  |             { | ||||||
|  |                 Util.MsgE("로그인 처리 중 오류가 발생했습니다.\n\n" + ex.Message); | ||||||
|  |                 DialogResult = System.Windows.Forms.DialogResult.Cancel; | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|         protected override void OnLoad(EventArgs e) |         protected override void OnLoad(EventArgs e) | ||||||
|         { |         { | ||||||
|             base.OnLoad(e); |             base.OnLoad(e); | ||||||
|   | |||||||
| @@ -51,7 +51,7 @@ | |||||||
|     <DebugType>Full</DebugType> |     <DebugType>Full</DebugType> | ||||||
|     <Optimize>False</Optimize> |     <Optimize>False</Optimize> | ||||||
|     <OutputPath>..\..\..\..\..\Amkor\GroupWare\</OutputPath> |     <OutputPath>..\..\..\..\..\Amkor\GroupWare\</OutputPath> | ||||||
|     <DefineConstants>DEBUG;TRACE</DefineConstants> |     <DefineConstants>TRACE;DEBUG;WEB</DefineConstants> | ||||||
|     <ErrorReport>prompt</ErrorReport> |     <ErrorReport>prompt</ErrorReport> | ||||||
|     <WarningLevel>4</WarningLevel> |     <WarningLevel>4</WarningLevel> | ||||||
|     <Prefer32Bit>false</Prefer32Bit> |     <Prefer32Bit>false</Prefer32Bit> | ||||||
| @@ -642,9 +642,6 @@ | |||||||
|     <None Include="Web\wwwroot\index.html"> |     <None Include="Web\wwwroot\index.html"> | ||||||
|       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||||||
|     </None> |     </None> | ||||||
|     <None Include="Web\wwwroot\dashboard.html"> |  | ||||||
|       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> |  | ||||||
|     </None> |  | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <BootstrapperPackage Include=".NETFramework,Version=v4.0"> |     <BootstrapperPackage Include=".NETFramework,Version=v4.0"> | ||||||
|   | |||||||
| @@ -17,35 +17,7 @@ namespace Project.Manager | |||||||
|             return cn; |             return cn; | ||||||
|         } |         } | ||||||
|          |          | ||||||
|         /// <summary> |  | ||||||
|         /// 입력된 id의 그룹정보를 반환 |  | ||||||
|         /// </summary> |  | ||||||
|         /// <param name="gcode"></param> |  | ||||||
|         /// <param name="uid"></param> |  | ||||||
|         /// <returns></returns> |  | ||||||
|         public static GroupUserModel GetGroupUser(string gcode, string uid) |  | ||||||
|         { |  | ||||||
|             var retval = new GroupUserModel(); |  | ||||||
|             var cn = getCn(); |  | ||||||
|          |          | ||||||
|             var sql = "select * from EETGW_GroupUser where gcode = @gcode and uid =  @uid"; |  | ||||||
|             var cmd = new System.Data.SqlClient.SqlCommand(sql,cn); |  | ||||||
|             cmd.Parameters.Add("gcode", SqlDbType.VarChar).Value = gcode; |  | ||||||
|             cmd.Parameters.Add("uid", SqlDbType.VarChar).Value = uid; |  | ||||||
|             cn.Open(); |  | ||||||
|             var rdr = cmd.ExecuteReader(); |  | ||||||
|             var cnt = 0; |  | ||||||
|             foreach(var dr in rdr) |  | ||||||
|             { |  | ||||||
|                 cnt += 1; |  | ||||||
|             } |  | ||||||
|              |  | ||||||
|             retval.Gcode = gcode; |  | ||||||
|             retval.uid = uid; |  | ||||||
|  |  | ||||||
|             cn.Dispose(); |  | ||||||
|             return retval; |  | ||||||
|         } |  | ||||||
|  |  | ||||||
|  |  | ||||||
|         public static List<String> getGroupList(string GroupColumn, string table, string where = "") |         public static List<String> getGroupList(string GroupColumn, string table, string where = "") | ||||||
|   | |||||||
| @@ -39,23 +39,43 @@ namespace Project.Web.Controllers | |||||||
|         } |         } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         [HttpGet] | ||||||
|  |         public HttpResponseMessage GetUserGroups() | ||||||
|  |         { | ||||||
|  |             var dt = DBM.GetUserGroups(); | ||||||
|  |             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] |         [HttpGet] | ||||||
|         public HttpResponseMessage GetholyUser() |         public HttpResponseMessage GetholyUser() | ||||||
|         { |         { | ||||||
|             var sql = string.Empty; |             var sql = string.Empty; | ||||||
|             sql = $"select uid,cate,sdate,edate,HolyReason " + |             sql = $" select uid,cate,sdate,edate,HolyReason,Users.name " + | ||||||
|                 $"from EETGW_HolydayRequest " + |                   $" from EETGW_HolydayRequest INNER JOIN " + | ||||||
|                 $"where gcode  = '{FCOMMON.info.Login.gcode}'" + |                   $" Users ON EETGW_HolydayRequest.uid = Users.id " + | ||||||
|  |                   $" where EETGW_HolydayRequest.gcode  = @gcode" + | ||||||
|                   $" and conf = 1 and HolyDays > 0 and sdate <= GETDATE() and edate >= GETDATE()"; |                   $" and conf = 1 and HolyDays > 0 and sdate <= GETDATE() and edate >= GETDATE()"; | ||||||
|                    |                    | ||||||
|             if (info.Login.gcode == null) |             //sql = sql.Replace("{gcode}", FCOMMON.info.Login.gcode); | ||||||
|                 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!"; |             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 cn = new System.Data.SqlClient.SqlConnection(cs); | ||||||
|             var cmd = new System.Data.SqlClient.SqlCommand(sql, cn); |             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 da = new System.Data.SqlClient.SqlDataAdapter(cmd); | ||||||
|             var dt = new System.Data.DataTable(); |             var dt = new System.Data.DataTable(); | ||||||
|             da.Fill(dt); |             da.Fill(dt); | ||||||
| @@ -77,10 +97,9 @@ namespace Project.Web.Controllers | |||||||
|             }; |             }; | ||||||
|  |  | ||||||
|             return resp; |             return resp; | ||||||
|  |  | ||||||
|  |  | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |  | ||||||
|         [HttpGet] |         [HttpGet] | ||||||
|         public HttpResponseMessage Index() |         public HttpResponseMessage Index() | ||||||
|         { |         { | ||||||
|   | |||||||
| @@ -1,299 +1,349 @@ | |||||||
| //using System; | using System; | ||||||
| //using System.Linq; | using System.Linq; | ||||||
| //using System.Net.Http; | using System.Net.Http; | ||||||
| //using System.Web.Http; | using System.Web.Http; | ||||||
| //using Newtonsoft.Json; | using Newtonsoft.Json; | ||||||
| //using System.Collections.Generic; | using System.Collections.Generic; | ||||||
|  | using FCOMMON; | ||||||
|  |  | ||||||
| //namespace Project.Web.Controllers | namespace Project.Web.Controllers | ||||||
| //{ | { | ||||||
| //    // 로그인 요청 모델 |     // 로그인 요청 모델 | ||||||
| //    public class LoginRequest |     public class LoginRequest | ||||||
| //    { |     { | ||||||
| //        public string UserId { get; set; } |         public string Gcode { get; set; } | ||||||
| //        public string Password { get; set; } |         public string UserId { get; set; } | ||||||
| //        public bool RememberMe { get; set; } |         public string Password { get; set; } | ||||||
| //    } |         public bool RememberMe { get; set; } | ||||||
|  |     } | ||||||
|  |  | ||||||
| //    // 로그인 응답 모델 |     // 로그인 응답 모델 | ||||||
| //    public class LoginResponse |     public class LoginResponse | ||||||
| //    { |     { | ||||||
| //        public bool Success { get; set; } |         public bool Success { get; set; } | ||||||
| //        public string Message { get; set; } |         public string Message { get; set; } | ||||||
| //        public string RedirectUrl { get; set; } |         public string RedirectUrl { get; set; } | ||||||
| //        public object UserData { get; set; } |         public object UserData { get; set; } | ||||||
| //    } |     } | ||||||
|  |  | ||||||
| //    public class HomeController : BaseController |     public class HomeController : BaseController | ||||||
| //    { |     { | ||||||
| //        [HttpPost] |         [HttpPost] | ||||||
| //        public void Index([FromBody]string value) |         public void Index([FromBody]string value) | ||||||
| //        { |         { | ||||||
|  |  | ||||||
| //        } |         } | ||||||
|  |  | ||||||
| //        // PUT api/values/5 |         // PUT api/values/5 | ||||||
| //        public void Put(int id, [FromBody]string value) |         public void Put(int id, [FromBody]string value) | ||||||
| //        { |         { | ||||||
| //        } |         } | ||||||
|  |  | ||||||
| //        // DELETE api/values/5 |         // DELETE api/values/5 | ||||||
| //        public void Delete(int id) |         public void Delete(int id) | ||||||
| //        { |         { | ||||||
| //        } |         } | ||||||
|  |  | ||||||
| //        [HttpGet] |         [HttpGet] | ||||||
| //        public string Test() |         public string Test() | ||||||
| //        { |         { | ||||||
| //            return "test"; |             return "test"; | ||||||
| //        } |         } | ||||||
|  |  | ||||||
| //        [HttpPost] |         [HttpGet] | ||||||
| //        public HttpResponseMessage Login([FromBody] LoginRequest request) |         public string TestLogin() | ||||||
| //        { |         { | ||||||
| //            var response = new LoginResponse(); |             return "HomeController Login Test - 접근 성공!"; | ||||||
|  |         } | ||||||
|  |  | ||||||
| //            try |         [HttpPost] | ||||||
| //            { |         public HttpResponseMessage Login([FromBody] LoginRequest request) | ||||||
| //                // 입력값 검증 |         { | ||||||
| //                if (string.IsNullOrEmpty(request?.UserId) || string.IsNullOrEmpty(request?.Password)) |             var response = new LoginResponse(); | ||||||
| //                { |  | ||||||
| //                    response.Success = false; |  | ||||||
| //                    response.Message = "사용자 ID와 비밀번호를 입력해주세요."; |  | ||||||
| //                    return CreateJsonResponse(response); |  | ||||||
| //                } |  | ||||||
|  |  | ||||||
| //                // TODO: 여기에 실제 데이터베이스 로그인 로직을 구현하세요 |             try | ||||||
| //                // 예시: 데이터베이스에서 사용자 정보 확인 |             { | ||||||
| //                bool isValidUser = ValidateUser(request.UserId, request.Password); |                 // 입력값 검증 | ||||||
|  |                 if (string.IsNullOrEmpty(request?.Gcode) || string.IsNullOrEmpty(request?.UserId) || string.IsNullOrEmpty(request?.Password)) | ||||||
|  |                 { | ||||||
|  |                     response.Success = false; | ||||||
|  |                     response.Message = "그룹코드/사용자ID/비밀번호를 입력해주세요."; | ||||||
|  |                     return CreateJsonResponse(response); | ||||||
|  |                 } | ||||||
|  |  | ||||||
| //                if (isValidUser) |                 // TODO: 여기에 실제 데이터베이스 로그인 로직을 구현하세요 | ||||||
| //                { |                 // 예시: 데이터베이스에서 사용자 정보 확인 | ||||||
| //                    // 로그인 성공 |                 bool isValidUser = ValidateUser(request.Gcode, request.UserId, request.Password); | ||||||
| //                    response.Success = true; |  | ||||||
| //                    response.Message = "로그인에 성공했습니다."; |  | ||||||
| //                    response.RedirectUrl = "/DashBoard"; |  | ||||||
|  |  | ||||||
| //                    // 사용자 정보 설정 (세션 또는 쿠키) |                 if (isValidUser) | ||||||
| //                    SetUserSession(request.UserId, request.RememberMe); |                 { | ||||||
|  |                     // 로그인 성공 | ||||||
|  |                     response.Success = true; | ||||||
|  |                     response.Message = "로그인에 성공했습니다."; | ||||||
|  |                     response.RedirectUrl = "/DashBoard"; | ||||||
|  |  | ||||||
| //                    // 사용자 데이터 반환 |                     // 사용자 정보 설정 (세션 또는 쿠키) | ||||||
| //                    response.UserData = new |                     SetUserSession(request.Gcode, request.UserId, request.RememberMe); | ||||||
| //                    { |  | ||||||
| //                        UserId = request.UserId, |  | ||||||
| //                        LoginTime = DateTime.Now, |  | ||||||
| //                        RememberMe = request.RememberMe |  | ||||||
| //                    }; |  | ||||||
| //                } |  | ||||||
| //                else |  | ||||||
| //                { |  | ||||||
| //                    // 로그인 실패 |  | ||||||
| //                    response.Success = false; |  | ||||||
| //                    response.Message = "사용자 ID 또는 비밀번호가 올바르지 않습니다."; |  | ||||||
| //                } |  | ||||||
| //            } |  | ||||||
| //            catch (Exception ex) |  | ||||||
| //            { |  | ||||||
| //                response.Success = false; |  | ||||||
| //                response.Message = "로그인 처리 중 오류가 발생했습니다: " + ex.Message; |  | ||||||
| //            } |  | ||||||
|  |  | ||||||
| //            return CreateJsonResponse(response); |                     // 사용자 데이터 반환 | ||||||
| //        } |                     response.UserData = new | ||||||
|  |                     { | ||||||
|  |                         Gcode = request.Gcode, | ||||||
|  |                         UserId = request.UserId, | ||||||
|  |                         LoginTime = DateTime.Now, | ||||||
|  |                         RememberMe = request.RememberMe | ||||||
|  |                     }; | ||||||
|  |                 } | ||||||
|  |                 else | ||||||
|  |                 { | ||||||
|  |                     // 로그인 실패 | ||||||
|  |                     response.Success = false; | ||||||
|  |                     response.Message = "사용자 ID 또는 비밀번호가 올바르지 않습니다."; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             catch (Exception ex) | ||||||
|  |             { | ||||||
|  |                 response.Success = false; | ||||||
|  |                 response.Message = "로그인 처리 중 오류가 발생했습니다: " + ex.Message; | ||||||
|  |             } | ||||||
|  |  | ||||||
| //        [HttpPost] |             return CreateJsonResponse(response); | ||||||
| //        public HttpResponseMessage Logout() |         } | ||||||
| //        { |  | ||||||
| //            var response = new LoginResponse(); |  | ||||||
|  |  | ||||||
| //            try |         [HttpPost] | ||||||
| //            { |         public HttpResponseMessage Logout() | ||||||
| //                // TODO: 여기에 로그아웃 로직을 구현하세요 |         { | ||||||
| //                // 예시: 세션 정리, 쿠키 삭제 등 |             var response = new LoginResponse(); | ||||||
| //                ClearUserSession(); |  | ||||||
|  |  | ||||||
| //                response.Success = true; |             try | ||||||
| //                response.Message = "로그아웃되었습니다."; |             { | ||||||
| //                response.RedirectUrl = "/Login"; |                 // TODO: 여기에 로그아웃 로직을 구현하세요 | ||||||
| //            } |                 // 예시: 세션 정리, 쿠키 삭제 등 | ||||||
| //            catch (Exception ex) |                 ClearUserSession(); | ||||||
| //            { |  | ||||||
| //                response.Success = false; |  | ||||||
| //                response.Message = "로그아웃 처리 중 오류가 발생했습니다: " + ex.Message; |  | ||||||
| //            } |  | ||||||
|  |  | ||||||
| //            return CreateJsonResponse(response); |                 response.Success = true; | ||||||
| //        } |                 response.Message = "로그아웃되었습니다."; | ||||||
|  |                 response.RedirectUrl = "/Login"; | ||||||
|  |             } | ||||||
|  |             catch (Exception ex) | ||||||
|  |             { | ||||||
|  |                 response.Success = false; | ||||||
|  |                 response.Message = "로그아웃 처리 중 오류가 발생했습니다: " + ex.Message; | ||||||
|  |             } | ||||||
|  |  | ||||||
| //        [HttpGet] |             return CreateJsonResponse(response); | ||||||
| //        public HttpResponseMessage CheckLoginStatus() |         } | ||||||
| //        { |  | ||||||
| //            var response = new LoginResponse(); |  | ||||||
|  |  | ||||||
| //            try |         [HttpGet] | ||||||
| //            { |         public HttpResponseMessage CheckLoginStatus() | ||||||
| //                // TODO: 여기에 로그인 상태 확인 로직을 구현하세요 |         { | ||||||
| //                // 예시: 세션 또는 쿠키에서 사용자 정보 확인 |             var response = new LoginResponse(); | ||||||
| //                var currentUser = GetCurrentUser(); |  | ||||||
|  |  | ||||||
| //                if (currentUser != null) |             try | ||||||
| //                { |             { | ||||||
| //                    response.Success = true; |                 // TODO: 여기에 로그인 상태 확인 로직을 구현하세요 | ||||||
| //                    response.Message = "로그인된 상태입니다."; |                 // 예시: 세션 또는 쿠키에서 사용자 정보 확인 | ||||||
| //                    response.UserData = currentUser; |                 var currentUser = GetCurrentUser(); | ||||||
| //                } |  | ||||||
| //                else |  | ||||||
| //                { |  | ||||||
| //                    response.Success = false; |  | ||||||
| //                    response.Message = "로그인되지 않은 상태입니다."; |  | ||||||
| //                    response.RedirectUrl = "/Login"; |  | ||||||
| //                } |  | ||||||
| //            } |  | ||||||
| //            catch (Exception ex) |  | ||||||
| //            { |  | ||||||
| //                response.Success = false; |  | ||||||
| //                response.Message = "로그인 상태 확인 중 오류가 발생했습니다: " + ex.Message; |  | ||||||
| //            } |  | ||||||
|  |  | ||||||
| //            return CreateJsonResponse(response); |                 if (currentUser != null) | ||||||
| //        } |                 { | ||||||
|  |                     response.Success = true; | ||||||
|  |                     response.Message = "로그인된 상태입니다."; | ||||||
|  |                     response.UserData = currentUser; | ||||||
|  |                 } | ||||||
|  |                 else | ||||||
|  |                 { | ||||||
|  |                     response.Success = false; | ||||||
|  |                     response.Message = "로그인되지 않은 상태입니다."; | ||||||
|  |                     response.RedirectUrl = "/Login"; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             catch (Exception ex) | ||||||
|  |             { | ||||||
|  |                 response.Success = false; | ||||||
|  |                 response.Message = "로그인 상태 확인 중 오류가 발생했습니다: " + ex.Message; | ||||||
|  |             } | ||||||
|  |  | ||||||
| //        // 헬퍼 메서드들 |             return CreateJsonResponse(response); | ||||||
| //        private bool ValidateUser(string userId, string password) |         } | ||||||
| //        { |  | ||||||
| //            // TODO: 실제 데이터베이스 검증 로직을 여기에 구현하세요 |         // 헬퍼 메서드들 | ||||||
| //            // 예시: 데이터베이스에서 사용자 정보 조회 및 비밀번호 검증 |         private bool ValidateUser(string gcode, string userId, string password) | ||||||
| //            var encpass = Pub.MakePasswordEnc(password.Trim()); |         { | ||||||
|  |             // TODO: 실제 데이터베이스 검증 로직을 여기에 구현하세요 | ||||||
|  |             // 예시: 데이터베이스에서 사용자 정보 조회 및 비밀번호 검증 | ||||||
|  |             var encpass = Pub.MakePasswordEnc(password.Trim()); | ||||||
|  |  | ||||||
|  |             var GInfo = DBM.GetUserGroup(gcode); | ||||||
|  |             if (GInfo == null) return false; | ||||||
|  |             var UGInfo = DBM.GetGroupUser(gcode, userId); | ||||||
|  |             if (UGInfo == null) return false; | ||||||
|  |             var UInfo = DBM.GetUserInfo(userId); | ||||||
|  |             if (UInfo == null) return false; | ||||||
|  |             return UInfo.password.Equals(encpass); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         private void SetUserSession(string gcode, string userId, bool rememberMe) | ||||||
|  |         { | ||||||
|  |             // TODO: 세션 또는 쿠키에 사용자 정보 저장 | ||||||
|  |             // 예시: HttpContext.Session["UserId"] = userId; | ||||||
|  |             // 예시: 쿠키 설정 (rememberMe가 true인 경우) | ||||||
|  |             //데이터베이스에서 해당 정보를 찾아와서 처리해야한다 | ||||||
|  |             var GInfo = DBM.GetUserGroup(gcode); | ||||||
|  |             var UGInfo = DBM.GetGroupUser(gcode, userId); | ||||||
|  |             var UInfo = DBM.GetUserInfo(userId); | ||||||
|  |  | ||||||
|  |             info.Login.no = userId; | ||||||
|  |             info.Login.nameK = UInfo.name; | ||||||
|  |             info.Login.dept = GInfo.name; | ||||||
|  |             info.Login.level = UGInfo.level; | ||||||
|  |             info.Login.email = UInfo.email; | ||||||
|  |             info.Login.hp = UInfo.hp; | ||||||
|  |             info.Login.tel = UInfo.tel; | ||||||
|  |             info.Login.title = GInfo.name + "(" + UInfo.grade + ")"; | ||||||
|  |             info.NotShowJobReportview = Pub.setting.NotShowJobreportPRewView; | ||||||
|  |             info.Login.gcode = gcode;// gcode; | ||||||
|  |             info.Login.process = UInfo.id == "dev" ? "개발자" : UGInfo.Process; | ||||||
|  |             info.Login.permission = UGInfo.level; | ||||||
|  |             info.Login.gpermission = GInfo.perm; | ||||||
|  |             info.ShowBuyerror = Pub.setting.Showbuyerror;   //210625 | ||||||
|  |  | ||||||
|  |  | ||||||
| //            // 임시 테스트용 (실제로는 데이터베이스에서 확인) |             //로그인기록저장 | ||||||
| //            return userId == "admin" && password == "admin"; |             Pub.setting.lastid = userId;// tbID.Text.Trim(); | ||||||
| //        } |             Pub.setting.lastdpt = GInfo.name; | ||||||
|  |             Pub.setting.lastgcode = GInfo.gcode; | ||||||
| //        private void SetUserSession(string userId, bool rememberMe) |             Pub.setting.Save(); | ||||||
| //        { |  | ||||||
| //            // TODO: 세션 또는 쿠키에 사용자 정보 저장 |  | ||||||
| //            // 예시: HttpContext.Session["UserId"] = userId; |  | ||||||
| //            // 예시: 쿠키 설정 (rememberMe가 true인 경우) |  | ||||||
| //            //데이터베이스에서 해당 정보를 찾아와서 처리해야한다 |  | ||||||
|  |  | ||||||
| //            FCOMMON.info.Login.no = userId; |  | ||||||
| //            FCOMMON.info.Login.nameK = drUser.name; |  | ||||||
| //            FCOMMON.info.Login.dept = cmbDept.Text;// userdr.dept;// cmbDept.Text; |  | ||||||
| //            FCOMMON.info.Login.level = drGrpUser.level; |  | ||||||
| //            FCOMMON.info.Login.email = drUser.email; |  | ||||||
| //            FCOMMON.info.Login.nameE = drUser.nameE; |  | ||||||
| //            FCOMMON.info.Login.hp = drUser.hp; |  | ||||||
| //            FCOMMON.info.Login.tel = drUser.tel; |  | ||||||
| //            FCOMMON.info.Login.title = drUser.dept + "(" + drUser.grade + ")"; |  | ||||||
| //            FCOMMON.info.NotShowJobReportview = Pub.setting.NotShowJobreportPRewView; |  | ||||||
| //            //var gcode = FCOMMON.DBM.ExecuteScalar("select isnull(gcode,'NOGCODE') from UserGroup where dept ='" + cmbDept.Text + "'"); |  | ||||||
| //            var gperm = FCOMMON.DBM.ExecuteScalar("select isnull(permission,0) from UserGroup where dept ='" + cmbDept.Text + "'"); |  | ||||||
| //            FCOMMON.info.Login.gcode = gCode;// gcode; |  | ||||||
| //            FCOMMON.info.Login.process = drUser.id == "dev" ? "개발자" : drGrpUser.Process; |  | ||||||
| //            FCOMMON.info.Login.permission = 0; |  | ||||||
| //            FCOMMON.info.Login.gpermission = int.Parse(gperm); |  | ||||||
| //            //FCOMMON.info.datapath = Pub.setting.SharedDataPath; |  | ||||||
| //            FCOMMON.info.ShowBuyerror = Pub.setting.Showbuyerror;   //210625 |  | ||||||
|  |  | ||||||
|  |  | ||||||
| //        } |         } | ||||||
|  |  | ||||||
| //        private void ClearUserSession() |         private void ClearUserSession() | ||||||
| //        { |         { | ||||||
| //            // TODO: 세션 또는 쿠키에서 사용자 정보 삭제 |             // TODO: 세션 또는 쿠키에서 사용자 정보 삭제 | ||||||
| //            FCOMMON.info.Login.no = string.Empty; |             FCOMMON.info.Login.no = string.Empty; | ||||||
| //            FCOMMON.info.Login.level = 0; |             FCOMMON.info.Login.level = 0; | ||||||
| //            FCOMMON.info.Login.gcode = string.Empty; |             FCOMMON.info.Login.gcode = string.Empty; | ||||||
| //            FCOMMON.info.Login.permission = 0; |             FCOMMON.info.Login.permission = 0; | ||||||
| //            FCOMMON.info.Login.gpermission = 0; |             FCOMMON.info.Login.gpermission = 0; | ||||||
| //            Console.WriteLine("logout"); |             Console.WriteLine("logout"); | ||||||
| //        } |         } | ||||||
|  |  | ||||||
| //        private object GetCurrentUser() |         private object GetCurrentUser() | ||||||
| //        { |         { | ||||||
| //            // TODO: 현재 로그인된 사용자 정보 반환 |             // TODO: 현재 로그인된 사용자 정보 반환 | ||||||
| //            // 예시: HttpContext.Session["UserId"]에서 사용자 정보 조회 |             // 예시: HttpContext.Session["UserId"]에서 사용자 정보 조회 | ||||||
| //            return null; // 임시로 null 반환 |             if (string.IsNullOrEmpty(FCOMMON.info.Login.no)) return null; | ||||||
| //        } |             else return FCOMMON.info.Login; | ||||||
|  |         } | ||||||
|  |  | ||||||
| //        private HttpResponseMessage CreateJsonResponse(object data) |         private HttpResponseMessage CreateJsonResponse(object data) | ||||||
| //        { |         { | ||||||
| //            var json = JsonConvert.SerializeObject(data, new JsonSerializerSettings |             var json = JsonConvert.SerializeObject(data, new JsonSerializerSettings | ||||||
| //            { |             { | ||||||
| //                NullValueHandling = NullValueHandling.Ignore |                 NullValueHandling = NullValueHandling.Ignore | ||||||
| //            }); |             }); | ||||||
|  |  | ||||||
| //            return new HttpResponseMessage() |             return new HttpResponseMessage() | ||||||
| //            { |             { | ||||||
| //                Content = new StringContent( |                 Content = new StringContent( | ||||||
| //                    json, |                     json, | ||||||
| //                    System.Text.Encoding.UTF8, |                     System.Text.Encoding.UTF8, | ||||||
| //                    "application/json") |                     "application/json") | ||||||
| //            }; |             }; | ||||||
| //        } |         } | ||||||
|  |  | ||||||
| //        [HttpGet] |         [HttpGet] | ||||||
| //        public HttpResponseMessage Login() |         public HttpResponseMessage Login() | ||||||
| //        { |         { | ||||||
| //            // 직접 파일을 읽어서 반환 |             // 직접 파일을 읽어서 반환 | ||||||
| //            var filePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Web", "wwwroot", "login.html"); |             var filePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Web", "wwwroot", "login.html"); | ||||||
| //            var contents = string.Empty; |             var contents = string.Empty; | ||||||
|  |  | ||||||
| //            if (System.IO.File.Exists(filePath)) |             if (System.IO.File.Exists(filePath)) | ||||||
| //            { |             { | ||||||
| //                contents = System.IO.File.ReadAllText(filePath, System.Text.Encoding.UTF8); |                 contents = System.IO.File.ReadAllText(filePath, System.Text.Encoding.UTF8); | ||||||
| //            } |             } | ||||||
| //            else |             else | ||||||
| //            { |             { | ||||||
| //                // 파일이 없으면 404 에러 페이지 또는 기본 메시지 |                 // 파일이 없으면 404 에러 페이지 또는 기본 메시지 | ||||||
| //                contents = "<html><body><h1>404 - File Not Found</h1><p>The requested file was not found: " + filePath + "</p></body></html>"; |                 contents = "<html><body><h1>404 - File Not Found</h1><p>The requested file was not found: " + filePath + "</p></body></html>"; | ||||||
| //            } |             } | ||||||
|  |  | ||||||
| //            //공용값 적용 |             //공용값 적용 | ||||||
| //            ApplyCommonValue(ref contents); |             ApplyCommonValue(ref contents); | ||||||
|  |  | ||||||
| //            var resp = new HttpResponseMessage() |             var resp = new HttpResponseMessage() | ||||||
| //            { |             { | ||||||
| //                Content = new StringContent( |                 Content = new StringContent( | ||||||
| //              contents, |               contents, | ||||||
| //              System.Text.Encoding.UTF8, |               System.Text.Encoding.UTF8, | ||||||
| //              "text/html") |               "text/html") | ||||||
| //            }; |             }; | ||||||
|  |  | ||||||
| //            return resp; |             return resp; | ||||||
| //        } |         } | ||||||
|  |  | ||||||
| //        [HttpGet] |         [HttpGet] | ||||||
| //        public HttpResponseMessage Index() |         public HttpResponseMessage Index() | ||||||
| //        { |         { | ||||||
| //            // 직접 파일을 읽어서 반환 |             // 직접 파일을 읽어서 반환 | ||||||
| //            var filePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Web", "wwwroot", "index.html"); |             var filePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Web", "wwwroot", "index.html"); | ||||||
| //            var contents = string.Empty; |             var contents = string.Empty; | ||||||
|  |  | ||||||
| //            if (System.IO.File.Exists(filePath)) |             if (System.IO.File.Exists(filePath)) | ||||||
| //            { |             { | ||||||
| //                contents = System.IO.File.ReadAllText(filePath, System.Text.Encoding.UTF8); |                 contents = System.IO.File.ReadAllText(filePath, System.Text.Encoding.UTF8); | ||||||
| //            } |             } | ||||||
| //            else |             else | ||||||
| //            { |             { | ||||||
| //                // 파일이 없으면 404 에러 페이지 또는 기본 메시지 |                 // 파일이 없으면 404 에러 페이지 또는 기본 메시지 | ||||||
| //                contents = "<html><body><h1>404 - File Not Found</h1><p>The requested file was not found: " + filePath + "</p></body></html>"; |                 contents = "<html><body><h1>404 - File Not Found</h1><p>The requested file was not found: " + filePath + "</p></body></html>"; | ||||||
| //            } |             } | ||||||
|  |  | ||||||
| //            //공용값 적용 |             //공용값 적용 | ||||||
| //            ApplyCommonValue(ref contents); |             ApplyCommonValue(ref contents); | ||||||
|  |  | ||||||
| //            var resp = new HttpResponseMessage() |             var resp = new HttpResponseMessage() | ||||||
| //            { |             { | ||||||
| //                Content = new StringContent( |                 Content = new StringContent( | ||||||
| //              contents, |               contents, | ||||||
| //              System.Text.Encoding.UTF8, |               System.Text.Encoding.UTF8, | ||||||
| //              "text/html") |               "text/html") | ||||||
| //            }; |             }; | ||||||
|  |  | ||||||
| //            return resp; |             return resp; | ||||||
| //        } |         } | ||||||
|  |  | ||||||
| //    } |         [HttpGet] | ||||||
| //} |         public HttpResponseMessage GetPreviousLoginInfo() | ||||||
|  |         { | ||||||
|  |             try | ||||||
|  |             { | ||||||
|  |                 // pub.setting에서 이전 로그인 정보 읽기 | ||||||
|  |                 var previousLoginInfo = new | ||||||
|  |                 { | ||||||
|  |                     Gcode = Pub.setting.lastgcode ?? "", | ||||||
|  |                     UserId = Pub.setting.lastid ?? "", | ||||||
|  |                     Dept = Pub.setting.lastdpt ?? "", | ||||||
|  |                     RememberMe = false // 기본값으로 설정 | ||||||
|  |                 }; | ||||||
|  |  | ||||||
|  |                 return CreateJsonResponse(new | ||||||
|  |                 { | ||||||
|  |                     Success = true, | ||||||
|  |                     Data = previousLoginInfo | ||||||
|  |                 }); | ||||||
|  |             } | ||||||
|  |             catch (Exception ex) | ||||||
|  |             { | ||||||
|  |                 return CreateJsonResponse(new | ||||||
|  |                 { | ||||||
|  |                     Success = false, | ||||||
|  |                     Message = "이전 로그인 정보를 가져오는 중 오류가 발생했습니다: " + ex.Message | ||||||
|  |                 }); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |     } | ||||||
|  | } | ||||||
|   | |||||||
| @@ -6,16 +6,7 @@ using System.Threading.Tasks; | |||||||
|  |  | ||||||
| namespace Project.Web.Model | namespace Project.Web.Model | ||||||
| { | { | ||||||
|     public class GroupUserModel |      | ||||||
|     { |  | ||||||
|         public string Gcode { get; set; } |  | ||||||
|         public string uid { get; set; } |  | ||||||
|     } |  | ||||||
|     public class UserModel |  | ||||||
|     { |  | ||||||
|         public string uid { get; set; } |  | ||||||
|         public string password { get; set; } |  | ||||||
|     } |  | ||||||
|     public class PageModel |     public class PageModel | ||||||
|     { |     { | ||||||
|         public List<KeyValuePair<string, object>> RouteData { get; set; } |         public List<KeyValuePair<string, object>> RouteData { get; set; } | ||||||
|   | |||||||
| @@ -24,7 +24,7 @@ namespace Project.OWIN | |||||||
|  |  | ||||||
|             config.Routes.MapHttpRoute( |             config.Routes.MapHttpRoute( | ||||||
|                    name: "DefaultApi", |                    name: "DefaultApi", | ||||||
|                    routeTemplate: "api/{controller}/{action}/{id}", |                    routeTemplate: "{controller}/{action}/{id}", | ||||||
|                    defaults: new { id = RouteParameter.Optional } |                    defaults: new { id = RouteParameter.Optional } | ||||||
|                ); |                ); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -233,7 +233,7 @@ | |||||||
|                     data.forEach(item => { |                     data.forEach(item => { | ||||||
|                         tableRows += ` |                         tableRows += ` | ||||||
|                             <tr class="hover:bg-white/5 transition-colors"> |                             <tr class="hover:bg-white/5 transition-colors"> | ||||||
|                                 <td class="px-6 py-4 whitespace-nowrap text-white">${item.uid || '-'}</td> |                                 <td class="px-6 py-4 whitespace-nowrap text-white">${item.name || '-'}(${item.uid})</td> | ||||||
|                                 <td class="px-6 py-4 whitespace-nowrap"> |                                 <td class="px-6 py-4 whitespace-nowrap"> | ||||||
|                                     <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-warning-500/20 text-warning-300"> |                                     <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-warning-500/20 text-warning-300"> | ||||||
|                                         ${item.cate || '-'} |                                         ${item.cate || '-'} | ||||||
|   | |||||||
| @@ -1,114 +0,0 @@ | |||||||
| <!DOCTYPE html> |  | ||||||
| <html lang="ko"> |  | ||||||
| <head> |  | ||||||
|     <meta charset="UTF-8"> |  | ||||||
|     <meta name="viewport" content="width=device-width, initial-scale=1.0"> |  | ||||||
|     <title>근태현황 대시보드</title> |  | ||||||
|     <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> |  | ||||||
| </head> |  | ||||||
| <body> |  | ||||||
|     <div class="container py-5"> |  | ||||||
|         <div class="row mb-4"> |  | ||||||
|             <div class="col-md-3"> |  | ||||||
|                 <div class="card text-center"> |  | ||||||
|                     <div class="card-body"> |  | ||||||
|                         <h5 class="card-title">출근</h5> |  | ||||||
|                         <p class="card-text fs-2" id="presentCount">0</p> |  | ||||||
|                     </div> |  | ||||||
|                 </div> |  | ||||||
|             </div> |  | ||||||
|             <div class="col-md-3"> |  | ||||||
|                 <div class="card text-center"> |  | ||||||
|                     <div class="card-body"> |  | ||||||
|                         <h5 class="card-title">휴가</h5> |  | ||||||
|                         <p class="card-text fs-2" id="leaveCount">0</p> |  | ||||||
|                     </div> |  | ||||||
|                 </div> |  | ||||||
|             </div> |  | ||||||
|             <div class="col-md-3"> |  | ||||||
|                 <div class="card text-center"> |  | ||||||
|                     <div class="card-body"> |  | ||||||
|                         <h5 class="card-title">휴가요청</h5> |  | ||||||
|                         <p class="card-text fs-2" id="leaveCount">0</p> |  | ||||||
|                     </div> |  | ||||||
|                 </div> |  | ||||||
|             </div> |  | ||||||
|             <div class="col-md-3"> |  | ||||||
|                 <div class="card text-center"> |  | ||||||
|                     <div class="card-body"> |  | ||||||
|                         <h5 class="card-title">구매요청</h5> |  | ||||||
|                         <p class="card-text fs-2" id="leaveCount">0</p> |  | ||||||
|                     </div> |  | ||||||
|                 </div> |  | ||||||
|             </div> |  | ||||||
|         </div> |  | ||||||
|         <div class="card"> |  | ||||||
|             <div class="card-header"> |  | ||||||
|                 휴가자 현황 |  | ||||||
|             </div> |  | ||||||
|             <div class="card-body p-0"> |  | ||||||
|                 <table class="table mb-0"> |  | ||||||
|                     <thead class="table-light"> |  | ||||||
|                         <tr> |  | ||||||
|                             <th>이름</th> |  | ||||||
|                             <th>출근 시간</th> |  | ||||||
|                             <th>퇴근 시간</th> |  | ||||||
|                             <th>상태</th> |  | ||||||
|                         </tr> |  | ||||||
|                     </thead> |  | ||||||
|                     <tbody id="attendanceTable"> |  | ||||||
|                         <!-- 데이터가 여기에 표시됩니다 --> |  | ||||||
|                     </tbody> |  | ||||||
|                 </table> |  | ||||||
|             </div> |  | ||||||
|         </div> |  | ||||||
|     </div> |  | ||||||
|     <script> |  | ||||||
|     // 샘플 데이터 |  | ||||||
|     const attendanceData = [ |  | ||||||
|       { name: '홍길동', checkIn: '09:01', checkOut: '18:00', status: '지각' }, |  | ||||||
|       { name: '김철수', checkIn: '08:55', checkOut: '18:05', status: '정상' }, |  | ||||||
|       { name: '이영희', checkIn: '-', checkOut: '-', status: '결근' }, |  | ||||||
|       { name: '박민수', checkIn: '09:00', checkOut: '18:10', status: '정상' }, |  | ||||||
|       { name: '최지우', checkIn: '09:20', checkOut: '18:00', status: '지각' } |  | ||||||
|     ]; |  | ||||||
|  |  | ||||||
|     function updateDashboard(data) { |  | ||||||
|       let present = 0, leave = 0, late = 0, absent = 0; |  | ||||||
|       let tableRows = ''; |  | ||||||
|       data.forEach(item => { |  | ||||||
|         if (item.status === '정상' || item.status === '지각') present++; |  | ||||||
|         if (item.checkOut !== '-') leave++; |  | ||||||
|         if (item.status === '지각') late++; |  | ||||||
|         if (item.status === '결근') absent++; |  | ||||||
|         tableRows += `<tr> |  | ||||||
|           <td>${item.name}</td> |  | ||||||
|           <td>${item.checkIn}</td> |  | ||||||
|           <td>${item.checkOut}</td> |  | ||||||
|           <td>${item.status}</td> |  | ||||||
|         </tr>`; |  | ||||||
|       }); |  | ||||||
|  |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     // 페이지 로드 시 대시보드 업데이트 |  | ||||||
|     updateDashboard(attendanceData); |  | ||||||
|  |  | ||||||
|     // 휴가 인원 Ajax 업데이트 |  | ||||||
|     function updateLeaveCount() { |  | ||||||
|       fetch('http://127.0.0.1:9000/Dashboard/TodayCountH') |  | ||||||
|         .then(response => response.text()) |  | ||||||
|         .then(data => { |  | ||||||
|           // 수신된 데이터가 "1" 형태로 반환되므로, 쌍따옴표를 제거하고 숫자로 변환 |  | ||||||
|           const cleanData = data.replace(/"/g, ''); |  | ||||||
|           document.getElementById('leaveCount').textContent = parseInt(cleanData, 10); |  | ||||||
|         }) |  | ||||||
|         .catch(error => console.error('휴가 인원 업데이트 중 오류 발생:', error)); |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     // 페이지 로드 시 휴가 인원 업데이트 |  | ||||||
|     updateLeaveCount(); |  | ||||||
|     </script> |  | ||||||
|     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script> |  | ||||||
| </body> |  | ||||||
| </html> |  | ||||||
| @@ -116,6 +116,17 @@ | |||||||
|             transform: translateY(-1.5rem) scale(0.85); |             transform: translateY(-1.5rem) scale(0.85); | ||||||
|             color: #3b82f6; |             color: #3b82f6; | ||||||
|         } |         } | ||||||
|  |         /* 드롭다운 스타일 */ | ||||||
|  |         select.input-field option { | ||||||
|  |             background-color: #1f2937; | ||||||
|  |             color: white; | ||||||
|  |         } | ||||||
|  |         select.input-field:focus option:checked { | ||||||
|  |             background-color: #3b82f6; | ||||||
|  |         } | ||||||
|  |         select.input-field option:hover { | ||||||
|  |             background-color: #374151; | ||||||
|  |         } | ||||||
|     </style> |     </style> | ||||||
| </head> | </head> | ||||||
| <body class="gradient-bg min-h-screen flex items-center justify-center p-4"> | <body class="gradient-bg min-h-screen flex items-center justify-center p-4"> | ||||||
| @@ -135,6 +146,26 @@ | |||||||
|  |  | ||||||
|                         <!-- 로그인 폼 --> |                         <!-- 로그인 폼 --> | ||||||
|             <form id="loginForm" class="space-y-6 animate-slide-up"> |             <form id="loginForm" class="space-y-6 animate-slide-up"> | ||||||
|  |                 <!-- Gcode 드롭다운 --> | ||||||
|  |                 <div class="relative"> | ||||||
|  |                     <select  | ||||||
|  |                         id="gcode"  | ||||||
|  |                         name="gcode"  | ||||||
|  |                         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 | ||||||
|  |                     > | ||||||
|  |                         <option value="" class="text-gray-800">부서를 선택하세요</option> | ||||||
|  |                     </select> | ||||||
|  |                     <label for="gcode" class="floating-label absolute left-4 top-3 text-white/60 text-sm pointer-events-none"> | ||||||
|  |                         부서 선택 | ||||||
|  |                     </label> | ||||||
|  |                     <div class="absolute right-3 top-3 pointer-events-none"> | ||||||
|  |                         <svg class="w-5 h-5 text-white/40" fill="none" stroke="currentColor" viewBox="0 0 24 24"> | ||||||
|  |                             <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path> | ||||||
|  |                         </svg> | ||||||
|  |                     </div> | ||||||
|  |                 </div> | ||||||
|  |  | ||||||
|                 <!-- 사용자 ID 입력 --> |                 <!-- 사용자 ID 입력 --> | ||||||
|                 <div class="relative"> |                 <div class="relative"> | ||||||
|                     <input  |                     <input  | ||||||
| @@ -244,12 +275,13 @@ | |||||||
|         document.getElementById('loginForm').addEventListener('submit', function(e) { |         document.getElementById('loginForm').addEventListener('submit', function(e) { | ||||||
|             e.preventDefault(); |             e.preventDefault(); | ||||||
|              |              | ||||||
|  | 			const gcode = document.getElementById('gcode').value; | ||||||
|             const userId = document.getElementById('userId').value; |             const userId = document.getElementById('userId').value; | ||||||
|             const password = document.getElementById('password').value; |             const password = document.getElementById('password').value; | ||||||
|             const rememberMe = document.querySelector('input[type="checkbox"]').checked; |             const rememberMe = document.querySelector('input[type="checkbox"]').checked; | ||||||
|              |              | ||||||
|             if (!userId || !password) { |             if (!gcode || !userId || !password) { | ||||||
|                 showError('사용자 ID와 비밀번호를 입력해주세요.'); |                 showError('그룹코드/사용자ID/비밀번호를 입력해주세요.'); | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|              |              | ||||||
| @@ -263,6 +295,7 @@ | |||||||
|                     'Content-Type': 'application/json', |                     'Content-Type': 'application/json', | ||||||
|                 }, |                 }, | ||||||
|                 body: JSON.stringify({ |                 body: JSON.stringify({ | ||||||
|  |                     Gcode: gcode, | ||||||
|                     UserId: userId, |                     UserId: userId, | ||||||
|                     Password: password, |                     Password: password, | ||||||
|                     RememberMe: rememberMe |                     RememberMe: rememberMe | ||||||
| @@ -276,6 +309,11 @@ | |||||||
|                     // 로그인 성공 |                     // 로그인 성공 | ||||||
|                     showSuccess(data.Message); |                     showSuccess(data.Message); | ||||||
|                      |                      | ||||||
|  |                     // WebView2에 로그인 성공 메시지 전송 | ||||||
|  |                     if (window.chrome && window.chrome.webview) { | ||||||
|  |                         window.chrome.webview.postMessage('LOGIN_SUCCESS'); | ||||||
|  |                     } | ||||||
|  |                      | ||||||
|                     // 리다이렉트 URL이 있으면 이동 |                     // 리다이렉트 URL이 있으면 이동 | ||||||
|                     if (data.RedirectUrl) { |                     if (data.RedirectUrl) { | ||||||
|                         setTimeout(() => { |                         setTimeout(() => { | ||||||
| @@ -342,12 +380,103 @@ | |||||||
|             }, 3000); |             }, 3000); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         // 그룹 목록 로드 | ||||||
|  |         function loadUserGroups() { | ||||||
|  |             fetch('http://127.0.0.1:9000/DashBoard/GetUserGroups') | ||||||
|  |                 .then(response => response.json()) | ||||||
|  |                 .then(data => { | ||||||
|  |                     const gcodeSelect = document.getElementById('gcode'); | ||||||
|  |                      | ||||||
|  |                     // 기존 옵션 제거 (첫 번째 옵션 제외) | ||||||
|  |                     while (gcodeSelect.children.length > 1) { | ||||||
|  |                         gcodeSelect.removeChild(gcodeSelect.lastChild); | ||||||
|  |                     } | ||||||
|  |                      | ||||||
|  |                     // 데이터 추가 | ||||||
|  |                     data.forEach(group => { | ||||||
|  |                         if (group.gcode && group.name) { | ||||||
|  |                             const option = document.createElement('option'); | ||||||
|  |                             option.value = group.gcode; | ||||||
|  |                             option.textContent = group.name; | ||||||
|  |                             option.className = 'text-gray-800'; | ||||||
|  |                             gcodeSelect.appendChild(option); | ||||||
|  |                         } | ||||||
|  |                     }); | ||||||
|  |                      | ||||||
|  |                     // 이전 로그인 정보 설정 | ||||||
|  |                     setPreviousLoginInfo(); | ||||||
|  |                 }) | ||||||
|  |                 .catch(error => { | ||||||
|  |                     console.error('그룹 목록 로드 중 오류 발생:', error); | ||||||
|  |                     showError('부서 목록을 불러오는 중 오류가 발생했습니다.'); | ||||||
|  |                 }); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         // 이전 로그인 정보 설정 | ||||||
|  |         function setPreviousLoginInfo() { | ||||||
|  |             // HomeController의 GetPreviousLoginInfo API 호출 | ||||||
|  |             fetch('http://127.0.0.1:9000/Home/GetPreviousLoginInfo') | ||||||
|  |                 .then(response => response.json()) | ||||||
|  |                 .then(data => { | ||||||
|  |                     if (data.Success && data.Data) { | ||||||
|  |                         handlePreviousLoginInfo(data.Data); | ||||||
|  |                     } | ||||||
|  |                 }) | ||||||
|  |                 .catch(error => { | ||||||
|  |                     console.error('이전 로그인 정보 로드 중 오류 발생:', error); | ||||||
|  |                     // 오류가 발생해도 기본 포커스 설정 | ||||||
|  |                     setTimeout(() => { | ||||||
|  |                         document.getElementById('gcode').focus(); | ||||||
|  |                     }, 100); | ||||||
|  |                 }); | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         // 이전 로그인 정보 처리 | ||||||
|  |         function handlePreviousLoginInfo(data) { | ||||||
|  |             let hasPreviousInfo = false; | ||||||
|  |              | ||||||
|  |             if (data && data.Gcode) { | ||||||
|  |                 // 부서 선택 | ||||||
|  |                 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'; | ||||||
|  |                 } | ||||||
|  |                 hasPreviousInfo = true; | ||||||
|  |             } | ||||||
|  |              | ||||||
|  |             // 이전 로그인 정보가 있으면 비밀번호 필드에, 없으면 부서 선택에 포커스 | ||||||
|  |             setTimeout(() => { | ||||||
|  |                 if (hasPreviousInfo) { | ||||||
|  |                     document.getElementById('password').focus(); | ||||||
|  |                 } else { | ||||||
|  |                     document.getElementById('gcode').focus(); | ||||||
|  |                 } | ||||||
|  |             }, 100); | ||||||
|  |         } | ||||||
|  |  | ||||||
|         // 페이지 로드 시 애니메이션 |         // 페이지 로드 시 애니메이션 | ||||||
|         document.addEventListener('DOMContentLoaded', function() { |         document.addEventListener('DOMContentLoaded', function() { | ||||||
|             // 입력 필드에 자동 포커스 |             // 그룹 목록 로드 | ||||||
|             setTimeout(() => { |             loadUserGroups(); | ||||||
|                 document.getElementById('userId').focus(); |  | ||||||
|             }, 500); |  | ||||||
|         }); |         }); | ||||||
|     </script> |     </script> | ||||||
| </body> | </body> | ||||||
|   | |||||||
| @@ -204,18 +204,18 @@ namespace Project | |||||||
|  |  | ||||||
|         void Func_Login() |         void Func_Login() | ||||||
|         { |         { | ||||||
|             if (System.Diagnostics.Debugger.IsAttached) | #if WEB | ||||||
|             { |  | ||||||
|                 using (var flogIn = new Dialog.fLogin_WB()) |             using (var f = new Dialog.fLogin_WB()) | ||||||
|                     if (flogIn.ShowDialog() != System.Windows.Forms.DialogResult.OK) |                 if (f.ShowDialog() != System.Windows.Forms.DialogResult.OK) | ||||||
|                     Application.ExitThread(); |                     Application.ExitThread(); | ||||||
|             } |  | ||||||
|             else | #else | ||||||
|             { |              | ||||||
|                 using (var flogIn = new Dialog.fLogin()) |                 using (var f = new Dialog.fLogin()) | ||||||
|                     if (flogIn.ShowDialog() != System.Windows.Forms.DialogResult.OK) |                     if (f.ShowDialog() != System.Windows.Forms.DialogResult.OK) | ||||||
|                         Application.ExitThread(); |                         Application.ExitThread(); | ||||||
|             } | #endif | ||||||
|  |  | ||||||
|  |  | ||||||
|             this.mn_purchase.Visible = FCOMMON.Util.getBit(FCOMMON.info.Login.gpermission, (int)FCOMMON.eGroupPermission.menu_purchase); |             this.mn_purchase.Visible = FCOMMON.Util.getBit(FCOMMON.info.Login.gpermission, (int)FCOMMON.eGroupPermission.menu_purchase); | ||||||
|   | |||||||
 Submodule Sub/arCtl updated: 249154147d...a4b2a097f8
									
								
							| @@ -38,10 +38,6 @@ | |||||||
|     <Reference Include="arCommUtil"> |     <Reference Include="arCommUtil"> | ||||||
|       <HintPath>..\..\DLL\arCommUtil.dll</HintPath> |       <HintPath>..\..\DLL\arCommUtil.dll</HintPath> | ||||||
|     </Reference> |     </Reference> | ||||||
|     <Reference Include="arControl.Net4, Version=18.7.27.1500, Culture=neutral, processorArchitecture=x86"> |  | ||||||
|       <SpecificVersion>False</SpecificVersion> |  | ||||||
|       <HintPath>..\..\Sub\arCtl\bin\debug\arControl.Net4.dll</HintPath> |  | ||||||
|     </Reference> |  | ||||||
|     <Reference Include="ArSetting.Net4"> |     <Reference Include="ArSetting.Net4"> | ||||||
|       <HintPath>..\..\DLL\ArSetting.Net4.dll</HintPath> |       <HintPath>..\..\DLL\ArSetting.Net4.dll</HintPath> | ||||||
|     </Reference> |     </Reference> | ||||||
| @@ -322,6 +318,10 @@ | |||||||
|     </Compile> |     </Compile> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="..\..\Sub\arCtl\arControl.csproj"> | ||||||
|  |       <Project>{f31c242c-1b15-4518-9733-48558499fe4b}</Project> | ||||||
|  |       <Name>arControl</Name> | ||||||
|  |     </ProjectReference> | ||||||
|     <ProjectReference Include="..\FCM0000\FCM0000.csproj"> |     <ProjectReference Include="..\FCM0000\FCM0000.csproj"> | ||||||
|       <Project>{26982882-c1ff-45f8-861c-d67558725ff1}</Project> |       <Project>{26982882-c1ff-45f8-861c-d67558725ff1}</Project> | ||||||
|       <Name>FCM0000</Name> |       <Name>FCM0000</Name> | ||||||
|   | |||||||
| @@ -4,6 +4,8 @@ using System.Linq; | |||||||
| using System.Text; | using System.Text; | ||||||
| using System.Data.SqlClient; | using System.Data.SqlClient; | ||||||
| using System.Windows.Forms; | using System.Windows.Forms; | ||||||
|  | using FCOMMON.Models; | ||||||
|  | using System.Data; | ||||||
|  |  | ||||||
| namespace FCOMMON | namespace FCOMMON | ||||||
| { | { | ||||||
| @@ -17,21 +19,124 @@ namespace FCOMMON | |||||||
|             return cn; |             return cn; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         public struct sItemInfo |  | ||||||
|  |         public static UserModel GetUserInfo(string uid) | ||||||
|         { |         { | ||||||
|             public int idx; |             var retval = new UserModel(); | ||||||
|             public string sid; |             var cn = getCn(); | ||||||
|             public string model; |  | ||||||
|             public string supply; |             var sql = "select * from Users where id = @id"; | ||||||
|             public string name; |             var cmd = new System.Data.SqlClient.SqlCommand(sql, cn); | ||||||
|             public string unit; |             cmd.Parameters.Add("id", SqlDbType.VarChar).Value = uid; | ||||||
|             public float scale; |             cn.Open(); | ||||||
|             public string price; |             var rdr = cmd.ExecuteReader(); | ||||||
|             public int supplyidx; |             var cnt = 0; | ||||||
|             public string project; |             while (rdr.Read()) | ||||||
|             public int qty; |             { | ||||||
|  |                 retval.name = rdr["name"].ToString(); | ||||||
|  |                 retval.password = rdr["password"].ToString(); | ||||||
|  |                 retval.id = rdr["id"].ToString(); | ||||||
|  |                 retval.email = rdr["email"].ToString(); | ||||||
|  |                 retval.hp = rdr["email"].ToString(); | ||||||
|  |                 retval.tel = rdr["tel"].ToString(); | ||||||
|  |                 retval.grade = rdr["grade"].ToString(); | ||||||
|  |                 cnt += 1; | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  |             cn.Dispose(); | ||||||
|  |             if (cnt == 0) return null; | ||||||
|  |             return retval; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         public static UserGroupModel GetUserGroup(string gcode) | ||||||
|  |         { | ||||||
|  |             var retval = new UserGroupModel(); | ||||||
|  |             var cn = getCn(); | ||||||
|  |  | ||||||
|  |             var sql = "select * from UserGroup where gcode = @gcode"; | ||||||
|  |             var cmd = new System.Data.SqlClient.SqlCommand(sql, cn); | ||||||
|  |             cmd.Parameters.Add("gcode", SqlDbType.VarChar).Value = gcode; | ||||||
|  |             cn.Open(); | ||||||
|  |             var rdr = cmd.ExecuteReader(); | ||||||
|  |             var cnt = 0; | ||||||
|  |             while (rdr.Read()) | ||||||
|  |             { | ||||||
|  |                 retval.gcode = rdr["gcode"].ToString(); | ||||||
|  |                 retval.name = rdr["dept"].ToString(); | ||||||
|  |                 cnt += 1; | ||||||
|  |             } | ||||||
|  |             cn.Dispose(); | ||||||
|  |             if (cnt == 0) return null; | ||||||
|  |             return retval; | ||||||
|  |         } | ||||||
|  |         /// <summary> | ||||||
|  |         /// 입력된 id의 그룹정보를 반환 | ||||||
|  |         /// </summary> | ||||||
|  |         /// <param name="gcode"></param> | ||||||
|  |         /// <param name="uid"></param> | ||||||
|  |         /// <returns></returns> | ||||||
|  |         public static GroupUserModel GetGroupUser(string gcode, string uid) | ||||||
|  |         { | ||||||
|  |             var retval = new GroupUserModel(); | ||||||
|  |             var cn = getCn(); | ||||||
|  |  | ||||||
|  |             var sql = "select * from EETGW_GroupUser where gcode = @gcode and uid =  @uid"; | ||||||
|  |             var cmd = new System.Data.SqlClient.SqlCommand(sql, cn); | ||||||
|  |             cmd.Parameters.Add("gcode", SqlDbType.VarChar).Value = gcode; | ||||||
|  |             cmd.Parameters.Add("uid", SqlDbType.VarChar).Value = uid; | ||||||
|  |             cn.Open(); | ||||||
|  |             var rdr = cmd.ExecuteReader(); | ||||||
|  |             var cnt = 0; | ||||||
|  |             while (rdr.Read()) | ||||||
|  |             { | ||||||
|  |                 retval.Gcode = rdr["gcode"].ToString(); | ||||||
|  |                 retval.uid = rdr["uid"].ToString(); | ||||||
|  |                 retval.level = int.Parse(rdr["level"]?.ToString() ?? "0"); | ||||||
|  |                 retval.Process = rdr["Process"].ToString(); | ||||||
|  |                 cnt += 1; | ||||||
|  |             } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |             cn.Dispose(); | ||||||
|  |             if (cnt == 0) return null; | ||||||
|  |             return retval; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |  | ||||||
|  |         public static List<UserGroupModel> GetUserGroups() | ||||||
|  |         { | ||||||
|  |             var cn = getCn(); | ||||||
|  |             cn.Open(); | ||||||
|  |  | ||||||
|  |             List<UserGroupModel> retval = new List<UserGroupModel>(); | ||||||
|  |             var sql = " select gcode,dept,permission,managerinfo,devinfo,usemail" + | ||||||
|  |                       " from UserGroup " + | ||||||
|  |                       " order by usemail desc,dept"; | ||||||
|  |  | ||||||
|  |             var cmd = new SqlCommand(sql, cn); | ||||||
|  |             try | ||||||
|  |             { | ||||||
|  |                 var rdr = cmd.ExecuteReader(); | ||||||
|  |                 while (rdr.Read()) | ||||||
|  |                 { | ||||||
|  |                     retval.Add(new UserGroupModel | ||||||
|  |                     { | ||||||
|  |                         gcode = rdr["gcode"]?.ToString() ?? string.Empty, | ||||||
|  |                         name = rdr["dept"]?.ToString() ?? string.Empty, | ||||||
|  |                         perm = int.Parse(rdr["permission"]?.ToString() ?? "0"), | ||||||
|  |                     }); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |             catch | ||||||
|  |             { | ||||||
|  |  | ||||||
|  |             } | ||||||
|  |             cn.Close(); | ||||||
|  |             cn.Dispose(); | ||||||
|  |             return retval; | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |  | ||||||
|         public static List<string> GetItemStorageList() |         public static List<string> GetItemStorageList() | ||||||
|         { |         { | ||||||
|  |  | ||||||
| @@ -489,12 +594,12 @@ namespace FCOMMON | |||||||
|  |  | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         public static sItemInfo getLastPurchaseInfo(int idx) |         public static ItemModel getLastPurchaseInfo(int idx) | ||||||
|         { |         { | ||||||
|             var cn = getCn(); |             var cn = getCn(); | ||||||
|             cn.Open(); |             cn.Open(); | ||||||
|  |  | ||||||
|             var retval = new sItemInfo(); |             var retval = new ItemModel(); | ||||||
|             retval.idx = -1; |             retval.idx = -1; | ||||||
|  |  | ||||||
|             string sql = "select isnull(max(idx),-1) from Purchase where pumidx = " + idx.ToString(); |             string sql = "select isnull(max(idx),-1) from Purchase where pumidx = " + idx.ToString(); | ||||||
| @@ -530,12 +635,12 @@ namespace FCOMMON | |||||||
|             return retval; |             return retval; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         public static sItemInfo getLastPurchaseCRInfo(int idx) |         public static ItemModel getLastPurchaseCRInfo(int idx) | ||||||
|         { |         { | ||||||
|             var cn = getCn(); |             var cn = getCn(); | ||||||
|             cn.Open(); |             cn.Open(); | ||||||
|  |  | ||||||
|             var retval = new sItemInfo(); |             var retval = new ItemModel(); | ||||||
|             retval.idx = -1; |             retval.idx = -1; | ||||||
|  |  | ||||||
|             string sql = "select isnull(max(idx),-1) from EETGW_PurchaseCR  WITH (nolock) where pumidx = " + idx.ToString(); |             string sql = "select isnull(max(idx),-1) from EETGW_PurchaseCR  WITH (nolock) where pumidx = " + idx.ToString(); | ||||||
| @@ -679,12 +784,12 @@ namespace FCOMMON | |||||||
|             return cnt == 1; |             return cnt == 1; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         public static sItemInfo getItemInfo(int idx) |         public static ItemModel getItemInfo(int idx) | ||||||
|         { |         { | ||||||
|             var cn = getCn(); |             var cn = getCn(); | ||||||
|             cn.Open(); |             cn.Open(); | ||||||
|  |  | ||||||
|             var retval = new sItemInfo(); |             var retval = new ItemModel(); | ||||||
|             retval.idx = -1; |             retval.idx = -1; | ||||||
|  |  | ||||||
|             string sql = "select * from Items   WITH (nolock) where gcode='" + FCOMMON.info.Login.gcode + "' and  idx = " + idx.ToString(); |             string sql = "select * from Items   WITH (nolock) where gcode='" + FCOMMON.info.Login.gcode + "' and  idx = " + idx.ToString(); | ||||||
| @@ -709,7 +814,7 @@ namespace FCOMMON | |||||||
|             cn.Dispose(); |             cn.Dispose(); | ||||||
|             return retval; |             return retval; | ||||||
|         } |         } | ||||||
|         public static int addItemInfo(sItemInfo info) |         public static int addItemInfo(ItemModel info) | ||||||
|         { |         { | ||||||
|             int retval = -1; |             int retval = -1; | ||||||
|             var cn = getCn(); |             var cn = getCn(); | ||||||
| @@ -748,12 +853,12 @@ namespace FCOMMON | |||||||
|             cn.Dispose(); |             cn.Dispose(); | ||||||
|             return retval; |             return retval; | ||||||
|         } |         } | ||||||
|         public static sItemInfo getItemInfo(string sid) |         public static ItemModel getItemInfo(string sid) | ||||||
|         { |         { | ||||||
|             var cn = getCn(); |             var cn = getCn(); | ||||||
|             cn.Open(); |             cn.Open(); | ||||||
|  |  | ||||||
|             var retval = new sItemInfo(); |             var retval = new ItemModel(); | ||||||
|             retval.idx = -1; |             retval.idx = -1; | ||||||
|  |  | ||||||
|             string sql = "select * from Items  WITH (nolock) where [gcode] = '" + FCOMMON.info.Login.gcode + "' and  [sid] = '" + sid + "'"; |             string sql = "select * from Items  WITH (nolock) where [gcode] = '" + FCOMMON.info.Login.gcode + "' and  [sid] = '" + sid + "'"; | ||||||
| @@ -796,7 +901,7 @@ namespace FCOMMON | |||||||
|             var cn = getCn(); |             var cn = getCn(); | ||||||
|             cn.Open(); |             cn.Open(); | ||||||
|  |  | ||||||
|             var retval = new sItemInfo(); |             var retval = new ItemModel(); | ||||||
|             retval.idx = -1; |             retval.idx = -1; | ||||||
|  |  | ||||||
|             string sql = "select [id],[name],([name] +'(' +[id] +')') as dispName,isnull([dept],'') as dept,isnull(grade,'') as grade," + |             string sql = "select [id],[name],([name] +'(' +[id] +')') as dispName,isnull([dept],'') as dept,isnull(grade,'') as grade," + | ||||||
|   | |||||||
| @@ -36,9 +36,6 @@ | |||||||
|     <Prefer32Bit>false</Prefer32Bit> |     <Prefer32Bit>false</Prefer32Bit> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|     <Reference Include="arControl.Net4"> |  | ||||||
|       <HintPath>..\..\Sub\arCtl\obj\Debug\arControl.Net4.dll</HintPath> |  | ||||||
|     </Reference> |  | ||||||
|     <Reference Include="ArSetting.Net4"> |     <Reference Include="ArSetting.Net4"> | ||||||
|       <HintPath>..\..\DLL\ArSetting.Net4.dll</HintPath> |       <HintPath>..\..\DLL\ArSetting.Net4.dll</HintPath> | ||||||
|     </Reference> |     </Reference> | ||||||
| @@ -176,6 +173,10 @@ | |||||||
|     <Compile Include="IMyContract.cs" /> |     <Compile Include="IMyContract.cs" /> | ||||||
|     <Compile Include="ISO8601.cs" /> |     <Compile Include="ISO8601.cs" /> | ||||||
|     <Compile Include="keyValuedataTable.cs" /> |     <Compile Include="keyValuedataTable.cs" /> | ||||||
|  |     <Compile Include="Models\GroupUserModel.cs" /> | ||||||
|  |     <Compile Include="Models\ItemModel.cs" /> | ||||||
|  |     <Compile Include="Models\UserModel.cs" /> | ||||||
|  |     <Compile Include="Models\UserGroupModel.cs" /> | ||||||
|     <Compile Include="Properties\AssemblyInfo.cs" /> |     <Compile Include="Properties\AssemblyInfo.cs" /> | ||||||
|     <Compile Include="Info.cs" /> |     <Compile Include="Info.cs" /> | ||||||
|     <Compile Include="Setting.cs" /> |     <Compile Include="Setting.cs" /> | ||||||
| @@ -245,6 +246,10 @@ | |||||||
|     <None Include="packages.config" /> |     <None Include="packages.config" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="..\..\Sub\arCtl\arControl.csproj"> | ||||||
|  |       <Project>{f31c242c-1b15-4518-9733-48558499fe4b}</Project> | ||||||
|  |       <Name>arControl</Name> | ||||||
|  |     </ProjectReference> | ||||||
|     <ProjectReference Include="..\..\Sub\arftp\FTPClass.csproj"> |     <ProjectReference Include="..\..\Sub\arftp\FTPClass.csproj"> | ||||||
|       <Project>{150859d3-1c5d-4e20-b324-f9ebe188d893}</Project> |       <Project>{150859d3-1c5d-4e20-b324-f9ebe188d893}</Project> | ||||||
|       <Name>FTPClass</Name> |       <Name>FTPClass</Name> | ||||||
|   | |||||||
							
								
								
									
										12
									
								
								SubProject/FCOMMON/Models/GroupUserModel.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								SubProject/FCOMMON/Models/GroupUserModel.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | |||||||
|  | namespace FCOMMON.Models | ||||||
|  | { | ||||||
|  |  | ||||||
|  |  | ||||||
|  |     public class GroupUserModel | ||||||
|  |     { | ||||||
|  |         public string Gcode { get; set; } | ||||||
|  |         public string uid { get; set; } | ||||||
|  |         public string Process { get; set; } | ||||||
|  |         public int level { get; set; } | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										17
									
								
								SubProject/FCOMMON/Models/ItemModel.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								SubProject/FCOMMON/Models/ItemModel.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,17 @@ | |||||||
|  | namespace FCOMMON.Models | ||||||
|  | { | ||||||
|  |     public class ItemModel | ||||||
|  |     { | ||||||
|  |         public int idx; | ||||||
|  |         public string sid; | ||||||
|  |         public string model; | ||||||
|  |         public string supply; | ||||||
|  |         public string name; | ||||||
|  |         public string unit; | ||||||
|  |         public float scale; | ||||||
|  |         public string price; | ||||||
|  |         public int supplyidx; | ||||||
|  |         public string project; | ||||||
|  |         public int qty; | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										9
									
								
								SubProject/FCOMMON/Models/UserGroupModel.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								SubProject/FCOMMON/Models/UserGroupModel.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | |||||||
|  | namespace FCOMMON.Models | ||||||
|  | { | ||||||
|  |     public class UserGroupModel | ||||||
|  |     { | ||||||
|  |         public string gcode { get; set; } | ||||||
|  |         public string name { get; set; } | ||||||
|  |         public int perm { get; set; } | ||||||
|  |     } | ||||||
|  | } | ||||||
							
								
								
									
										19
									
								
								SubProject/FCOMMON/Models/UserModel.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								SubProject/FCOMMON/Models/UserModel.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | |||||||
|  | using System; | ||||||
|  | using System.Collections.Generic; | ||||||
|  | using System.Linq; | ||||||
|  | using System.Text; | ||||||
|  | using System.Threading.Tasks; | ||||||
|  |  | ||||||
|  | namespace FCOMMON.Models | ||||||
|  | { | ||||||
|  |     public class UserModel | ||||||
|  |     { | ||||||
|  |         public string id { get; set; } | ||||||
|  |         public string password { get; set; } | ||||||
|  |         public string name { get; set; } | ||||||
|  |         public string grade { get; set; } | ||||||
|  |         public string email { get; set; } | ||||||
|  |         public string hp { get; set; } | ||||||
|  |         public string tel { get; set; } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -635,7 +635,7 @@ namespace FEQ0000 | |||||||
|             var iteminfo = FCOMMON.DBM.getItemInfo(sid); |             var iteminfo = FCOMMON.DBM.getItemInfo(sid); | ||||||
|             if (iteminfo.idx < 0) |             if (iteminfo.idx < 0) | ||||||
|             { |             { | ||||||
|                 FCOMMON.DBM.sItemInfo newitem = new FCOMMON.DBM.sItemInfo(); |                 FCOMMON.Models.ItemModel newitem = new FCOMMON.Models.ItemModel(); | ||||||
|                 newitem.sid = newdr.sid; |                 newitem.sid = newdr.sid; | ||||||
|                 newitem.name = newdr.pumname; |                 newitem.name = newdr.pumname; | ||||||
|                 newitem.price = newdr.pumprice.ToString(); |                 newitem.price = newdr.pumprice.ToString(); | ||||||
|   | |||||||
| @@ -170,7 +170,7 @@ namespace FEQ0000 | |||||||
|             var iteminfo = FCOMMON.DBM.getItemInfo(sid); |             var iteminfo = FCOMMON.DBM.getItemInfo(sid); | ||||||
|             if (iteminfo.idx < 0) |             if (iteminfo.idx < 0) | ||||||
|             { |             { | ||||||
|                 FCOMMON.DBM.sItemInfo newitem = new FCOMMON.DBM.sItemInfo(); |                 FCOMMON.Models.ItemModel newitem = new FCOMMON.Models.ItemModel(); | ||||||
|                 newitem.sid = newdr.sid; |                 newitem.sid = newdr.sid; | ||||||
|                 newitem.name = newdr.pumname; |                 newitem.name = newdr.pumname; | ||||||
|                 newitem.price = newdr.pumprice.ToString(); |                 newitem.price = newdr.pumprice.ToString(); | ||||||
|   | |||||||
| @@ -580,7 +580,7 @@ namespace FEQ0000 | |||||||
|             var iteminfo = FCOMMON.DBM.getItemInfo(sid); |             var iteminfo = FCOMMON.DBM.getItemInfo(sid); | ||||||
|             if (iteminfo.idx < 0) |             if (iteminfo.idx < 0) | ||||||
|             { |             { | ||||||
|                 FCOMMON.DBM.sItemInfo newitem = new FCOMMON.DBM.sItemInfo(); |                 FCOMMON.Models.ItemModel newitem = new FCOMMON.Models.ItemModel(); | ||||||
|                 newitem.sid = newdr.sid; |                 newitem.sid = newdr.sid; | ||||||
|                 newitem.name = newdr.pumname; |                 newitem.name = newdr.pumname; | ||||||
|                 newitem.price = newdr.pumprice.ToString(); |                 newitem.price = newdr.pumprice.ToString(); | ||||||
|   | |||||||
| @@ -163,7 +163,7 @@ namespace FEQ0000 | |||||||
|             var iteminfo = FCOMMON.DBM.getItemInfo(sid); |             var iteminfo = FCOMMON.DBM.getItemInfo(sid); | ||||||
|             if (iteminfo.idx < 0) |             if (iteminfo.idx < 0) | ||||||
|             { |             { | ||||||
|                 FCOMMON.DBM.sItemInfo newitem = new FCOMMON.DBM.sItemInfo(); |                 FCOMMON.Models.ItemModel newitem = new FCOMMON.Models.ItemModel(); | ||||||
|                 newitem.sid = newdr.sid; |                 newitem.sid = newdr.sid; | ||||||
|                 newitem.name = newdr.pumname; |                 newitem.name = newdr.pumname; | ||||||
|                 newitem.price = newdr.pumprice.ToString(); |                 newitem.price = newdr.pumprice.ToString(); | ||||||
|   | |||||||
| @@ -654,7 +654,7 @@ namespace FEQ0000 | |||||||
|             var iteminfo = FCOMMON.DBM.getItemInfo(sid); |             var iteminfo = FCOMMON.DBM.getItemInfo(sid); | ||||||
|             if (iteminfo.idx < 0) |             if (iteminfo.idx < 0) | ||||||
|             { |             { | ||||||
|                 FCOMMON.DBM.sItemInfo newitem = new FCOMMON.DBM.sItemInfo(); |                 FCOMMON.Models.ItemModel newitem = new FCOMMON.Models.ItemModel(); | ||||||
|                 newitem.sid = newdr.sid; |                 newitem.sid = newdr.sid; | ||||||
|                 newitem.name = newdr.pumname; |                 newitem.name = newdr.pumname; | ||||||
|                 newitem.price = newdr.pumprice.ToString(); |                 newitem.price = newdr.pumprice.ToString(); | ||||||
|   | |||||||
| @@ -169,7 +169,7 @@ namespace FEQ0000 | |||||||
|             var iteminfo = FCOMMON.DBM.getItemInfo(sid); |             var iteminfo = FCOMMON.DBM.getItemInfo(sid); | ||||||
|             if (iteminfo.idx < 0) |             if (iteminfo.idx < 0) | ||||||
|             { |             { | ||||||
|                 FCOMMON.DBM.sItemInfo newitem = new FCOMMON.DBM.sItemInfo(); |                 FCOMMON.Models.ItemModel newitem = new FCOMMON.Models.ItemModel(); | ||||||
|                 newitem.sid = newdr.sid; |                 newitem.sid = newdr.sid; | ||||||
|                 newitem.name = newdr.pumname; |                 newitem.name = newdr.pumname; | ||||||
|                 newitem.price = newdr.pumprice.ToString(); |                 newitem.price = newdr.pumprice.ToString(); | ||||||
|   | |||||||
| @@ -469,7 +469,7 @@ namespace FEQ0000 | |||||||
|             var iteminfo = FCOMMON.DBM.getItemInfo(sid); |             var iteminfo = FCOMMON.DBM.getItemInfo(sid); | ||||||
|             if (iteminfo.idx < 0) |             if (iteminfo.idx < 0) | ||||||
|             { |             { | ||||||
|                 FCOMMON.DBM.sItemInfo newitem = new FCOMMON.DBM.sItemInfo(); |                 FCOMMON.Models.ItemModel newitem = new FCOMMON.Models.ItemModel(); | ||||||
|                 newitem.sid = newdr.sid; |                 newitem.sid = newdr.sid; | ||||||
|                 newitem.name = newdr.pumname; |                 newitem.name = newdr.pumname; | ||||||
|                 newitem.price = newdr.pumprice.ToString(); |                 newitem.price = newdr.pumprice.ToString(); | ||||||
|   | |||||||
							
								
								
									
										105
									
								
								SubProject/FPJ0000/OtConfirm/fOTConfirm.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										105
									
								
								SubProject/FPJ0000/OtConfirm/fOTConfirm.Designer.cs
									
									
									
										generated
									
									
									
								
							| @@ -30,16 +30,16 @@ | |||||||
|         { |         { | ||||||
|             this.components = new System.ComponentModel.Container(); |             this.components = new System.ComponentModel.Container(); | ||||||
|             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fOTConfirm)); |             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fOTConfirm)); | ||||||
|             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); |             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); | ||||||
|             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); |             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); | ||||||
|             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); |             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); | ||||||
|             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); |             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); | ||||||
|             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); |             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); | ||||||
|             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); |             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); | ||||||
|             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); |             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); | ||||||
|             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); |             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); | ||||||
|             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); |             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); | ||||||
|             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); |             System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); | ||||||
|             this.bn = new System.Windows.Forms.BindingNavigator(this.components); |             this.bn = new System.Windows.Forms.BindingNavigator(this.components); | ||||||
|             this.bs = new System.Windows.Forms.BindingSource(this.components); |             this.bs = new System.Windows.Forms.BindingSource(this.components); | ||||||
|             this.dsMSSQL = new FPJ0000.dsPRJ(); |             this.dsMSSQL = new FPJ0000.dsPRJ(); | ||||||
| @@ -100,6 +100,8 @@ | |||||||
|             this.otEnd = new System.Windows.Forms.DataGridViewTextBoxColumn(); |             this.otEnd = new System.Windows.Forms.DataGridViewTextBoxColumn(); | ||||||
|             this.projectNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); |             this.projectNameDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); | ||||||
|             this.descriptionDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); |             this.descriptionDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn(); | ||||||
|  |             this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); | ||||||
|  |             this.목록내보내기ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); | ||||||
|             ((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit(); |             ((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit(); | ||||||
|             this.bn.SuspendLayout(); |             this.bn.SuspendLayout(); | ||||||
|             ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); |             ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); | ||||||
| @@ -110,6 +112,7 @@ | |||||||
|             this.splitContainer1.Panel2.SuspendLayout(); |             this.splitContainer1.Panel2.SuspendLayout(); | ||||||
|             this.splitContainer1.SuspendLayout(); |             this.splitContainer1.SuspendLayout(); | ||||||
|             ((System.ComponentModel.ISupportInitialize)(this.dv1)).BeginInit(); |             ((System.ComponentModel.ISupportInitialize)(this.dv1)).BeginInit(); | ||||||
|  |             this.contextMenuStrip1.SuspendLayout(); | ||||||
|             this.SuspendLayout(); |             this.SuspendLayout(); | ||||||
|             //  |             //  | ||||||
|             // bn |             // bn | ||||||
| @@ -511,6 +514,7 @@ | |||||||
|             this.otEnd, |             this.otEnd, | ||||||
|             this.projectNameDataGridViewTextBoxColumn, |             this.projectNameDataGridViewTextBoxColumn, | ||||||
|             this.descriptionDataGridViewTextBoxColumn}); |             this.descriptionDataGridViewTextBoxColumn}); | ||||||
|  |             this.dv1.ContextMenuStrip = this.contextMenuStrip1; | ||||||
|             this.dv1.DataSource = this.bs; |             this.dv1.DataSource = this.bs; | ||||||
|             this.dv1.Dock = System.Windows.Forms.DockStyle.Fill; |             this.dv1.Dock = System.Windows.Forms.DockStyle.Fill; | ||||||
|             this.dv1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; |             this.dv1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; | ||||||
| @@ -553,9 +557,9 @@ | |||||||
|             // wwDataGridViewTextBoxColumn |             // wwDataGridViewTextBoxColumn | ||||||
|             //  |             //  | ||||||
|             this.wwDataGridViewTextBoxColumn.DataPropertyName = "ww"; |             this.wwDataGridViewTextBoxColumn.DataPropertyName = "ww"; | ||||||
|             dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; |             dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; | ||||||
|             dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); |             dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); | ||||||
|             this.wwDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle1; |             this.wwDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle11; | ||||||
|             this.wwDataGridViewTextBoxColumn.HeaderText = "WW"; |             this.wwDataGridViewTextBoxColumn.HeaderText = "WW"; | ||||||
|             this.wwDataGridViewTextBoxColumn.Name = "wwDataGridViewTextBoxColumn"; |             this.wwDataGridViewTextBoxColumn.Name = "wwDataGridViewTextBoxColumn"; | ||||||
|             this.wwDataGridViewTextBoxColumn.ReadOnly = true; |             this.wwDataGridViewTextBoxColumn.ReadOnly = true; | ||||||
| @@ -564,8 +568,8 @@ | |||||||
|             // pdateDataGridViewTextBoxColumn |             // pdateDataGridViewTextBoxColumn | ||||||
|             //  |             //  | ||||||
|             this.pdateDataGridViewTextBoxColumn.DataPropertyName = "pdate"; |             this.pdateDataGridViewTextBoxColumn.DataPropertyName = "pdate"; | ||||||
|             dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; |             dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; | ||||||
|             this.pdateDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle2; |             this.pdateDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle12; | ||||||
|             this.pdateDataGridViewTextBoxColumn.HeaderText = "날짜"; |             this.pdateDataGridViewTextBoxColumn.HeaderText = "날짜"; | ||||||
|             this.pdateDataGridViewTextBoxColumn.Name = "pdateDataGridViewTextBoxColumn"; |             this.pdateDataGridViewTextBoxColumn.Name = "pdateDataGridViewTextBoxColumn"; | ||||||
|             this.pdateDataGridViewTextBoxColumn.ReadOnly = true; |             this.pdateDataGridViewTextBoxColumn.ReadOnly = true; | ||||||
| @@ -574,8 +578,8 @@ | |||||||
|             // WeekName |             // WeekName | ||||||
|             //  |             //  | ||||||
|             this.WeekName.DataPropertyName = "WeekName"; |             this.WeekName.DataPropertyName = "WeekName"; | ||||||
|             dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; |             dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; | ||||||
|             this.WeekName.DefaultCellStyle = dataGridViewCellStyle3; |             this.WeekName.DefaultCellStyle = dataGridViewCellStyle13; | ||||||
|             this.WeekName.HeaderText = "*"; |             this.WeekName.HeaderText = "*"; | ||||||
|             this.WeekName.Name = "WeekName"; |             this.WeekName.Name = "WeekName"; | ||||||
|             this.WeekName.ReadOnly = true; |             this.WeekName.ReadOnly = true; | ||||||
| @@ -616,8 +620,8 @@ | |||||||
|             // statusDataGridViewTextBoxColumn |             // statusDataGridViewTextBoxColumn | ||||||
|             //  |             //  | ||||||
|             this.statusDataGridViewTextBoxColumn.DataPropertyName = "status"; |             this.statusDataGridViewTextBoxColumn.DataPropertyName = "status"; | ||||||
|             dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; |             dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; | ||||||
|             this.statusDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle4; |             this.statusDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle14; | ||||||
|             this.statusDataGridViewTextBoxColumn.HeaderText = "상태"; |             this.statusDataGridViewTextBoxColumn.HeaderText = "상태"; | ||||||
|             this.statusDataGridViewTextBoxColumn.Name = "statusDataGridViewTextBoxColumn"; |             this.statusDataGridViewTextBoxColumn.Name = "statusDataGridViewTextBoxColumn"; | ||||||
|             this.statusDataGridViewTextBoxColumn.ReadOnly = true; |             this.statusDataGridViewTextBoxColumn.ReadOnly = true; | ||||||
| @@ -634,11 +638,11 @@ | |||||||
|             // otDataGridViewTextBoxColumn |             // otDataGridViewTextBoxColumn | ||||||
|             //  |             //  | ||||||
|             this.otDataGridViewTextBoxColumn.DataPropertyName = "ot"; |             this.otDataGridViewTextBoxColumn.DataPropertyName = "ot"; | ||||||
|             dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopCenter; |             dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopCenter; | ||||||
|             dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192))))); |             dataGridViewCellStyle15.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192))))); | ||||||
|             dataGridViewCellStyle5.ForeColor = System.Drawing.Color.Red; |             dataGridViewCellStyle15.ForeColor = System.Drawing.Color.Red; | ||||||
|             dataGridViewCellStyle5.Format = "N1"; |             dataGridViewCellStyle15.Format = "N1"; | ||||||
|             this.otDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle5; |             this.otDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle15; | ||||||
|             this.otDataGridViewTextBoxColumn.HeaderText = "초과"; |             this.otDataGridViewTextBoxColumn.HeaderText = "초과"; | ||||||
|             this.otDataGridViewTextBoxColumn.Name = "otDataGridViewTextBoxColumn"; |             this.otDataGridViewTextBoxColumn.Name = "otDataGridViewTextBoxColumn"; | ||||||
|             this.otDataGridViewTextBoxColumn.ReadOnly = true; |             this.otDataGridViewTextBoxColumn.ReadOnly = true; | ||||||
| @@ -647,10 +651,10 @@ | |||||||
|             // ot2DataGridViewTextBoxColumn |             // ot2DataGridViewTextBoxColumn | ||||||
|             //  |             //  | ||||||
|             this.ot2DataGridViewTextBoxColumn.DataPropertyName = "ot2"; |             this.ot2DataGridViewTextBoxColumn.DataPropertyName = "ot2"; | ||||||
|             dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; |             dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; | ||||||
|             dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); |             dataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); | ||||||
|             dataGridViewCellStyle6.Format = "N1"; |             dataGridViewCellStyle16.Format = "N1"; | ||||||
|             this.ot2DataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle6; |             this.ot2DataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle16; | ||||||
|             this.ot2DataGridViewTextBoxColumn.HeaderText = "승인(대체)"; |             this.ot2DataGridViewTextBoxColumn.HeaderText = "승인(대체)"; | ||||||
|             this.ot2DataGridViewTextBoxColumn.Name = "ot2DataGridViewTextBoxColumn"; |             this.ot2DataGridViewTextBoxColumn.Name = "ot2DataGridViewTextBoxColumn"; | ||||||
|             this.ot2DataGridViewTextBoxColumn.Width = 88; |             this.ot2DataGridViewTextBoxColumn.Width = 88; | ||||||
| @@ -658,10 +662,10 @@ | |||||||
|             // otPMS |             // otPMS | ||||||
|             //  |             //  | ||||||
|             this.otPMS.DataPropertyName = "otPMS"; |             this.otPMS.DataPropertyName = "otPMS"; | ||||||
|             dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; |             dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; | ||||||
|             dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); |             dataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); | ||||||
|             dataGridViewCellStyle7.Format = "N1"; |             dataGridViewCellStyle17.Format = "N1"; | ||||||
|             this.otPMS.DefaultCellStyle = dataGridViewCellStyle7; |             this.otPMS.DefaultCellStyle = dataGridViewCellStyle17; | ||||||
|             this.otPMS.HeaderText = "승인(PMS)"; |             this.otPMS.HeaderText = "승인(PMS)"; | ||||||
|             this.otPMS.Name = "otPMS"; |             this.otPMS.Name = "otPMS"; | ||||||
|             this.otPMS.Width = 91; |             this.otPMS.Width = 91; | ||||||
| @@ -669,8 +673,8 @@ | |||||||
|             // otReasonDataGridViewTextBoxColumn |             // otReasonDataGridViewTextBoxColumn | ||||||
|             //  |             //  | ||||||
|             this.otReasonDataGridViewTextBoxColumn.DataPropertyName = "otReason"; |             this.otReasonDataGridViewTextBoxColumn.DataPropertyName = "otReason"; | ||||||
|             dataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); |             dataGridViewCellStyle18.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); | ||||||
|             this.otReasonDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle8; |             this.otReasonDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle18; | ||||||
|             this.otReasonDataGridViewTextBoxColumn.HeaderText = "사유"; |             this.otReasonDataGridViewTextBoxColumn.HeaderText = "사유"; | ||||||
|             this.otReasonDataGridViewTextBoxColumn.Name = "otReasonDataGridViewTextBoxColumn"; |             this.otReasonDataGridViewTextBoxColumn.Name = "otReasonDataGridViewTextBoxColumn"; | ||||||
|             this.otReasonDataGridViewTextBoxColumn.Width = 54; |             this.otReasonDataGridViewTextBoxColumn.Width = 54; | ||||||
| @@ -678,10 +682,10 @@ | |||||||
|             // otStartDataGridViewTextBoxColumn |             // otStartDataGridViewTextBoxColumn | ||||||
|             //  |             //  | ||||||
|             this.otStartDataGridViewTextBoxColumn.DataPropertyName = "otStart"; |             this.otStartDataGridViewTextBoxColumn.DataPropertyName = "otStart"; | ||||||
|             dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; |             dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; | ||||||
|             dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192))))); |             dataGridViewCellStyle19.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192))))); | ||||||
|             dataGridViewCellStyle9.Format = "HH:mm:ss"; |             dataGridViewCellStyle19.Format = "HH:mm:ss"; | ||||||
|             this.otStartDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle9; |             this.otStartDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle19; | ||||||
|             this.otStartDataGridViewTextBoxColumn.HeaderText = "시작"; |             this.otStartDataGridViewTextBoxColumn.HeaderText = "시작"; | ||||||
|             this.otStartDataGridViewTextBoxColumn.Name = "otStartDataGridViewTextBoxColumn"; |             this.otStartDataGridViewTextBoxColumn.Name = "otStartDataGridViewTextBoxColumn"; | ||||||
|             this.otStartDataGridViewTextBoxColumn.ReadOnly = true; |             this.otStartDataGridViewTextBoxColumn.ReadOnly = true; | ||||||
| @@ -690,10 +694,10 @@ | |||||||
|             // otEnd |             // otEnd | ||||||
|             //  |             //  | ||||||
|             this.otEnd.DataPropertyName = "otEnd"; |             this.otEnd.DataPropertyName = "otEnd"; | ||||||
|             dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; |             dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; | ||||||
|             dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192))))); |             dataGridViewCellStyle20.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192))))); | ||||||
|             dataGridViewCellStyle10.Format = "HH:mm:ss"; |             dataGridViewCellStyle20.Format = "HH:mm:ss"; | ||||||
|             this.otEnd.DefaultCellStyle = dataGridViewCellStyle10; |             this.otEnd.DefaultCellStyle = dataGridViewCellStyle20; | ||||||
|             this.otEnd.HeaderText = "종료"; |             this.otEnd.HeaderText = "종료"; | ||||||
|             this.otEnd.Name = "otEnd"; |             this.otEnd.Name = "otEnd"; | ||||||
|             this.otEnd.ReadOnly = true; |             this.otEnd.ReadOnly = true; | ||||||
| @@ -715,6 +719,20 @@ | |||||||
|             this.descriptionDataGridViewTextBoxColumn.ReadOnly = true; |             this.descriptionDataGridViewTextBoxColumn.ReadOnly = true; | ||||||
|             this.descriptionDataGridViewTextBoxColumn.Width = 51; |             this.descriptionDataGridViewTextBoxColumn.Width = 51; | ||||||
|             //  |             //  | ||||||
|  |             // contextMenuStrip1 | ||||||
|  |             //  | ||||||
|  |             this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { | ||||||
|  |             this.목록내보내기ToolStripMenuItem}); | ||||||
|  |             this.contextMenuStrip1.Name = "contextMenuStrip1"; | ||||||
|  |             this.contextMenuStrip1.Size = new System.Drawing.Size(153, 48); | ||||||
|  |             //  | ||||||
|  |             // 목록내보내기ToolStripMenuItem | ||||||
|  |             //  | ||||||
|  |             this.목록내보내기ToolStripMenuItem.Name = "목록내보내기ToolStripMenuItem"; | ||||||
|  |             this.목록내보내기ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); | ||||||
|  |             this.목록내보내기ToolStripMenuItem.Text = "목록 내보내기"; | ||||||
|  |             this.목록내보내기ToolStripMenuItem.Click += new System.EventHandler(this.목록내보내기ToolStripMenuItem_Click); | ||||||
|  |             //  | ||||||
|             // fOTConfirm |             // fOTConfirm | ||||||
|             //  |             //  | ||||||
|             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); |             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); | ||||||
| @@ -739,6 +757,7 @@ | |||||||
|             ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); |             ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); | ||||||
|             this.splitContainer1.ResumeLayout(false); |             this.splitContainer1.ResumeLayout(false); | ||||||
|             ((System.ComponentModel.ISupportInitialize)(this.dv1)).EndInit(); |             ((System.ComponentModel.ISupportInitialize)(this.dv1)).EndInit(); | ||||||
|  |             this.contextMenuStrip1.ResumeLayout(false); | ||||||
|             this.ResumeLayout(false); |             this.ResumeLayout(false); | ||||||
|             this.PerformLayout(); |             this.PerformLayout(); | ||||||
|  |  | ||||||
| @@ -806,5 +825,7 @@ | |||||||
|         private System.Windows.Forms.DataGridViewTextBoxColumn otEnd; |         private System.Windows.Forms.DataGridViewTextBoxColumn otEnd; | ||||||
|         private System.Windows.Forms.DataGridViewTextBoxColumn projectNameDataGridViewTextBoxColumn; |         private System.Windows.Forms.DataGridViewTextBoxColumn projectNameDataGridViewTextBoxColumn; | ||||||
|         private System.Windows.Forms.DataGridViewTextBoxColumn descriptionDataGridViewTextBoxColumn; |         private System.Windows.Forms.DataGridViewTextBoxColumn descriptionDataGridViewTextBoxColumn; | ||||||
|  |         private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; | ||||||
|  |         private System.Windows.Forms.ToolStripMenuItem 목록내보내기ToolStripMenuItem; | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @@ -514,5 +514,23 @@ namespace FPJ0000 | |||||||
|         { |         { | ||||||
|  |  | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         private void 목록내보내기ToolStripMenuItem_Click(object sender, EventArgs e) | ||||||
|  |         { | ||||||
|  |             using (var sd = new SaveFileDialog()) | ||||||
|  |             { | ||||||
|  |                 sd.Filter = "콤마로 분리된 파일|*.csv"; | ||||||
|  |                 sd.FilterIndex = 0; | ||||||
|  |                 if (sd.ShowDialog() != DialogResult.OK) return; | ||||||
|  |                 var fn = dv1.ExportData(sd.FileName); | ||||||
|  |  | ||||||
|  |                 var dlg = AR.UTIL.MsgQ("생성된 파일을 확인할까요?"); | ||||||
|  |                 if (dlg != DialogResult.Yes) return; | ||||||
|  |  | ||||||
|  |                 AR.UTIL.RunExplorer(fn); | ||||||
|  |  | ||||||
|  |             } | ||||||
|  |              | ||||||
|  |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
| @@ -227,6 +227,9 @@ | |||||||
|         TgDQASA1MVpwzwAAAABJRU5ErkJggg== |         TgDQASA1MVpwzwAAAABJRU5ErkJggg== | ||||||
| </value> | </value> | ||||||
|   </data> |   </data> | ||||||
|  |   <metadata name="dsMSSQL.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | ||||||
|  |     <value>83, 17</value> | ||||||
|  |   </metadata> | ||||||
|   <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |   <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | ||||||
|     <value>325, 17</value> |     <value>325, 17</value> | ||||||
|   </metadata> |   </metadata> | ||||||
| @@ -316,6 +319,9 @@ | |||||||
|   <metadata name="otEnd.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |   <metadata name="otEnd.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | ||||||
|     <value>True</value> |     <value>True</value> | ||||||
|   </metadata> |   </metadata> | ||||||
|  |   <metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | ||||||
|  |     <value>493, 17</value> | ||||||
|  |   </metadata> | ||||||
|   <metadata name="tam.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |   <metadata name="tam.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | ||||||
|     <value>252, 17</value> |     <value>252, 17</value> | ||||||
|   </metadata> |   </metadata> | ||||||
|   | |||||||
| @@ -127,6 +127,10 @@ | |||||||
|     </Compile> |     </Compile> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="..\..\Sub\arCtl\arControl.csproj"> | ||||||
|  |       <Project>{f31c242c-1b15-4518-9733-48558499fe4b}</Project> | ||||||
|  |       <Name>arControl</Name> | ||||||
|  |     </ProjectReference> | ||||||
|     <ProjectReference Include="..\FCM0000\FCM0000.csproj"> |     <ProjectReference Include="..\FCM0000\FCM0000.csproj"> | ||||||
|       <Project>{26982882-c1ff-45f8-861c-d67558725ff1}</Project> |       <Project>{26982882-c1ff-45f8-861c-d67558725ff1}</Project> | ||||||
|       <Name>FCM0000</Name> |       <Name>FCM0000</Name> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 backuppc
					backuppc