diff --git a/Product_Manager/MainForm.vb b/Product_Manager/MainForm.vb index e48376c..52646af 100644 --- a/Product_Manager/MainForm.vb +++ b/Product_Manager/MainForm.vb @@ -654,12 +654,23 @@ End_Finish: End If txbIfNumber.Text = ModelCode & Mid(SerialValue, 1, 4) & Mid(SerialValue, 8, 3) & Mid(SerialValue, 5, 3) - Dim cartridgeSerial = Mid(SerialValue, 5, 3) & Mid(SerialValue, 8, 3) - '여기에 Update TD 번호 조건 걸어서 넣기' - ' 변수 정리하고 어떤 칼럼인지 정리 - Dim DBCmd = "UPDATE " & UseCartridgeTbl & "SET Product_SN = '" & txbIfNumber.Text & "', Ct_Manufacture_Name = '" & txbIfCode.Text & "', Ct_Manufacture_Year = '" & nudIfYear.Value & "', Ct_Manufacture_Month = '" & nudIfMonth.Value & "', Ct_SN = '" & cartridgeSerial & "', Ct_Model = 'MAXIMUM', Ct_Type = 'SET', Ct_Remain_ShotCnt = 0 WHERE PV_SN = '" & TDNameStr & "'" + If ckbDBUse.Checked = True Then + Dim cartridgeSerial = Mid(SerialValue, 5, 3) & Mid(SerialValue, 8, 3) + Dim DBCmd = "UPDATE " & UseCartridgeTbl & " SET " & + "Product_SN = '" & txbIfNumber.Text & "', " & + "Ct_Manufacture_Name = '" & txbIfCode.Text & "', " & + "Ct_Manufacture_Year = '" & nudIfYear.Value & "', " & + "Ct_Manufacture_Month = '" & nudIfMonth.Value & "', " & + "Ct_SN = '" & cartridgeSerial & "', " & + "Ct_Model = 'MAXIMUM', " & + "Ct_Type = 'SET', " & + "Ct_Remain_ShotCnt = 0 " & + "WHERE PV_SN = '" & TDNameStr & "'" + + DBCommand(DBCmd) + End If txbInfoBox.Text = "SUCCESS" txbInfoBox.BackColor = Color.Green @@ -732,6 +743,23 @@ End_Finish: txbIfNumber.Text = ModelCode & Mid(SerialValue, 1, 4) & Mid(SerialValue, 8, 3) & Mid(SerialValue, 5, 3) + If ckbDBUse.Checked = True Then + Dim cartridgeSerial = Mid(SerialValue, 5, 3) & Mid(SerialValue, 8, 3) + + + Dim DBCmd = "UPDATE " & NonCartridgeTbl & " SET " & + "Product_SN = '" & txbIfNumber.Text & "', " & + "Ct_Manufacture_Name = '" & txbIfCode.Text & "', " & + "Ct_Manufacture_Year = '" & nudIfYear.Value & "', " & + "Ct_Manufacture_Month = '" & nudIfMonth.Value & "', " & + "Ct_SN = '" & cartridgeSerial & "', " & + "Ct_Model = 'ALTO', " & + "Ct_Type = 'SET' " & + "WHERE PV_SN = '" & TDNameStr & "'" + + DBCommand(DBCmd) + End If + txbInfoBox.Text = "SUCCESS" txbInfoBox.BackColor = Color.Green GoTo End_Finish @@ -803,6 +831,23 @@ End_Finish: txbIfNumber.Text = ModelCode & Mid(SerialValue, 1, 4) & Mid(SerialValue, 8, 3) & Mid(SerialValue, 5, 3) + If ckbDBUse.Checked = True Then + Dim cartridgeSerial = Mid(SerialValue, 5, 3) & Mid(SerialValue, 8, 3) + + Dim DBCmd = "UPDATE " & UseCartridgeTbl & " SET " & + "Product_SN = '" & txbIfNumber.Text & "', " & + "Ct_Manufacture_Name = '" & txbIfCode.Text & "', " & + "Ct_Manufacture_Year = '" & nudIfYear.Value & "', " & + "Ct_Manufacture_Month = '" & nudIfMonth.Value & "', " & + "Ct_SN = '" & cartridgeSerial & "', " & + "Ct_Model = 'EFFECT', " & + "Ct_Type = 'SET', " & + "Ct_Remain_ShotCnt = 0 " & + "WHERE PV_SN = '" & TDNameStr & "'" + + DBCommand(DBCmd) + End If + txbInfoBox.Text = "SUCCESS" txbInfoBox.BackColor = Color.Green GoTo End_Finish