Search the Community
Showing results for tags 'convert'.
-
Private Sub btnaddcart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnaddcart.Click Dim part As PartDescription = New PartDescription() part = CType(lbxItems.SelectedItem, PartDescription) Dim SItem As String Dim Updateqty As Boolean = False SItem = part.PartNumber MsgBox(SItem) For Each i As string In lstPart.Items If lstPart.SelectedItem.ToString = SItem Then Dim tempqty As Integer = Integer.Parse(lstQuantity.SelectedItem.Items.text) tempqty += 1 lstQuantity.SelectedItem.Items.text = tempqty.ToString Updateqty = True End If Next If Updateqty = False Then lstPart.Items.Add(part.PartNumber) lstDescripption.Items.Add(part.PartName) lstUCost.Items.Add(part.UnitPrice) lstQuantity.Items.Add("1") lstUCost.Text = (part.UnitPrice * 1).ToString() End If End Sub i have a bunch of listboxes one has the final item you select then press addtocart witch will take seprate parts of the string and add themm to the relevent listbox and have qty set to 1 what i want is if the same item is selected again is instead of making a dublicate is to increse the relevent qty in the qty listbox but i keep getting this error Public member 'Items' on type 'String' not found i know i could use a listview for this task instead but i wanted to do it with seprate listboxes any help would be appreciated thanks
-
Can someone convert this one line of code for me: perl -MWWW::Mechanize -e '$m = WWW::Mechanize->new; $_=shift; ($i) = /v=(.+)/; s/%(..)/chr(hex($1))/ge for (($u) = $m->get($_)->content =~ /l_map": .+(?:%2C)?5%7C(.+?)"/); print $i, "\n"; $m->get($u, ":content_file" => "$i.flv")'