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

📄 form3.vb

📁 Its a Computer based book
💻 VB
📖 第 1 页 / 共 4 页
字号:
                            End While
                        Else
                            If ComboBox1.SelectedItem = "Ice-cream" Then
                                ListBox1.Items.Clear()
                                str = "select recipe_name from ice_cream "
                                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 = "Rice" Then
                                    ListBox1.Items.Clear()
                                    str = "select recipe_name from rice "
                                    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 = "Salads and Raita" Then
                                        ListBox1.Items.Clear()
                                        str = "select recipe_name from Salads_and_Raita "
                                        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 = "Sandwich" Then
                                            ListBox1.Items.Clear()
                                            str = "select recipe_name from Sandwiches "
                                            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 = "Seafood" Then
                                                ListBox1.Items.Clear()
                                                str = "select recipe_name from seafood "
                                                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 = "Vegetable" Then
                                                    ListBox1.Items.Clear()
                                                    str = "select recipe_name from vegetable "
                                                    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
                                                    sqlcon.Close()
                                                End If
                                            End If
                                        End If
                                    End If
                                End If
                            End If
                        End If
                    End If
                End If
            End If
        End If

       

    End Sub

    Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
        Form5.Show()
    End Sub
  
   
    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        If Val(TextBox1.Text) > 1300 And ComboBox1.SelectedItem = "Ice-cream" Then
            MsgBox("Calculation capability for ICE CREAM is not more then 1300")
        Else
            If Val(TextBox1.Text) > 1999 And ComboBox1.SelectedItem = "Bread" Then
                MsgBox("Calculation capability for BREAD is not more then 1999")
            Else
                If Val(TextBox1.Text) > 1000 And ComboBox1.SelectedItem = "Chicken" Then
                    MsgBox("Calculation capability for CHICKEN is not more then 1000")
                Else
                    If Val(TextBox1.Text) > 1300 And ComboBox1.SelectedItem = "Dhal" Then
                        MsgBox("Calculation capability for DHAL is not more then 1300")
                    Else
                        If Val(TextBox1.Text) > 499 And ComboBox1.SelectedItem = "Egg" Then
                            MsgBox("Calculation capability for EGG is not more then 499")
                        Else

                            If Val(TextBox1.Text) > 700 And ComboBox1.SelectedItem = "Fish" Then
                                MsgBox("Calculation capability for FISH is not more then 700")
                            Else
                                If Val(TextBox1.Text) > 799 And ComboBox1.SelectedItem = "Salads and Raita" Then
                                    MsgBox("Calculation capability for SALAD AND RAITA is not more then 799")
                                Else
                                    If Val(TextBox1.Text) > 1300 And ComboBox1.SelectedItem = "Seafood" Then
                                        MsgBox("Calculation capability for SEFOOD is not more then 1300")
                                    Else
                                        If Val(TextBox1.Text) > 1300 And ComboBox1.SelectedItem = "Vegetable" Then
                                            MsgBox("Calculation capability for VEGETABLE is not more then 1300")
                                        Else
                                            If Val(TextBox1.Text) > 248 And ComboBox1.SelectedItem = "Sandwich" Then
                                                MsgBox("Calculation capability for SANDWICH is not more then 248")
                                            Else
                                                If Val(TextBox1.Text) > 1500 And ComboBox1.SelectedItem = "Rice" Then
                                                    MsgBox("Calculation capability for RICE is not more then 1500")
                                                Else


                                                    L1.Text = ((Val(L1.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L2.Text = ((Val(L2.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L3.Text = ((Val(L3.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L4.Text = ((Val(L4.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L5.Text = ((Val(L5.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L6.Text = ((Val(L6.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L7.Text = ((Val(L7.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L8.Text = ((Val(L8.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L17.Text = ((Val(L17.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L18.Text = ((Val(L18.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L19.Text = ((Val(L19.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L20.Text = ((Val(L20.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L21.Text = ((Val(L21.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L22.Text = ((Val(L22.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L23.Text = ((Val(L23.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L24.Text = ((Val(L24.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L33.Text = ((Val(L33.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L34.Text = ((Val(L34.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L35.Text = ((Val(L35.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L36.Text = ((Val(L36.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L37.Text = ((Val(L37.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L38.Text = ((Val(L38.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L39.Text = ((Val(L39.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    L40.Text = ((Val(L40.Text) / Val(serv.Text)) * Val(TextBox1.Text))
                                                    serv.Text = TextBox1.Text
                                                    If Val(L1.Text) >= 1000 Then
                                                        L1.Text = Val(L1.Text) / 1000
                                                        kg1.Text = "Kg"
                                                    End If

                                                    If Val(L2.Text) >= 1000 Then
                                                        L2.Text = Val(L2.Text) / 1000
                                                        kg2.Text = "Kg"
                                                    End If
                                                    If Val(L3.Text) >= 1000 Then
                                                        L3.Text = Val(L3.Text) / 1000
                                                        kg3.Text = "Kg"
                                                    End If
                                                    If Val(L4.Text) >= 1000 Then
                                                        L4.Text = Val(L4.Text) / 1000
                                                        kg4.Text = "Kg"
                                                    End If
                                                    If Val(L5.Text) >= 1000 Then
                                                        L5.Text = Val(L5.Text) / 1000
                                                        kg5.Text = "Kg"
                                                    End If
                                                    If Val(L6.Text) >= 1000 Then
                                                        L6.Text = Val(L6.Text) / 1000
                                                        kg6.Text = "Kg"
                                                    End If
                                                    If Val(L7.Text) >= 1000 Then
                                                        L7.Text = Val(L7.Text) / 1000
                                                        kg7.Text = "Kg"
                                                    End If
                                                    If Val(L8.Text) >= 1000 Then
                                                        L8.Text = Val(L8.Text) / 1000
                                                        kg8.Text = "Kg"
                                                    End If
                                                    If Val(L17.Text) >= 1000 Then
                                                        L17.Text = Val(L17.Text) / 1000
                                                        gm1.Text = "Kg"
                                                    End If
                                                    If Val(L18.Text) >= 1000 Then
                                                        L18.Text = Val(L18.Text) / 1000
                                                        gm2.Text = "Kg"
                                                    End If
                                                    If Val(L19.Text) >= 1000 Then
                                                        L19.Text = Val(L19.Text) / 1000
                                                        gm3.Text = "Kg"
                                                    End If
                                                    If Val(L20.Text) >= 1000 Then
                                                        L20.Text = Val(L20.Text) / 1000
                                                        gm4.Text = "Kg"
                                                    End If
                                                    If Val(L21.Text) >= 1000 Then
                                                        L21.Text = Val(L21.Text) / 1000
                                                        gm5.Text = "Kg"
                                                    End If
                                                    If Val(L22.Text) >= 1000 Then
                                                        L22.Text = Val(L22.Text) / 1000
                                                        gm6.Text = "Kg"
                                                    End If
                                                    If Val(L23.Text) >= 1000 Then
                                                        L23.Text = Val(L23.Text) / 1000
                                                        gm7.Text = "Kg"
                                                    End If
                                                    If Val(L24.Text) >= 1000 Then
                                                        L24.Text = Val(L24.Text) / 1000
                                                        gm8.Text = "Kg"
                                                    End If
                                                    If Val(L33.Text) >= 1000 Then
                                                        L33.Text = Val(L33.Text) / 1000
                                                        gm9.Text = "Kg"
                                                    End If
                                                    If Val(L34.Text) >= 1000 Then
                                                        L34.Text = Val(L34.Text) / 1000
                                                        gm10.Text = "Kg"
                                                    End If
                                                    If Val(L35.Text) >= 1000 Then
                                                        L35.Text = Val(L35.Text) / 1000
                                                        gm11.Text = "Kg"
                                                    End If
                                                    If Val(L36.Text) >= 1000 Then
                                                        L36.Text = Val(L36.Text) / 1000
                                                        gm12.Text = "Kg"
                                                    End If
                                                    If Val(L37.Text) >= 1000 Then
                                                        L37.Text = Val(L37.Text) / 1000
                                                        gm13.Text = "Kg"
                                                    End If
                                                    If Val(L38.Text) >= 1000 Then
                                                        L38.Text = Val(L38.Text) / 1000
                                                        gm14.Text = "Kg"
                                                    End If
                                                    If Val(L39.Text) >= 1000 Then
                                                        L39.Text = Val(L39.Text) / 1000
                                                        gm15.Text = "Kg"

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

    Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles L9.Click

    End Sub

    Private Sub Label21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kg6.Click

    End Sub

    Private Sub GroupBox4_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox4.Enter

    End Sub

    Private Sub Label23_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kg7.Click

    End Sub
End Class

⌨️ 快捷键说明

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