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

📄 frmoutput.vb

📁 VB写的进销存管理系统
💻 VB
📖 第 1 页 / 共 3 页
字号:
        '
        'cobCustomer
        '
        Me.cobCustomer.Location = New System.Drawing.Point(344, 16)
        Me.cobCustomer.Name = "cobCustomer"
        Me.cobCustomer.Size = New System.Drawing.Size(192, 20)
        Me.cobCustomer.TabIndex = 99
        '
        'Label1
        '
        Me.Label1.ForeColor = System.Drawing.Color.Red
        Me.Label1.Location = New System.Drawing.Point(280, 24)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(88, 24)
        Me.Label1.TabIndex = 98
        Me.Label1.Text = "※客  户:"
        '
        'Label2
        '
        Me.Label2.ForeColor = System.Drawing.Color.Red
        Me.Label2.Location = New System.Drawing.Point(16, 24)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(56, 24)
        Me.Label2.TabIndex = 95
        Me.Label2.Text = "※编号:"
        '
        'txtOId
        '
        Me.txtOId.BackColor = System.Drawing.SystemColors.Window
        Me.txtOId.Enabled = False
        Me.txtOId.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtOId.Location = New System.Drawing.Point(72, 16)
        Me.txtOId.Name = "txtOId"
        Me.txtOId.Size = New System.Drawing.Size(192, 21)
        Me.txtOId.TabIndex = 96
        Me.txtOId.Text = ""
        '
        'bunCancelAdd
        '
        Me.bunCancelAdd.Location = New System.Drawing.Point(392, 160)
        Me.bunCancelAdd.Name = "bunCancelAdd"
        Me.bunCancelAdd.Size = New System.Drawing.Size(40, 24)
        Me.bunCancelAdd.TabIndex = 95
        Me.bunCancelAdd.Text = "取消"
        '
        'bunOutputUpdate
        '
        Me.bunOutputUpdate.Location = New System.Drawing.Point(448, 160)
        Me.bunOutputUpdate.Name = "bunOutputUpdate"
        Me.bunOutputUpdate.Size = New System.Drawing.Size(88, 24)
        Me.bunOutputUpdate.TabIndex = 96
        Me.bunOutputUpdate.Text = "更新到数据库"
        '
        'bunAddOutput
        '
        Me.bunAddOutput.Location = New System.Drawing.Point(336, 160)
        Me.bunAddOutput.Name = "bunAddOutput"
        Me.bunAddOutput.Size = New System.Drawing.Size(40, 24)
        Me.bunAddOutput.TabIndex = 94
        Me.bunAddOutput.Text = "添加"
        '
        'GBAddCustomer
        '
        Me.GBAddCustomer.Controls.Add(Me.txtCPhone)
        Me.GBAddCustomer.Controls.Add(Me.Label14)
        Me.GBAddCustomer.Controls.Add(Me.txtCaddr)
        Me.GBAddCustomer.Controls.Add(Me.txtCName)
        Me.GBAddCustomer.Controls.Add(Me.Label12)
        Me.GBAddCustomer.Controls.Add(Me.txtCId)
        Me.GBAddCustomer.Controls.Add(Me.Label13)
        Me.GBAddCustomer.Controls.Add(Me.Label19)
        Me.GBAddCustomer.Controls.Add(Me.bunCustomerUpdate)
        Me.GBAddCustomer.Controls.Add(Me.bunAddCustomer)
        Me.GBAddCustomer.Controls.Add(Me.bunCustomerCancel)
        Me.GBAddCustomer.Location = New System.Drawing.Point(8, 216)
        Me.GBAddCustomer.Name = "GBAddCustomer"
        Me.GBAddCustomer.Size = New System.Drawing.Size(552, 144)
        Me.GBAddCustomer.TabIndex = 1
        Me.GBAddCustomer.TabStop = False
        Me.GBAddCustomer.Text = "添加客户"
        '
        'txtCPhone
        '
        Me.txtCPhone.BackColor = System.Drawing.SystemColors.Window
        Me.txtCPhone.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtCPhone.Location = New System.Drawing.Point(72, 80)
        Me.txtCPhone.Name = "txtCPhone"
        Me.txtCPhone.Size = New System.Drawing.Size(192, 21)
        Me.txtCPhone.TabIndex = 120
        Me.txtCPhone.Text = ""
        '
        'Label14
        '
        Me.Label14.Location = New System.Drawing.Point(16, 88)
        Me.Label14.Name = "Label14"
        Me.Label14.Size = New System.Drawing.Size(64, 24)
        Me.Label14.TabIndex = 119
        Me.Label14.Text = "  电话:"
        '
        'txtCaddr
        '
        Me.txtCaddr.BackColor = System.Drawing.SystemColors.Window
        Me.txtCaddr.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtCaddr.Location = New System.Drawing.Point(72, 48)
        Me.txtCaddr.Name = "txtCaddr"
        Me.txtCaddr.Size = New System.Drawing.Size(464, 21)
        Me.txtCaddr.TabIndex = 112
        Me.txtCaddr.Text = ""
        '
        'txtCName
        '
        Me.txtCName.BackColor = System.Drawing.SystemColors.Window
        Me.txtCName.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtCName.Location = New System.Drawing.Point(344, 16)
        Me.txtCName.Name = "txtCName"
        Me.txtCName.Size = New System.Drawing.Size(192, 21)
        Me.txtCName.TabIndex = 118
        Me.txtCName.Text = ""
        '
        'Label12
        '
        Me.Label12.ForeColor = System.Drawing.Color.Red
        Me.Label12.Location = New System.Drawing.Point(16, 24)
        Me.Label12.Name = "Label12"
        Me.Label12.Size = New System.Drawing.Size(56, 24)
        Me.Label12.TabIndex = 117
        Me.Label12.Text = "※编号:"
        '
        'txtCId
        '
        Me.txtCId.BackColor = System.Drawing.SystemColors.Window
        Me.txtCId.Enabled = False
        Me.txtCId.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtCId.Location = New System.Drawing.Point(72, 16)
        Me.txtCId.Name = "txtCId"
        Me.txtCId.Size = New System.Drawing.Size(192, 21)
        Me.txtCId.TabIndex = 118
        Me.txtCId.Text = ""
        '
        'Label13
        '
        Me.Label13.ForeColor = System.Drawing.Color.Red
        Me.Label13.Location = New System.Drawing.Point(280, 24)
        Me.Label13.Name = "Label13"
        Me.Label13.Size = New System.Drawing.Size(72, 24)
        Me.Label13.TabIndex = 117
        Me.Label13.Text = "※名  称:"
        '
        'Label19
        '
        Me.Label19.Location = New System.Drawing.Point(16, 56)
        Me.Label19.Name = "Label19"
        Me.Label19.Size = New System.Drawing.Size(64, 24)
        Me.Label19.TabIndex = 111
        Me.Label19.Text = "  地址:"
        '
        'bunCustomerUpdate
        '
        Me.bunCustomerUpdate.Location = New System.Drawing.Point(448, 112)
        Me.bunCustomerUpdate.Name = "bunCustomerUpdate"
        Me.bunCustomerUpdate.Size = New System.Drawing.Size(88, 24)
        Me.bunCustomerUpdate.TabIndex = 119
        Me.bunCustomerUpdate.Text = "更新到数据库"
        '
        'bunAddCustomer
        '
        Me.bunAddCustomer.Location = New System.Drawing.Point(336, 112)
        Me.bunAddCustomer.Name = "bunAddCustomer"
        Me.bunAddCustomer.Size = New System.Drawing.Size(40, 24)
        Me.bunAddCustomer.TabIndex = 117
        Me.bunAddCustomer.Text = "添加"
        '
        'bunCustomerCancel
        '
        Me.bunCustomerCancel.Location = New System.Drawing.Point(392, 112)
        Me.bunCustomerCancel.Name = "bunCustomerCancel"
        Me.bunCustomerCancel.Size = New System.Drawing.Size(40, 24)
        Me.bunCustomerCancel.TabIndex = 118
        Me.bunCustomerCancel.Text = "取消"
        '
        'Label15
        '
        Me.Label15.ForeColor = System.Drawing.Color.Red
        Me.Label15.Location = New System.Drawing.Point(16, 368)
        Me.Label15.Name = "Label15"
        Me.Label15.Size = New System.Drawing.Size(400, 24)
        Me.Label15.TabIndex = 121
        Me.Label15.Text = "前面带※的必须填写!"
        '
        'frmOutput
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
        Me.ClientSize = New System.Drawing.Size(568, 398)
        Me.Controls.Add(Me.GBAddCustomer)
        Me.Controls.Add(Me.GBOutput)
        Me.Controls.Add(Me.Label15)
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "frmOutput"
        Me.Text = "销售登记"
        Me.GBOutput.ResumeLayout(False)
        Me.GBAddCustomer.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub

#End Region
    Private myDataAdapterOutput As New SqlClient.SqlDataAdapter
    Private myDataSetOutput As DataSet = New DataSet("Output")
    Private myDataAdapterCustomer As New SqlClient.SqlDataAdapter
    Private myDataSetCustomer As DataSet = New DataSet("Customer")
    Private myDataAdapterBusinessman As New SqlClient.SqlDataAdapter
    Private myDataSetBusinessman As DataSet = New DataSet("Businessman")
    Private myDataSetProduct As DataSet = New DataSet("Product")
    Private myDataAdapterProduct As New SqlClient.SqlDataAdapter
    Private myDataSetStore As DataSet = New DataSet("Store")
    Private myDataAdapterStore As New SqlClient.SqlDataAdapter
    Private myIndexOutput As Integer = 0
    Private myIndexCustomer As Integer = 0
    Private myIndexProduct As Integer = 0
    Private myIndexBusinessman As Integer = 0
    Private RowsMaxOutput As Integer
    Private RowsMaxCustomer As Integer
    Private RowsMaxProduct As Integer
    Private RowsMaxBusinessman As Integer
    Dim x As Integer
    Private CID As String
    Private BID As String
    Private OID As String
    Private PID As String
    Private SID As String
    Public Sub InitOutput()
        txtOId.Text = ""
        txtCount.Text = ""
        txtStoreCount.Text = ""
        txtPrice.Text = ""
        cobCustomer.Text = ""
        cobProduct.Text = ""
        cobBusinessman.Text = ""
    End Sub
    Public Sub InitAddCustomer()
        txtCId.Text = ""
        txtCName.Text = ""
        txtCaddr.Text = ""
        txtCPhone.Text = ""
    End Sub
    Private Sub SetCustomerID()
        Dim CountInTable As Integer
        If RowsMaxCustomer >= 0 Then
            CountInTable = RowsMaxCustomer + 2
            CID = "c" & Format(CountInTable, "000000000")
        Else
            CID = "c000000001"
        End If
        txtCId.Text = CID
    End Sub
    Private Sub SetOutputID()
        Dim CountInTable As Integer
        If RowsMaxOutput >= 0 Then
            CountInTable = RowsMaxOutput + 2
            OID = "o" & Format(CountInTable, "000000000")
        Else
            OID = "o000000001"
        End If
        txtOId.Text = OID
    End Sub
    Public Sub IfCanAddOutput()
        Dim CanAddOutput As Boolean
        CanAddOutput = (cobCustomer.Text <> "") And (cobProduct.Text <> "") And (cobBusinessman.Text <> "") And (txtCount.Text <> "") And (txtOId.Text <> "") And (txtYear.Text <> "") And (txtMonth.Text <> "") And (txtDay.Text <> "") And (txtPrice.Text <> "")
        If CanAddOutput Then
            bunAddOutput.Enabled = True
        Else
            bunAddOutput.Enabled = False
        End If
    End Sub
    Public Sub IfCanAddCustomer()
        Dim CanAddCustomer As Boolean
        CanAddCustomer = (txtCId.Text <> "") And (txtCName.Text <> "")
        If CanAddCustomer Then
            bunAddCustomer.Enabled = True
        Else
            bunAddCustomer.Enabled = False
        End If
    End Sub
    Public Sub FillCustomer()
        On Error GoTo ErrorHandle
        With cobCustomer
            .Items.Clear()
            .Items.Add("<new>")
            Dim myRow As DataRow
            Dim currRows() As DataRow = myDataSetCustomer.Tables(0).Select(Nothing, Nothing, DataViewRowState.CurrentRows)
            For Each myRow In currRows
                .Items.Add(myRow("c_name"))
            Next
        End With
        Exit Sub
ErrorHandle:
        ShowErr()
    End Sub

⌨️ 快捷键说明

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