Revert "fix: Manufacture_Date 별도 처리"
This reverts commit b29280404d0eb90b911d267603b79f66f9fdf2cb.
This commit is contained in:
parent
b29280404d
commit
9dd06ab51b
46
frm_Freq_Reg.Designer.vb
generated
46
frm_Freq_Reg.Designer.vb
generated
@ -194,8 +194,6 @@ Partial Class frm_Freq_Reg
|
||||
Me.btn_5_reset = New System.Windows.Forms.Button()
|
||||
Me.PictureBox2 = New System.Windows.Forms.PictureBox()
|
||||
Me.gb_reg_data = New System.Windows.Forms.GroupBox()
|
||||
Me.txb_5_date = New System.Windows.Forms.TextBox()
|
||||
Me.lb_5_date = New System.Windows.Forms.Label()
|
||||
Me.txb_5_td = New System.Windows.Forms.TextBox()
|
||||
Me.lb_5_td = New System.Windows.Forms.Label()
|
||||
Me.txb_5_prod_motor = New System.Windows.Forms.TextBox()
|
||||
@ -393,6 +391,8 @@ Partial Class frm_Freq_Reg
|
||||
Me.TextBox2 = New System.Windows.Forms.TextBox()
|
||||
Me.TextBox3 = New System.Windows.Forms.TextBox()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.txb_5_date = New System.Windows.Forms.TextBox()
|
||||
Me.lb_5_date = New System.Windows.Forms.Label()
|
||||
Me.gpbTime.SuspendLayout()
|
||||
Me.gbselect.SuspendLayout()
|
||||
Me.gpbConfig.SuspendLayout()
|
||||
@ -2453,27 +2453,6 @@ Partial Class frm_Freq_Reg
|
||||
Me.gb_reg_data.TabStop = False
|
||||
Me.gb_reg_data.Text = "제품등록 데이터"
|
||||
'
|
||||
'txb_5_date
|
||||
'
|
||||
Me.txb_5_date.BackColor = System.Drawing.SystemColors.Window
|
||||
Me.txb_5_date.Location = New System.Drawing.Point(194, 313)
|
||||
Me.txb_5_date.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
|
||||
Me.txb_5_date.Name = "txb_5_date"
|
||||
Me.txb_5_date.ReadOnly = True
|
||||
Me.txb_5_date.Size = New System.Drawing.Size(419, 46)
|
||||
Me.txb_5_date.TabIndex = 27
|
||||
Me.txb_5_date.Text = "-"
|
||||
Me.txb_5_date.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||
'
|
||||
'lb_5_date
|
||||
'
|
||||
Me.lb_5_date.AutoSize = True
|
||||
Me.lb_5_date.Location = New System.Drawing.Point(25, 318)
|
||||
Me.lb_5_date.Name = "lb_5_date"
|
||||
Me.lb_5_date.Size = New System.Drawing.Size(191, 39)
|
||||
Me.lb_5_date.TabIndex = 26
|
||||
Me.lb_5_date.Text = "실제제조일자"
|
||||
'
|
||||
'txb_5_td
|
||||
'
|
||||
Me.txb_5_td.BackColor = System.Drawing.SystemColors.Window
|
||||
@ -4872,6 +4851,27 @@ Partial Class frm_Freq_Reg
|
||||
Me.Label3.TabIndex = 97
|
||||
Me.Label3.Text = "생산일자"
|
||||
'
|
||||
'txb_5_date
|
||||
'
|
||||
Me.txb_5_date.BackColor = System.Drawing.SystemColors.Window
|
||||
Me.txb_5_date.Location = New System.Drawing.Point(194, 313)
|
||||
Me.txb_5_date.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
|
||||
Me.txb_5_date.Name = "txb_5_date"
|
||||
Me.txb_5_date.ReadOnly = True
|
||||
Me.txb_5_date.Size = New System.Drawing.Size(419, 46)
|
||||
Me.txb_5_date.TabIndex = 27
|
||||
Me.txb_5_date.Text = "-"
|
||||
Me.txb_5_date.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
|
||||
'
|
||||
'lb_5_date
|
||||
'
|
||||
Me.lb_5_date.AutoSize = True
|
||||
Me.lb_5_date.Location = New System.Drawing.Point(25, 318)
|
||||
Me.lb_5_date.Name = "lb_5_date"
|
||||
Me.lb_5_date.Size = New System.Drawing.Size(191, 39)
|
||||
Me.lb_5_date.TabIndex = 26
|
||||
Me.lb_5_date.Text = "실제제조일자"
|
||||
'
|
||||
'frm_Freq_Reg
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 15.0!)
|
||||
|
@ -56,8 +56,8 @@ Public Class frm_Freq_Reg
|
||||
p1_date
|
||||
p1_time
|
||||
P3_DateTime
|
||||
|
||||
Manufacture_Date
|
||||
|
||||
max_check
|
||||
|
||||
End Enum
|
||||
@ -4083,7 +4083,7 @@ FAILDATA:
|
||||
txb_5_type.Text = "-"
|
||||
txb_5_agency.Text = "-"
|
||||
txb_5_area.Text = "-"
|
||||
txb_5_date.Text = ""
|
||||
txb_5_date.Text = "-"
|
||||
txb_5_prod_date.Text = "-"
|
||||
txb_5_freq.Text = "-"
|
||||
txb_5_prod_mod.Text = "0"
|
||||
@ -4261,7 +4261,6 @@ SuccessExit:
|
||||
Dim prd_code As String
|
||||
Dim step_num As Int16
|
||||
Dim TDUseCompare As Boolean = False
|
||||
Dim queryFieldCount As Integer = 0
|
||||
|
||||
prd_code = txb_5_barcode.Text
|
||||
|
||||
@ -4274,6 +4273,8 @@ SuccessExit:
|
||||
|
||||
txb_5_barcode.BackColor = Color.White
|
||||
|
||||
|
||||
|
||||
If Mid(prd_code, 1, 1) = "5" Then
|
||||
TDUseCompare = False
|
||||
DBCmd = "SELECT count(Product_SN) FROM " & MainNonTDDB & " WHERE Product_SN = '" & prd_code & "'"
|
||||
@ -4291,27 +4292,11 @@ SuccessExit:
|
||||
End If
|
||||
|
||||
If TDUseCompare = True Then
|
||||
DBCmd = "SELECT TestStep,Ct_Manufacture_Name,Ct_SN,Ct_Model,Ct_Type,Ct_Abroad,Ct_Agency,Ct_Frequency,Ct_Power,Ct_Max_ShotCnt,Ct_Motor_Lv, PV_SN,P1_Date,P1_Time,P3_DateTime FROM " & cartridge_table & " WHERE Product_SN = '" & prd_code & "'"
|
||||
|
||||
queryFieldCount = DBQueryReader(DBCmd)
|
||||
|
||||
If queryFieldCount > 0 Then
|
||||
For i = 0 To Math.Min(check_list.max_check - 1, queryFieldCount - 1)
|
||||
DBCmd = "SELECT TestStep,Ct_Manufacture_Name,Ct_SN,Ct_Model,Ct_Type,Ct_Abroad,Ct_Agency,Ct_Frequency,Ct_Power,Ct_Max_ShotCnt,Ct_Motor_Lv, PV_SN,P1_Date,P1_Time,P3_DateTime,Manufacture_Date FROM " & cartridge_table & " WHERE Product_SN = '" & prd_code & "'"
|
||||
If DBQueryReader(DBCmd) Then
|
||||
For i = 0 To check_list.max_check - 1
|
||||
check_data(i) = sqlDataQuery(i).ToString
|
||||
Next
|
||||
|
||||
Try
|
||||
DBCmd = "SELECT Manufacture_Date FROM " & cartridge_table & " WHERE Product_SN = '" & prd_code & "'"
|
||||
Dim manufactureQueryCount As Integer = DBQueryReader(DBCmd)
|
||||
If manufactureQueryCount > 0 Then
|
||||
check_data(check_list.Manufacture_Date) = sqlDataQuery(0).ToString
|
||||
Else
|
||||
check_data(check_list.Manufacture_Date) = ""
|
||||
End If
|
||||
Catch ex As Exception
|
||||
' Manufacture_Date 컬럼이 없는 경우
|
||||
check_data(check_list.Manufacture_Date) = ""
|
||||
End Try
|
||||
Else
|
||||
MsgBox("해당 데이터가 데이터베이스에 존재하지 않습니다.", vbCritical)
|
||||
Exit Sub
|
||||
@ -4320,21 +4305,18 @@ SuccessExit:
|
||||
If check_data(check_list.P3_DateTime) = Nothing Or check_data(check_list.P3_DateTime) = "0" Then
|
||||
txb_5_reg_date.Text = "-"
|
||||
txb_5_reg_date.BackColor = Color.Red
|
||||
'error_switch = True
|
||||
Else
|
||||
txb_5_reg_date.Text = check_data(check_list.P3_DateTime)
|
||||
txb_5_reg_date.BackColor = Color.Green
|
||||
End If
|
||||
|
||||
If check_data(check_list.Manufacture_Date) = Nothing Or check_data(check_list.Manufacture_Date) = "0" Or check_data(check_list.Manufacture_Date) = "" Then
|
||||
If check_data(check_list.Manufacture_Date) = Nothing Or check_data(check_list.Manufacture_Date) = "0" Then
|
||||
txb_5_date.Text = "-"
|
||||
txb_5_date.BackColor = Color.Red
|
||||
'error_switch = True
|
||||
Else
|
||||
Dim manufactureDate As String = check_data(check_list.Manufacture_Date)
|
||||
If InStr(manufactureDate, " ") > 0 Then
|
||||
manufactureDate = Mid(manufactureDate, 1, InStr(manufactureDate, " ") - 1)
|
||||
End If
|
||||
txb_5_date.Text = manufactureDate
|
||||
txb_5_date.BackColor = Color.Green
|
||||
txb_5_date.Text = check_data(check_list.Manufacture_Date)
|
||||
End If
|
||||
|
||||
If check_data(check_list.make_name) = Nothing Or check_data(check_list.make_name) = "0" Then
|
||||
@ -4453,44 +4435,16 @@ SuccessExit:
|
||||
txb_5_barcode.BackColor = Color.Green
|
||||
End If
|
||||
Else
|
||||
' NonTD 테이블 처리
|
||||
DBCmd = "SELECT TestStep,Ct_Manufacture_Name,Ct_SN,Ct_Model,Ct_Type,Ct_Abroad,Ct_Agency,PV_SN FROM " & MainNonTDDB & " WHERE Product_SN = '" & prd_code & "'"
|
||||
|
||||
queryFieldCount = DBQueryReader(DBCmd)
|
||||
|
||||
If queryFieldCount > 0 Then
|
||||
For i = 0 To Math.Min(check_list.power - 1, queryFieldCount - 1)
|
||||
DBCmd = "SELECT TestStep,Ct_Manufacture_Name,Ct_SN,Ct_Model,Ct_Type,Ct_Abroad,Ct_Agency,PV_SN, Manufacture_Date FROM " & MainNonTDDB & " WHERE Product_SN = '" & prd_code & "'"
|
||||
If DBQueryReader(DBCmd) Then
|
||||
For i = 0 To check_list.power - 1
|
||||
check_data(i) = sqlDataQuery(i).ToString
|
||||
Next
|
||||
|
||||
Try
|
||||
DBCmd = "SELECT Manufacture_Date FROM " & MainNonTDDB & " WHERE Product_SN = '" & prd_code & "'"
|
||||
Dim manufactureQueryCount As Integer = DBQueryReader(DBCmd)
|
||||
If manufactureQueryCount > 0 Then
|
||||
check_data(check_list.Manufacture_Date) = sqlDataQuery(0).ToString
|
||||
Else
|
||||
check_data(check_list.Manufacture_Date) = ""
|
||||
End If
|
||||
Catch ex As Exception
|
||||
check_data(check_list.Manufacture_Date) = ""
|
||||
End Try
|
||||
Else
|
||||
MsgBox("해당 데이터가 데이터베이스에 존재하지 않습니다.", vbCritical)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If check_data(check_list.Manufacture_Date) = Nothing Or check_data(check_list.Manufacture_Date) = "0" Or check_data(check_list.Manufacture_Date) = "" Then
|
||||
txb_5_date.Text = "-"
|
||||
txb_5_date.BackColor = Color.Red
|
||||
Else
|
||||
Dim manufactureDate As String = check_data(check_list.Manufacture_Date)
|
||||
If InStr(manufactureDate, " ") > 0 Then
|
||||
manufactureDate = Mid(manufactureDate, 1, InStr(manufactureDate, " ") - 1)
|
||||
End If
|
||||
txb_5_date.Text = manufactureDate
|
||||
txb_5_date.BackColor = Color.Green
|
||||
End If
|
||||
|
||||
If check_data(check_list.make_name) = Nothing Or check_data(check_list.make_name) = "0" Then
|
||||
txb_5_make.Text = "-"
|
||||
txb_5_make.BackColor = Color.Red
|
||||
@ -4509,6 +4463,14 @@ SuccessExit:
|
||||
txb_5_model.BackColor = Color.Green
|
||||
End If
|
||||
|
||||
If check_data(check_list.Manufacture_Date) = Nothing Or check_data(check_list.Manufacture_Date) = "0" Then
|
||||
txb_5_date.Text = "-"
|
||||
txb_5_date.BackColor = Color.Red
|
||||
'error_switch = True
|
||||
Else
|
||||
txb_5_date.Text = check_data(check_list.Manufacture_Date)
|
||||
End If
|
||||
|
||||
If check_data(check_list.serial) = Nothing Or check_data(check_list.serial) = "0" Then
|
||||
txb_5_serial.Text = "-"
|
||||
txb_5_serial.BackColor = Color.Red
|
||||
@ -4565,7 +4527,7 @@ SuccessExit:
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub txb_5_reg_date_GotFocus(sender As Object, e As EventArgs) Handles txb_5_reg_date.GotFocus, txb_5_make.GotFocus, txb_5_model.GotFocus, txb_5_serial.GotFocus, txb_5_type.GotFocus, txb_5_agency.GotFocus, txb_5_area.GotFocus, txb_5_prod_date.GotFocus, txb_5_freq.GotFocus, txb_5_power.GotFocus, txb_5_prod_motor.GotFocus, txb_5_td.GotFocus, txb_5_date.GotFocus
|
||||
Private Sub txb_5_reg_date_GotFocus(sender As Object, e As EventArgs) Handles txb_5_reg_date.GotFocus, txb_5_make.GotFocus, txb_5_model.GotFocus, txb_5_serial.GotFocus, txb_5_type.GotFocus, txb_5_agency.GotFocus, txb_5_area.GotFocus, txb_5_prod_date.GotFocus, txb_5_freq.GotFocus, txb_5_power.GotFocus, txb_5_prod_motor.GotFocus, txb_5_td.GotFocus
|
||||
txb_5_barcode.Focus()
|
||||
End Sub
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user