From dd427a8d4ed07d2de124536d50cc29043608f0c5 Mon Sep 17 00:00:00 2001 From: jiwonRepair Date: Thu, 31 Jul 2025 17:04:37 +0900 Subject: [PATCH] feat: Block serial number registration for non-info1/info2 accounts --- MAXIMUM_Product_Program/MainForm.vb | 22 +++++++++++++++++++++- 업데이트 내역.txt | 4 +--- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/MAXIMUM_Product_Program/MainForm.vb b/MAXIMUM_Product_Program/MainForm.vb index 0717170..94942da 100644 --- a/MAXIMUM_Product_Program/MainForm.vb +++ b/MAXIMUM_Product_Program/MainForm.vb @@ -1,8 +1,9 @@ Imports System.IO Imports System.IO.Ports +Imports System.Math Imports System.Text Imports System.Threading -Imports System.Math +Imports Microsoft.VisualBasic.ApplicationServices Public Class MainForm Private Const TDMaxLength As Int16 = 10 @@ -949,6 +950,25 @@ FailFunc: Private Sub ProdInputFunc(sender As Object, e As EventArgs, SearchData As String) + Dim userID As String = "" + + ' info1 또는 info2 중 NowState가 1인 사용자 조회 + DBCmd = "SELECT UserID FROM " & LoginDB & " WHERE NowState = '1' AND (UserID = 'info1' OR UserID = 'info2')" + + If DBQueryReader(DBCmd) Then + userID = sqlDataQuery(0) + Else + MsgBox("사용자 정보 읽기 실패", vbExclamation) + GoTo FailFunc + End If + + If userID = "info1" Or userID = "info2" Then + ' PASS + Else + MsgBox("info1 또는 info2 계정을 사용하세요", vbExclamation) + GoTo FailFunc + End If + StepReset() ValueReset() diff --git a/업데이트 내역.txt b/업데이트 내역.txt index 6148598..350cb3e 100644 --- a/업데이트 내역.txt +++ b/업데이트 내역.txt @@ -1,3 +1 @@ -1. program ver 1.1.9 -2. 샷 수 검색 조건 변경 - - If ShotSearch() = "0" Then \ No newline at end of file +1. info1, info2 계정 외에는 시리얼번호를 등록 하지 못하도록 수정