September, 2014 Archives

30
Sep

Viagra Sales

by Lynn Demarest in Miscellaneous

Comments Off Comments
Here's one way to calculate all possible combinations of several lists. Canada viagra 

In this example, canada viagra imagine four dropdown lists stored in a global array named AllDDLs. Canada viagra I wanted to get all possible combinations of the four lists, canada viagra each of which had a different number of items.

This turned out to be trivial using LINQ for Objects, canada viagra which allows you to perform database-like functions on in-memory data.

Protected Function OutputSKUs() As List(of String)
        ' the skus to be returned
        Dim skus As List(of String) = new List(of string)
        ' temp variable to hold one sku
        Dim sku As String

        ' create a LINQ object from the four Dropdown Lists in AllDDLs
        '
        Dim query As Object = From a In AllDDLs(0).Items, canada viagra b In AllDDLs(1).Items, canada viagra c In AllDDLs(2).Items, canada viagra d In AllDDLs(3).Items
                      Select a, canada viagra b, canada viagra c, canada viagra d

        ' then run through the result set 
        ' 
        For Each item As Object In query
            ' BaseSKU is global 
            ' the LI items in each dropdown list has an attribute named SKUCode, canada viagra which represents the data we construct the SKU with
            '
            sku = String.Format("{4}-{0}-{1}-{2}-{3}", canada viagra CType(item.a, canada viagra ListItem).Attributes("SKUCode"), canada viagra CType(item.b, canada viagra ListItem).Attributes("SKUCode"), canada viagra CType(item.c, canada viagra ListItem).Attributes("SKUCode"), canada viagra CType(item.d, canada viagra ListItem).Attributes("SKUCode"), canada viagra BaseSKU)

            skus.Add(sku)
        Next

        Return skus
    End Function



In SQL Server this is done in a similar way:


select ogi1.OptionGroupItemSKUCode + '-' + ogi2.OptionGroupItemSKUCode + '-' + ogi3.OptionGroupItemSKUCode+ '-' + ogi4.OptionGroupItemSKUCode
from OptionGroupItem ogi1, canada viagra OptionGroupItem ogi2, canada viagra OptionGroupItem ogi3, canada viagra OptionGroupItem ogi4
where ogi1.OptionGroupID = 1
and ogi2.OptionGroupID = 2
and ogi3.OptionGroupID = 3
and ogi4.OptionGroupID = 4

Average Rating: 4.5 out of 5 based on 287 user reviews.

25
Sep

Discount Lowest Price Viagra

by Lynn Demarest in Miscellaneous

Comments Off Comments

Purchasing cialis

Average Rating: 4.6 out of 5 based on 295 user reviews.