📄 form5.vb
字号:
Public Class Form5
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Trim(txtshangpinno.Text) = "" Then
MsgBox("商品编号不能为空!", MsgBoxStyle.Exclamation, "信息框")
Exit Sub
End If
If Not IsDate(txttuihuodate.Text) Then
MsgBox("退货日期请输入正确的日期格式!", MsgBoxStyle.Exclamation, "信息框")
Exit Sub
End If
Dim TempDBtuihuo As DBtuihuo
TempDBtuihuo = New DBtuihuo(txtchukuno.Text, txtshangpinno.Text, Val(txtjinhuoprice.Text), txtreason.Text, Val(txtcount.Text), txtgongyingno.Text, txttuihuono.Text, txttuihuodate.Text, txtuserno.Text)
If TempDBtuihuo.Addtuihuo() = True Then
init()
txtshangpinno.Focus()
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Close()
End Sub
Private Sub Form5_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub init()
txtchukuno.Text = ""
txttuihuono.Text = ""
txtshangpinno.Text = ""
txtreason.Text = ""
txtgongyingno.Text = ""
txtjinhuoprice.Text = ""
txtcount.Text = ""
txttuihuodate.Text = ""
txtuserno.Text = ""
End Sub
Private Sub txtchukuno_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtchukuno.KeyPress
If e.KeyChar = Chr(13) Then
txttuihuono.Focus()
End If
End Sub
Private Sub txttuihuono_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txttuihuono.KeyPress
If e.KeyChar = Chr(13) Then
txtshangpinno.Focus()
End If
End Sub
Private Sub txtshangpinno_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtshangpinno.KeyPress
If e.KeyChar = Chr(13) Then
txtreason.Focus()
End If
End Sub
Private Sub txtreason_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtreason.KeyPress
If e.KeyChar = Chr(13) Then
txtgongyingno.Focus()
End If
End Sub
Private Sub txtgongyingno_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtgongyingno.KeyPress
If e.KeyChar = Chr(13) Then
txtcount.Focus()
End If
End Sub
Private Sub txtcount_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtcount.KeyPress
If e.KeyChar = Chr(13) Then
txtjinhuoprice.Focus()
End If
End Sub
Private Sub txtjinhuoprice_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtjinhuoprice.KeyPress
If e.KeyChar = Chr(13) Then
txttuihuodate.Focus()
End If
End Sub
Private Sub txttuihuodate_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txttuihuodate.KeyPress
If e.KeyChar = Chr(13) Then
txtuserno.Focus()
End If
End Sub
Private Sub txtuserno_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtuserno.KeyPress
If e.KeyChar = Chr(13) Then
Button1.Focus()
End If
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -