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

📄 form3.vb

📁 Its a Computer based book
💻 VB
📖 第 1 页 / 共 4 页
字号:
            kg2.Text = "Kg"
        Else
            kg2.Text = ""
        End If
        If Val(L3.Text) >= 1000 Then
            L3.Text = Val(L3.Text) / 1000
            kg3.Text = "Kg"
        Else
            kg3.Text = ""
        End If
        If Val(L4.Text) >= 1000 Then
            L4.Text = Val(L4.Text) / 1000
            kg4.Text = "Kg"
        Else
            kg4.Text = ""
        End If
        If Val(L5.Text) >= 1000 Then
            L5.Text = Val(L5.Text) / 1000
            kg5.Text = "Kg"
        Else
            kg5.Text = ""

        End If

        If Val(L6.Text) >= 1000 Then
            L6.Text = Val(L6.Text) / 1000
            kg6.Text = "Kg"
        Else
            kg6.Text = ""
        End If
        If Val(L7.Text) >= 1000 Then
            L7.Text = Val(L7.Text) / 1000
            kg7.Text = "Kg"
        Else
            kg7.Text = ""

        End If
        If Val(L8.Text) >= 1000 Then
            L8.Text = Val(L8.Text) / 1000
            kg8.Text = "Kg"
        Else
            kg8.Text = ""

        End If
        If Val(L17.Text) >= 1000 Then
            L7.Text = Val(L17.Text) / 1000
            gm1.Text = "Kg"
        Else
            gm1.Text = ""

        End If
        If Val(L18.Text) >= 1000 Then
            L18.Text = Val(L18.Text) / 1000
            gm2.Text = "Kg"
        Else
            gm2.Text = ""

        End If
        If Val(L19.Text) >= 1000 Then
            L19.Text = Val(L19.Text) / 1000
            gm3.Text = "Kg"
        Else
            gm3.Text = ""

        End If
        If Val(L20.Text) >= 1000 Then
            L20.Text = Val(L20.Text) / 1000
            gm4.Text = "Kg"
        Else
            gm4.Text = ""

        End If
        If Val(L21.Text) >= 1000 Then
            L21.Text = Val(L21.Text) / 1000
            gm5.Text = "Kg"
        Else
            gm5.Text = ""

        End If
        If Val(L22.Text) >= 1000 Then
            L22.Text = Val(L22.Text) / 1000
            gm6.Text = "Kg"
        Else
            gm6.Text = ""

        End If
        If Val(L23.Text) >= 1000 Then
            L23.Text = Val(L23.Text) / 1000
            gm7.Text = "Kg"
        Else
            gm7.Text = ""

        End If
        If Val(L24.Text) >= 1000 Then
            L24.Text = Val(L24.Text) / 1000
            gm8.Text = "Kg"
        Else
            gm8.Text = ""

        End If
        If Val(L33.Text) >= 1000 Then
            L33.Text = Val(L33.Text) / 1000
            gm9.Text = "Kg"
        Else
            gm9.Text = ""

        End If
        If Val(L34.Text) >= 1000 Then
            L34.Text = Val(L34.Text) / 1000
            gm10.Text = "Kg"
        Else
            gm10.Text = ""

        End If
        If Val(L35.Text) >= 1000 Then
            L35.Text = Val(L35.Text) / 1000
            gm11.Text = "Kg"
        Else
            gm11.Text = ""

        End If
        If Val(L36.Text) >= 1000 Then
            L36.Text = Val(L36.Text) / 1000
            gm12.Text = "Kg"
        Else
            gm12.Text = ""

        End If
        If Val(L37.Text) >= 1000 Then
            L37.Text = Val(L37.Text) / 1000
            gm13.Text = "Kg"
        Else
            gm13.Text = ""

        End If
        If Val(L38.Text) >= 1000 Then
            L38.Text = Val(L38.Text) / 1000
            gm14.Text = "Kg"
        Else
            gm14.Text = ""

        End If
        If Val(L39.Text) >= 1000 Then
            L39.Text = Val(L39.Text) / 1000
            gm15.Text = "Kg"
        Else
            gm15.Text = ""


        End If
        If Val(L40.Text) >= 1000 Then
            L40.Text = Val(L40.Text) / 1000
            gm16.Text = "Kg"
        Else
            gm16.Text = ""

        End If


    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Form4.Show()

    End Sub

    Private Sub RichTextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RichTextBox1.TextChanged

    End Sub

    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
        Dim sqlcon As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\cook.mdf;Integrated Security=True;User Instance=True")
        Dim str As String
        sqlcon.Open()
        L1.Text = ""
        L9.Text = ""
        L2.Text = ""
        L10.Text = ""
        L3.Text = ""
        L11.Text = ""
        L4.Text = ""
        L12.Text = ""
        L5.Text = ""
        L13.Text = ""
        L6.Text = ""
        L14.Text = ""
        L7.Text = ""
        L15.Text = ""
        L8.Text = ""
        L16.Text = ""
        L17.Text = ""
        L25.Text = ""
        L18.Text = ""
        L26.Text = ""
        L19.Text = ""
        L27.Text = ""
        L20.Text = ""
        L28.Text = ""
        L21.Text = ""
        L29.Text = ""
        L22.Text = ""
        L30.Text = ""
        L23.Text = ""
        L31.Text = ""
        L24.Text = ""
        L32.Text = ""
        L33.Text = ""
        L41.Text = ""
        L34.Text = ""
        L42.Text = ""
        L35.Text = ""
        L43.Text = ""
        L36.Text = ""
        L44.Text = ""
        L37.Text = ""
        L45.Text = ""
        L38.Text = ""
        L46.Text = ""
        L39.Text = ""
        L47.Text = ""
        L40.Text = ""
        L48.Text = ""
        serv.Text = ""
        RichTextBox1.Text = ""
       
        If ComboBox1.SelectedItem = "Bread" Then
            ListBox1.Items.Clear()
            str = "select recipe_name from bread "
            Dim sqlcom As New SqlCommand(str, sqlcon)
            Dim dr As SqlDataReader
            dr = sqlcom.ExecuteReader()
            While dr.Read()
                ListBox1.Items.Add(dr("recipe_name"))
            End While
        Else
            If ComboBox1.SelectedItem = "Chicken" Then
                ListBox1.Items.Clear()
                str = "select recipe_name from chickec "
                Dim sqlcom As New SqlCommand(str, sqlcon)
                Dim dr As SqlDataReader
                dr = sqlcom.ExecuteReader()
                While dr.Read()
                    ListBox1.Items.Add(dr("recipe_name"))
                End While
            Else
                If ComboBox1.SelectedItem = "Dhal" Then
                    ListBox1.Items.Clear()
                    str = "select recipe_name from dhal "
                    Dim sqlcom As New SqlCommand(str, sqlcon)
                    Dim dr As SqlDataReader
                    dr = sqlcom.ExecuteReader()
                    While dr.Read()
                        ListBox1.Items.Add(dr("recipe_name"))
                    End While
                Else
                    If ComboBox1.SelectedItem = "Egg" Then
                        ListBox1.Items.Clear()
                        str = "select recipe_name from egg "
                        Dim sqlcom As New SqlCommand(str, sqlcon)
                        Dim dr As SqlDataReader
                        dr = sqlcom.ExecuteReader()
                        While dr.Read()
                            ListBox1.Items.Add(dr("recipe_name"))
                        End While
                    Else
                        If ComboBox1.SelectedItem = "Fish" Then
                            ListBox1.Items.Clear()
                            str = "select recipe_name from fish "
                            Dim sqlcom As New SqlCommand(str, sqlcon)
                            Dim dr As SqlDataReader
                            dr = sqlcom.ExecuteReader()
                            While dr.Read()
                                ListBox1.Items.Add(dr("recipe_name"))

⌨️ 快捷键说明

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