亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? productsdb.vb

?? visual studio.net學習資料
?? VB
字號:
Imports System
Imports System.Data
Imports System.Data.SQL

Namespace Conference

    '*******************************************************
    '
    ' ProductDetails Class
    '
    ' A simple data Class that encapsulates details about
    ' a particular product inside the Conference Product 
    ' database.
    '
    '*******************************************************

    Public Class ProductDetails 
    
        Public ModelNumber As String
        Public ModelName As String
        Public ProductImage As String
        Public UnitCost As Double
        Public Description As String
        
    End Class

    '*******************************************************
    '
    ' ProductsDB Class
    '
    ' Business/Data Logic Class that encapsulates all data
    ' logic necessary to query products within
    ' the Conference Products database.
    ' 
    '*******************************************************

    Public Class ProductsDB 

        '*******************************************************
        '
        ' ProductsDB.GetProductCategories() Method
        '
        ' The GetProductCategories method returns a bindable
        ' DataSet containing all product categories (and their
        ' ProductIDs) within the Conference Products database.
        '
        ' Other relevant sources:  
        '     ProductCategoryList Stored Procedure
        '
        '*******************************************************

        Public Function GetProductCategories() As DataSet

            ' Create Instance of Connection and Command Object
            Dim myConnection As SQLConnection = new SQLConnection(ConferenceDB.ConnectionString)
            Dim myCommand As SQLDataSetCommand = new SQLDataSetCommand("ProductCategoryList", myConnection)

            ' Mark the Command as a SPROC
            myCommand.SelectCommand.CommandType = CommandType.StoredProcedure

            ' Create and Fill the DataSet
            Dim myDataSet As DataSet = new DataSet()
            myCommand.FillDataSet(myDataSet, "CategoryList")

            ' Return the DataSet
            return myDataSet
        
        End Function
       
        '*******************************************************
        '
        ' ProductsDB.GetProducts() Method
        '
        ' The GetProducts method returns a bindable
        ' DataSet containing all products within a specified
        ' product category.
        '
        ' Other relevant sources:  
        '     ProductsByCategory Stored Procedure
        '
        '*******************************************************       
       

        ' TO DO: add a GetProducts function



        '*******************************************************
        '
        ' ProductsDB.GetSessions() Method
        '
        ' The GetSessions method returns a bindable
        ' DataSet containing all sessions within a specified
        ' product id.
        '
        ' Other relevant sources:  
        '     ProductsByCategory Stored Procedure
        '
        '*******************************************************       
       
        Public Function GetSessions(productID As Integer) As DataSet

            ' Create Instance of Connection and Command Object
            Dim myConnection As SQLConnection = new SQLConnection(ConferenceDB.ConnectionString)
            Dim myCommand As SQLDataSetCommand = new SQLDataSetCommand("SessionsByProduct", myConnection)

            ' Mark the Command as a SPROC
            myCommand.SelectCommand.CommandType = CommandType.StoredProcedure

            ' Add Parameters to SPROC
            Dim parameterProductID As SQLParameter= new SQLParameter("@ProductID", SQLDataType.Int, 4)
            parameterProductID.Value = productID
            myCommand.SelectCommand.Parameters.Add(parameterProductID)

            ' Create and Fill the DataSet
            Dim myDataSet As DataSet = new DataSet()
            myCommand.FillDataSet(myDataSet, "Sessions")

            ' Return the DataSet
            return myDataSet
            
        End Function


        '*******************************************************
        '
        ' ProductsDB.GetProductDetails() Method
        '
        ' The GetProductDetails method returns a ProductDetails
        ' struct containing specific details about a specified
        ' product within the Conference Products Database.
        '
        ' Other relevant sources:  
        '     ProductDetail Stored Procedure
        '        
        '*******************************************************    

        Public Function GetProductDetails(productID As Integer) As ProductDetails

            ' Create Instance of Connection and Command Object
            Dim myConnection As SQLConnection = new SQLConnection(ConferenceDB.ConnectionString)
            Dim myCommand As SQLCommand = new SQLCommand("ProductDetail", myConnection)

            ' Mark the Command as a SPROC
            myCommand.CommandType = CommandType.StoredProcedure

            ' Add Parameters to SPROC
            Dim parameterProductID As SQLParameter = new SQLParameter("@ProductID", SQLDataType.Int, 4)
            parameterProductID.Value = productID
            myCommand.Parameters.Add(parameterProductID)

            Dim parameterUnitCost As SQLParameter = new SQLParameter("@UnitCost", SQLDataType.Float, 8)
            parameterUnitCost.Direction = ParameterDirection.Output
            myCommand.Parameters.Add(parameterUnitCost)

            Dim parameterModelNumber As SQLParameter = new SQLParameter("@ModelNumber", SQLDataType.NChar, 50)
            parameterModelNumber.Direction = ParameterDirection.Output
            myCommand.Parameters.Add(parameterModelNumber)

            Dim parameterModelName As SQLParameter = new SQLParameter("@ModelName", SQLDataType.NChar, 50)
            parameterModelName.Direction = ParameterDirection.Output
            myCommand.Parameters.Add(parameterModelName)

            Dim parameterProductImage As SQLParameter = new SQLParameter("@ProductImage", SQLDataType.NChar, 50)
            parameterProductImage.Direction = ParameterDirection.Output
            myCommand.Parameters.Add(parameterProductImage)

            Dim parameterDescription As SQLParameter = new SQLParameter("@Description", SQLDataType.NChar, 8000)
            parameterDescription.Direction = ParameterDirection.Output
            myCommand.Parameters.Add(parameterDescription)

            Try 
                ' Open the connection and execute the Command
                myConnection.Open()
                myCommand.Execute()
            Catch e As Exception
                ' An error occurred, pass the exception up
                throw e
            Finally 
                ' Close the Connection
                If myConnection.State = DBObjectState.Open then
                    myConnection.Close()
                End If
            End Try
           
            ' Create and Populate ProductDetails Struct Imports 
            ' Output Params from the SPROC
            Dim myProductDetails As ProductDetails = new ProductDetails()

            myProductDetails.ModelNumber = CStr(parameterModelNumber.Value)
            myProductDetails.ModelName = CStr(parameterModelName.Value)
            myProductDetails.ProductImage = CStr(parameterProductImage.Value)
            myProductDetails.UnitCost = CDbl(parameterUnitCost.Value)
            myProductDetails.Description = CStr(parameterDescription.Value)      
            
            return myProductDetails
        
        End Function

        '*******************************************************
        '
        ' ProductsDB.GetProductsAlsoPurchased() Method
        '
        ' The GetProductsAlsoPurchased method returns a bindable
        ' DataSet containing a list of other products also
        ' purchased with a specified product.
        '
        ' Other relevant sources:  
        '     CustomerAlsoBought Stored Procedure
        '
        '******************************************************* 

        Public Function GetProductsAlsoPurchased(productID As Integer) As DataSet

            ' Create Instance of Connection and Command Object
            Dim myConnection As SQLConnection = new SQLConnection(ConferenceDB.ConnectionString)
            Dim myCommand As SQLDataSetCommand = new SQLDataSetCommand("CustomerAlsoBought", myConnection)

            ' Mark the Command as a SPROC
            myCommand.SelectCommand.CommandType = CommandType.StoredProcedure

            ' Add Parameters to SPROC
            Dim parameterProductID As SQLParameter = new SQLParameter("@ProductID", SQLDataType.Int, 4)
            parameterProductID.Value = productID
            myCommand.SelectCommand.Parameters.Add(parameterProductID)

            ' Create and Fill the DataSet
            Dim myDataSet As DataSet = new DataSet()
            myCommand.FillDataSet(myDataSet, "Products")

            ' Return the DataSet
            return myDataSet
        
        End Function

        '*******************************************************
        '
        ' ProductsDB.GetMostPopularProductsOfWeek() Method
        '
        ' The GetMostPopularProductsOfWeek method returns a bindable
        ' DataSet containing a list of the most popular products
        ' of the week within the Conference Product database.
        '
        ' Other relevant sources:  
        '     ProductsMostPopular Stored Procedure
        '
        '******************************************************* 

        Public Function GetMostPopularProductsOfWeek() As DataSet

            ' Create Instance of Connection and Command Object
            Dim myConnection As SQLConnection = new SQLConnection(ConferenceDB.ConnectionString)
            Dim myCommand As SQLDataSetCommand = new SQLDataSetCommand("ProductsMostPopular", myConnection)

            ' Mark the Command as a SPROC
            myCommand.SelectCommand.CommandType = CommandType.StoredProcedure

            ' Create and Fill the DataSet
            Dim myDataSet As DataSet = new DataSet()
            myCommand.FillDataSet(myDataSet, "CategoryList")

            ' Return the DataSet
            return myDataSet
        
        End Function
        
        '*******************************************************
        '
        ' ProductsDB.SearchProductDescriptions() Method
        '
        ' The SearchProductDescriptions method returns a bindable
        ' DataSet containing a list of all products whose name
        ' and/or description contains the specified search string.
        '
        ' Other relevant sources:  
        '     ProductSearch Stored Procedure
        '
        '*******************************************************         
        
        Public Function SearchProductDescriptions(searchString As String) As DataSet

            ' Create Instance of Connection and Command Object
            Dim myConnection As SQLConnection = new SQLConnection(ConferenceDB.ConnectionString)
            Dim myCommand As SQLDataSetCommand = new SQLDataSetCommand("ProductSearch", myConnection)

            ' Mark the Command as a SPROC
            myCommand.SelectCommand.CommandType = CommandType.StoredProcedure

            ' Add Parameters to SPROC
            Dim parameterSearchString As SQLParameter = new SQLParameter("@Search", SQLDataType.NChar, 255)
            parameterSearchString.Value = searchString
            myCommand.SelectCommand.Parameters.Add(parameterSearchString)

            ' Create and Fill the DataSet
            Dim myDataSet As DataSet = new DataSet()
            myCommand.FillDataSet(myDataSet, "Products")

            ' Return the DataSet
            return myDataSet
            
        End Function
        
    End Class

End Namespace

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品国产成人国产三级 | 黄一区二区三区| 91国偷自产一区二区三区观看 | 亚洲另类春色校园小说| 91视频免费观看| 成人欧美一区二区三区小说 | 国产成人福利片| 国产精品乱码一区二区三区软件| 中文字幕精品三区| 国产xxx精品视频大全| 欧美亚一区二区| 爽好多水快深点欧美视频| 欧美久久一区二区| 亚洲视频在线一区| 欧美日韩一卡二卡三卡| 麻豆精品在线观看| 亚洲国产精品v| 欧洲精品视频在线观看| 国产目拍亚洲精品99久久精品| 国产成人免费xxxxxxxx| 欧美电影免费观看高清完整版在线 | 久久精品国产澳门| 欧美日韩在线三级| 精品一区二区三区免费观看| 欧美日韩精品福利| 国产麻豆精品theporn| 91精品国产一区二区三区香蕉| 亚洲免费在线看| 欧美二区三区91| 婷婷中文字幕综合| 久久久噜噜噜久久中文字幕色伊伊 | 亚洲综合在线电影| 精品久久久久久久久久久久久久久 | 国产传媒一区在线| 亚洲综合色区另类av| 91香蕉视频mp4| 中文字幕佐山爱一区二区免费| 欧美日韩aaa| 丝袜亚洲另类欧美综合| 欧美私模裸体表演在线观看| 国模套图日韩精品一区二区| 欧美成人a∨高清免费观看| 日本中文在线一区| 日韩午夜av一区| av在线不卡观看免费观看| 日本欧美韩国一区三区| 日韩三级视频在线观看| 久久99这里只有精品| 欧美变态凌虐bdsm| 在线精品视频免费观看| 福利一区在线观看| 国产精品每日更新| 91国产视频在线观看| 国产成人亚洲综合a∨婷婷 | 麻豆国产91在线播放| 一区二区三区四区不卡在线| 久久久久久一级片| 日韩精品一区二区在线| 激情欧美日韩一区二区| 亚洲午夜免费视频| 最新国产成人在线观看| 中国色在线观看另类| 欧美不卡一二三| 日韩欧美一区二区免费| 国产精品羞羞答答xxdd| 麻豆免费精品视频| 欧美国产1区2区| 在线看国产一区二区| 99久久婷婷国产精品综合| 亚洲成av人片在线观看无码| 欧美一区在线视频| 国产乱妇无码大片在线观看| 另类综合日韩欧美亚洲| 蜜桃视频在线一区| 日韩国产欧美在线视频| 亚洲成人久久影院| 久久久午夜精品| 久久亚洲精华国产精华液| 日韩午夜在线影院| 成人av高清在线| 丁香婷婷综合色啪| 成人天堂资源www在线| 婷婷开心激情综合| 国产日韩三级在线| 国产女人aaa级久久久级| 国产无遮挡一区二区三区毛片日本| 色综合久久久久网| 欧洲亚洲精品在线| 欧美蜜桃一区二区三区| 成人理论电影网| 成人av电影免费观看| 蜜桃传媒麻豆第一区在线观看| 国产精品丝袜91| 欧美一区二区三区视频| 日韩一区二区免费视频| 精品久久免费看| 国产欧美一区视频| 国产精品久久久久久久岛一牛影视 | 99国产精品久久| 91成人免费网站| 国产v综合v亚洲欧| 色噜噜夜夜夜综合网| 欧美日韩一区二区三区四区| 制服丝袜一区二区三区| 91久久精品国产91性色tv| 欧美主播一区二区三区美女| 欧美精品色一区二区三区| 91免费版在线| 国产成人在线色| 91福利在线看| 91免费小视频| 欧美三级中文字| 一本大道久久a久久精品综合| 国产综合色视频| 日韩va欧美va亚洲va久久| 国产一区二区三区免费| 99久久99久久久精品齐齐| 欧美一区永久视频免费观看| 色妞www精品视频| 99久久777色| 91.com视频| 欧美老女人在线| 国产欧美一区二区三区鸳鸯浴| 亚洲精品国产视频| 久久一日本道色综合| 亚洲美女偷拍久久| 亚洲免费观看高清完整版在线观看熊 | 波多野结衣中文字幕一区| 国产一区二区三区香蕉| 在线视频一区二区三| 久久午夜老司机| 久久亚洲综合av| 亚洲已满18点击进入久久| 亚洲精选免费视频| 国产精品超碰97尤物18| 国产精品欧美经典| 欧美国产1区2区| 日韩av在线播放中文字幕| 成人av网站大全| 91啦中文在线观看| 精品免费99久久| 亚洲高清免费视频| 日韩电影免费在线看| 日韩av电影天堂| 色婷婷国产精品| 欧美国产1区2区| 亚洲一区二区三区免费视频| 亚洲午夜免费视频| 日本中文在线一区| 精品视频一区 二区 三区| 亚洲免费高清视频在线| 午夜伊人狠狠久久| 久久99精品国产.久久久久| 国产精品自拍毛片| 成人动漫一区二区在线| 欧美在线视频全部完| 亚洲视频香蕉人妖| 国产成人精品aa毛片| 国产亚洲va综合人人澡精品| 老鸭窝一区二区久久精品| 国产成人在线观看免费网站| 色先锋aa成人| 中文字幕一区在线观看| 成人精品视频一区| 欧美日韩免费在线视频| 亚洲自拍偷拍图区| 日本韩国一区二区三区视频| 亚洲色图视频网站| 色综合久久中文字幕| 欧美大片国产精品| 国产精品久久久久久久久果冻传媒| 亚洲一区二区三区自拍| 91福利区一区二区三区| 久久久久国产精品麻豆ai换脸 | 国产v综合v亚洲欧| 欧美色精品在线视频| 亚洲一区二区欧美激情| 国产美女娇喘av呻吟久久| 色88888久久久久久影院野外| 亚洲欧美怡红院| 在线视频国产一区| 久久久久久电影| 亚洲高清一区二区三区| 91精品国产aⅴ一区二区| 加勒比av一区二区| 欧美日韩一区二区三区视频| 五月开心婷婷久久| 色综合天天综合狠狠| 一区二区三区国产| 国产成人午夜视频| 中文字幕一区二区三区不卡| 91女人视频在线观看| 国产午夜精品理论片a级大结局| 成人美女视频在线观看18| 亚洲精品国产视频| 日韩一级完整毛片| 高清成人免费视频| 久久婷婷国产综合精品青草| 午夜精品福利一区二区蜜股av | 亚洲在线成人精品|