⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 quitform.vb

📁 千寻销售系统 文件说明:一个采用三层结构的分部式应用程序
💻 VB
📖 第 1 页 / 共 2 页
字号:

                    End Select
                End If
            End If
        End If
    End Sub

    Private Sub Refurbish()
        '注册远程代理
        QuitClass = New ClassLibrary.QuitClass
        Ds = QuitClass.Refurbish
        '将数据绑到记录集
        QuitFormDataGridView.DataSource = Ds.Tables(0)
    End Sub

#End Region

#Region " 文本框事件代码 "

    Private Sub QuitFormNumberTextBox_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles QuitFormNumberTextBox.GotFocus
        '
        TB = QuitFormNumberTextBox

        QuitFormHelpListBox.Visible = True
        QuitFormHelpListBox.Top = QuitFormNumberTextBox.Top
        '调用函数
        If QuitFormNumberTextBox.Focus = True Then
            ListDatarows(Trim(QuitFormNumberTextBox.Text))
        End If

    End Sub

    Private Sub QuitFormNumberTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitFormNumberTextBox.TextChanged
        '调用函数
        If QuitFormNumberTextBox.Focus = True Then
            ListDatarows(Trim(QuitFormNumberTextBox.Text))
        End If
    End Sub

    Private Sub QuitFormNameTextBox_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles QuitFormNameTextBox.GotFocus
        '
        TB = QuitFormNameTextBox

        QuitFormHelpListBox.Visible = True
        QuitFormHelpListBox.Top = QuitFormNameTextBox.Top
        '调用函数
        If QuitFormNameTextBox.Focus = True Then
            ListDatarows(Trim(QuitFormNameTextBox.Text))
        End If

    End Sub

    Private Sub QuitFormNameTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitFormNameTextBox.TextChanged
        '调用函数
        If QuitFormNameTextBox.Focus = True Then
            ListDatarows(Trim(QuitFormNameTextBox.Text))
        End If
    End Sub

    Private Sub QuitFormGroupNumberTextBox_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles QuitFormGroupNumberTextBox.GotFocus
        QuitFormHelpListBox.Visible = False

    End Sub

    Private Sub QuitFormGroupNumberTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitFormGroupNumberTextBox.TextChanged

    End Sub

    Private Sub QuitFormGroupTextBox_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles QuitFormGroupTextBox.GotFocus
        QuitFormHelpListBox.Visible = False

    End Sub

    Private Sub QuitFormGroupTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitFormGroupTextBox.TextChanged

    End Sub

    Private Sub QuitFormNnitTextBox_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles QuitFormNnitTextBox.GotFocus
        QuitFormHelpListBox.Visible = False

    End Sub

    Private Sub QuitFormNnitTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitFormNnitTextBox.TextChanged

    End Sub

    Private Sub QuitFormDanweiTextBox_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles QuitFormDanweiTextBox.GotFocus
        QuitFormHelpListBox.Visible = False

    End Sub

    Private Sub QuitFormDanweiTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitFormDanweiTextBox.TextChanged

    End Sub

    Private Sub QuitFormCountTextBox_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles QuitFormCountTextBox.GotFocus
        QuitFormHelpListBox.Visible = False

    End Sub


    Private Sub QuitFormCountTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitFormCountTextBox.TextChanged

    End Sub

    Private Sub QuitFormSCountTextBox_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles QuitFormSCountTextBox.GotFocus
        QuitFormHelpListBox.Visible = False

    End Sub

    Private Sub QuitFormSCountTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitFormSCountTextBox.TextChanged

    End Sub

#End Region

    Private Sub QuitForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        '刷新数据
        Refurbish()

        QuitFormNumberTextBox.Focus()

    End Sub

    Private Sub QuitFormExitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitFormExitButton.Click
        Close()
    End Sub

    Private Sub QuitFormCancelButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitFormCancelButton.Click
        QuitFormNumberTextBox.Text = ""
        QuitFormNameTextBox.Text = ""
        QuitFormGroupNumberTextBox.Text = ""
        QuitFormGroupTextBox.Text = ""
        QuitFormDanweiTextBox.Text = ""
        QuitFormNnitTextBox.Text = ""
        QuitFormCountTextBox.Text = "1"
        QuitFormSCountTextBox.Text = ""
        QuitFormExplainTextBox.Text = ""
        QuitFormNumberTextBox.Focus()
        QuitFormHelpListBox.Items.Clear()
    End Sub

    Private Sub QuitFormQuitButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitFormQuitButton.Click
        If QuitFormNumberTextBox.Text = "" Then
            MsgBox("请输入货物编号")
        ElseIf QuitFormNameTextBox.Text = "" Then
            MsgBox("请输入货物名称")
        ElseIf QuitFormCountTextBox.Text = "" Then
            MsgBox("请输入货物数量")
        Else
            Dim Err As String = Nothing
            Dim Y As Boolean = QuitClass.Quit(Trim(QuitFormNumberTextBox.Text), Trim(QuitFormNameTextBox.Text), Val(Trim(QuitFormCountTextBox.Text)), MainForm.UserName, Err)
            If Y = True Then
                '清空
                QuitFormCancelButton_Click(sender, e)
                '刷新数据
                Refurbish()
            Else
                MsgBox(Err, , "千寻工作室")
            End If
        End If

    End Sub

    Private Sub QuitFormDataGridView_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles QuitFormDataGridView.CellContentClick

    End Sub

    Private Sub QuitFormDataGridView_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles QuitFormDataGridView.Click
        'If QuitFormDataGridView.SelectedCells(0).RowIndex < QuitFormDataGridView.Rows.Count - 1 And QuitFormDataGridView.SelectedCells(0).RowIndex >= 0 Then
        If QuitFormDataGridView.SelectedCells(0).RowIndex >= 0 Then
            QuitFormGroupNumberTextBox.Text = QuitFormDataGridView.Item(3, QuitFormDataGridView.SelectedCells(0).RowIndex).Value
            QuitFormGroupTextBox.Text = QuitFormDataGridView.Item(4, QuitFormDataGridView.SelectedCells(0).RowIndex).Value
            QuitFormDanweiTextBox.Text = QuitFormDataGridView.Item(5, QuitFormDataGridView.SelectedCells(0).RowIndex).Value
            QuitFormNnitTextBox.Text = QuitFormDataGridView.Item(6, QuitFormDataGridView.SelectedCells(0).RowIndex).Value
            QuitFormSCountTextBox.Text = QuitFormDataGridView.Item(7, QuitFormDataGridView.SelectedCells(0).RowIndex).Value
            QuitFormNumberTextBox.Text = QuitFormDataGridView.Item(1, QuitFormDataGridView.SelectedCells(0).RowIndex).Value
        End If

    End Sub

    Private Sub QuitFormHelpListBox_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles QuitFormHelpListBox.DoubleClick
        If QuitFormHelpListBox.SelectedIndex <> -1 Then
            TB.Text = Trim(QuitFormHelpListBox.Text)
        End If
    End Sub

    Private Sub QuitFormHelpListBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitFormHelpListBox.SelectedIndexChanged

    End Sub

    Private Sub QuitFormRefurbishButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QuitFormRefurbishButton.Click
        Refurbish()
    End Sub
End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -