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

📄 sellform.vb

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

                    End Select
                End If
            End If
        End If
    End Sub

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

#End Region

#Region " 文本框事件代码 "

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

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

    End Sub

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

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

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

    End Sub

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

    Private Sub SellFormGroupNumberTextBox_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles SellFormGroupNumberTextBox.GotFocus
        SellFormHelpListBox.Visible = False

    End Sub

    Private Sub SellFormGroupNumberTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SellFormGroupNumberTextBox.TextChanged

    End Sub

    Private Sub SellFormGroupTextBox_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles SellFormGroupTextBox.GotFocus
        SellFormHelpListBox.Visible = False

    End Sub

    Private Sub SellFormGroupTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SellFormGroupTextBox.TextChanged

    End Sub

    Private Sub SellFormNnitTextBox_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles SellFormNnitTextBox.GotFocus
        SellFormHelpListBox.Visible = False

    End Sub

    Private Sub SellFormNnitTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SellFormNnitTextBox.TextChanged

    End Sub

    Private Sub SellFormDanweiTextBox_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles SellFormDanweiTextBox.GotFocus
        SellFormHelpListBox.Visible = False

    End Sub

    Private Sub SellFormDanweiTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SellFormDanweiTextBox.TextChanged

    End Sub

    Private Sub SellFormCountTextBox_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles SellFormCountTextBox.GotFocus
        SellFormHelpListBox.Visible = False

    End Sub


    Private Sub SellFormCountTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SellFormCountTextBox.TextChanged

    End Sub

    Private Sub SellFormSCountTextBox_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles SellFormSCountTextBox.GotFocus
        SellFormHelpListBox.Visible = False

    End Sub

    Private Sub SellFormSCountTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SellFormSCountTextBox.TextChanged

    End Sub

#End Region

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

        SellFormNumberTextBox.Focus()

    End Sub

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

    Private Sub SellFormCancelButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SellFormCancelButton.Click
        SellFormNumberTextBox.Text = ""
        SellFormNameTextBox.Text = ""
        SellFormGroupNumberTextBox.Text = ""
        SellFormGroupTextBox.Text = ""
        SellFormDanweiTextBox.Text = ""
        SellFormNnitTextBox.Text = ""
        SellFormCountTextBox.Text = "1"
        SellFormSCountTextBox.Text = ""
        SellFormExplainTextBox.Text = ""
        SellFormNumberTextBox.Focus()
        SellFormHelpListBox.Items.Clear()
    End Sub

    Private Sub SellFormSellButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SellFormSellButton.Click
        If SellFormNumberTextBox.Text = "" Then
            MsgBox("请输入货物编号")
        ElseIf SellFormNameTextBox.Text = "" Then
            MsgBox("请输入货物名称")
        ElseIf SellFormCountTextBox.Text = "" Then
            MsgBox("请输入货物数量")
        Else
            Dim Err As String = Nothing
            Dim Y As Boolean = SellClass.Sell(Trim(SellFormNumberTextBox.Text), Trim(SellFormNameTextBox.Text), Val(Trim(SellFormCountTextBox.Text)), MainForm.UserName, Err)
            If Y = True Then
                '清空
                SellFormCancelButton_Click(sender, e)
                '刷新数据
                Refurbish()
            Else
                MsgBox(Err, , "千寻工作室")
            End If
        End If

    End Sub

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

    End Sub

    Private Sub SellFormDataGridView_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SellFormDataGridView.Click
        'If SellFormDataGridView.SelectedCells(0).RowIndex < SellFormDataGridView.Rows.Count - 1 And SellFormDataGridView.SelectedCells(0).RowIndex >= 0 Then
        If SellFormDataGridView.SelectedCells(0).RowIndex >= 0 Then
            SellFormGroupNumberTextBox.Text = SellFormDataGridView.Item(3, SellFormDataGridView.SelectedCells(0).RowIndex).Value
            SellFormGroupTextBox.Text = SellFormDataGridView.Item(4, SellFormDataGridView.SelectedCells(0).RowIndex).Value
            SellFormDanweiTextBox.Text = SellFormDataGridView.Item(5, SellFormDataGridView.SelectedCells(0).RowIndex).Value
            SellFormNnitTextBox.Text = SellFormDataGridView.Item(6, SellFormDataGridView.SelectedCells(0).RowIndex).Value
            SellFormSCountTextBox.Text = SellFormDataGridView.Item(7, SellFormDataGridView.SelectedCells(0).RowIndex).Value
            SellFormNumberTextBox.Text = SellFormDataGridView.Item(1, SellFormDataGridView.SelectedCells(0).RowIndex).Value
        End If

    End Sub

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

    Private Sub SellFormHelpListBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SellFormHelpListBox.SelectedIndexChanged

    End Sub

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

⌨️ 快捷键说明

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