suheil altraikey suheil altraikey - 1 year ago 156 Question

analysis scale barcode label to multi textbox vb net 2013

i have retail program i want to add scale into my system by analysis bar-code for example if scanned bar-code start with 92 that mean this label generated by the scale
and i need 5 number after 92 to be item bar-code and 5 number to read weight from scale and last number it's check number

/ another example if scanned bar-code is 92-11111-05122-2
***** 92 its check number if this scale or not
***** if yes 11111 this item id and it price and name come from database
****** 05122 its weight /1000 to get weight per kilo
****** 2 its check no need to use it
***** i need weight in quantity text-box

any advise
********* sorry for my language *********

Answer Source

i found this solution :
Dim scode As String = barcode.Text.ToString If (((scode.Length = 13) AndAlso scode.StartsWith("92"))) Then Dim weight As Double = 0 'here to get item barcode Dim getitembarcode As String = scode.Substring(2, 5) 'here to get item barcode Dim getweight As String = scode.Substring(7, 5)

        'to add weight per kilo
        weight = (Double.Parse(getweight) / 1000)
        qty.Text = weight
        item_barcode.Text = getitembarcode


    End If

` thanks

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download