تبدیل vb6 به vb.net

تعرفه تبلیغات در سایت
عنوان عکس
عنوان عکس
عنوان عکس
عنوان عکس
عنوان عکس
Private Sub Form_activate()
Dim db As String
db = App.Path & "data.mdb;JET OLEDB:Database Password=2007"
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & db
Adodc1.RecordSource = "Select * From MaxOil"
Adodc1.Refresh
Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & db
Adodc2.RecordSource = "Select * From MaxTasme"
Adodc2.Refresh
Adodc3.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & db
Adodc3.RecordSource = "Select * From MaxAir"
Adodc3.Refresh
Adodc4.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & db
Adodc4.RecordSource = "Select * From MaxOilFilter"
Adodc4.Refresh
Adodc5.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & db
Adodc5.RecordSource = "Select * From MaxSep"
Adodc5.Refresh
Label3.Caption = Adodc1.Recordset.Fields("lastofd")
oil1:
Do Until Adodc1.Recordset.EOF
If Adodc1.Recordset.Fields("name") = "˜ãÑÓæÑ 1" And Adodc1.Recordset.Fields("service") = "ÊÚæíÖ ÑæÛä" Then
lbl1.Caption = ((100000 + Adodc1.Recordset.Fields("maxofcounter")) - Adodc1.Recordset.Fields("maxof1")) / 100
If Val(lbl1.Caption)
lbl1.BackColor = &H2222FF
Else
lbl1.BackColor = &H25B011
End If
GoTo oil2
Else
Adodc1.Recordset.MoveNext
End If
Loop

oil2:
Do Until Adodc1.Recordset.EOF
If Adodc1.Recordset.Fields("name") = "˜ãÑÓæÑ 2" And Adodc1.Recordset.Fields("service") = "ÊÚæíÖ ÑæÛä" Then
lbl6.Caption = ((100000 + Adodc1.Recordset.Fields("maxofcounter")) - Adodc1.Recordset.Fields("maxof2")) / 100
If Val(lbl6.Caption) < 0 Then
lbl6.BackColor = &H2222FF
Else
lbl6.BackColor = &H25B011
End If
GoTo oil3
Else
Adodc1.Recordset.MoveNext
End If
Loop

oil3:
Do Until Adodc1.Recordset.EOF
If Adodc1.Recordset.Fields("name") = "˜ãÑÓæÑ 3" And Adodc1.Recordset.Fields("service") = "ÊÚæíÖ ÑæÛä" Then
lbl11.Caption = ((100000 + Adodc1.Recordset.Fields("maxofcounter")) - Adodc1.Recordset.Fields("maxof3")) / 100
If Val(lbl11.Caption) < 0 Then
lbl11.BackColor = &H2222FF
Else
lbl11.BackColor = &H25B011
End If
GoTo oil4
Else
Adodc1.Recordset.MoveNext
End If
Loop

oil4:
Do Until Adodc1.Recordset.EOF
If Adodc1.Recordset.Fields("name") = "˜ãÑÓæÑ 4" And Adodc1.Recordset.Fields("service") = "ÊÚæíÖ ÑæÛä" Then
lbl16.Caption = ((100000 + Adodc1.Recordset.Fields("maxofcounter")) - Adodc1.Recordset.Fields("maxof4")) / 100
If Val(lbl16.Caption) < 0 Then
lbl16.BackColor = &H2222FF
Else
lbl16.BackColor = &H25B011
End If
GoTo tas1
Else
Adodc1.Recordset.MoveNext
End If
Loop

tas1:
Do Until Adodc2.Recordset.EOF
If Adodc2.Recordset.Fields("name") = "˜ãÑÓæÑ 1" And Adodc2.Recordset.Fields("service") = "ÊÚæíÖ ÊÓãå" Then
lbl2.Caption = ((100000 + Adodc2.Recordset.Fields("maxofcounter")) - Adodc2.Recordset.Fields("maxof1")) / 100
If Val(lbl2.Caption) < 0 Then
lbl2.BackColor = &H2222FF
Else
lbl2.BackColor = &H25B011
End If
GoTo tas2
Else
Adodc2.Recordset.MoveNext
End If
Loop

tas2:
Do Until Adodc2.Recordset.EOF
If Adodc2.Recordset.Fields("name") = "˜ãÑÓæÑ 2" And Adodc2.Recordset.Fields("service") = "ÊÚæíÖ ÊÓãå" Then
lbl7.Caption = ((100000 + Adodc2.Recordset.Fields("maxofcounter")) - Adodc2.Recordset.Fields("maxof2")) / 100
If Val(lbl7.Caption) < 0 Then
lbl7.BackColor = &H2222FF
Else
lbl7.BackColor = &H25B011
End If
GoTo Air1:
Else
Adodc2.Recordset.MoveNext
End If
Loop

Air1:
Do Until Adodc3.Recordset.EOF
If Adodc3.Recordset.Fields("name") = "˜ãÑÓæÑ 1" And Adodc3.Recordset.Fields("service") = "ÊÚæíÖ ÝíáÊÑ åæÇ" Then
lbl3.Caption = ((100000 + Adodc3.Recordset.Fields("maxofcounter")) - Adodc3.Recordset.Fields("maxof1")) / 100
If Val(lbl3.Caption) < 0 Then
lbl3.BackColor = &H2222FF
Else
lbl3.BackColor = &H25B011
End If
GoTo Air2
Else
Adodc3.Recordset.MoveNext
End If
Loop

Air2:
Do Until Adodc3.Recordset.EOF
If Adodc3.Recordset.Fields("name") = "˜ãÑÓæÑ 2" And Adodc3.Recordset.Fields("service") = "ÊÚæíÖ ÝíáÊÑ åæÇ" Then
lbl8.Caption = ((100000 + Adodc3.Recordset.Fields("maxofcounter")) - Adodc3.Recordset.Fields("maxof2")) / 100
If Val(lbl8.Caption) < 0 Then
lbl8.BackColor = &H2222FF
Else
lbl8.BackColor = &H25B011
End If
GoTo Air3
Else
Adodc3.Recordset.MoveNext
End If
Loop

Air3:
Do Until Adodc3.Recordset.EOF
If Adodc3.Recordset.Fields("name") = "˜ãÑÓæÑ 3" And Adodc3.Recordset.Fields("service") = "ÊÚæíÖ ÝíáÊÑ åæÇ" Then
lbl13.Caption = ((100000 + Adodc3.Recordset.Fields("maxofcounter")) - Adodc3.Recordset.Fields("maxof3")) / 100
If Val(lbl13.Caption) < 0 Then
lbl13.BackColor = &H2222FF
Else
lbl13.BackColor = &H25B011
End If
GoTo Air4
Else
Adodc3.Recordset.MoveNext
End If
Loop

Air4:
Do Until Adodc3.Recordset.EOF
If Adodc3.Recordset.Fields("name") = "˜ãÑÓæÑ 4" And Adodc3.Recordset.Fields("service") = "ÊÚæíÖ ÝíáÊÑ åæÇ" Then
lbl18.Caption = ((100000 + Adodc3.Recordset.Fields("maxofcounter")) - Adodc3.Recordset.Fields("maxof4")) / 100
If Val(lbl18.Caption) < 0 Then
lbl18.BackColor = &H2222FF
Else
lbl18.BackColor = &H25B011
End If
GoTo OilF1
Else
Adodc3.Recordset.MoveNext
End If
Loop

OilF1:
Do Until Adodc4.Recordset.EOF
If Adodc4.Recordset.Fields("name") = "˜ãÑÓæÑ 1" And Adodc4.Recordset.Fields("service") = "ÊÚæíÖ ÝíáÊÑ ÑæÛä" Then
lbl4.Caption = ((50000 + Adodc4.Recordset.Fields("maxofcounter")) - Adodc4.Recordset.Fields("maxof1")) / 100
If Val(lbl4.Caption) < 0 Then
lbl4.BackColor = &H2222FF
Else
lbl4.BackColor = &H25B011
End If
GoTo OilF2
Else
Adodc4.Recordset.MoveNext
End If
Loop

OilF2:
Do Until Adodc4.Recordset.EOF
If Adodc4.Recordset.Fields("name") = "˜ãÑÓæÑ 2" And Adodc4.Recordset.Fields("service") = "ÊÚæíÖ ÝíáÊÑ ÑæÛä" Then
lbl9.Caption = ((50000 + Adodc4.Recordset.Fields("maxofcounter")) - Adodc4.Recordset.Fields("maxof2")) / 100
If Val(lbl9.Caption) < 0 Then
lbl9.BackColor = &H2222FF
Else
lbl9.BackColor = &H25B011
End If
GoTo OilF3
Else
Adodc4.Recordset.MoveNext
End If
Loop

OilF3:
Do Until Adodc4.Recordset.EOF
If Adodc4.Recordset.Fields("name") = "˜ãÑÓæÑ 3" And Adodc4.Recordset.Fields("service") = "ÊÚæíÖ ÝíáÊÑ ÑæÛä" Then
lbl14.Caption = ((50000 + Adodc4.Recordset.Fields("maxofcounter")) - Adodc4.Recordset.Fields("maxof3")) / 100
If Val(lbl14.Caption) < 0 Then
lbl14.BackColor = &H2222FF
Else
lbl14.BackColor = &H25B011
End If
GoTo OilF4
Else
Adodc4.Recordset.MoveNext
End If
Loop

OilF4:
Do Until Adodc4.Recordset.EOF
If Adodc4.Recordset.Fields("name") = "˜ãÑÓæÑ 4" And Adodc4.Recordset.Fields("service") = "ÊÚæíÖ ÝíáÊÑ ÑæÛä" Then
lbl19.Caption = ((50000 + Adodc4.Recordset.Fields("maxofcounter")) - Adodc4.Recordset.Fields("maxof4")) / 100
If Val(lbl19.Caption) < 0 Then
lbl19.BackColor = &H2222FF
Else
lbl19.BackColor = &H25B011
End If
GoTo Sep1
Else
Adodc4.Recordset.MoveNext
End If
Loop

Sep1:
Do Until Adodc5.Recordset.EOF
If Adodc5.Recordset.Fields("name") = "˜ãÑÓæÑ 1" And Adodc5.Recordset.Fields("service") = "ÊÚæíÖ ÝíáÊÑ ÓÑÇÊæÑ" Then
lbl5.Caption = ((150000 + Adodc5.Recordset.Fields("maxofcounter")) - Adodc5.Recordset.Fields("maxof1")) / 100
If Val(lbl5.Caption) < 0 Then
lbl5.BackColor = &H2222FF
Else
lbl5.BackColor = &H25B011
End If
GoTo Sep2
Else
Adodc5.Recordset.MoveNext
End If
Loop

Sep2:
Do Until Adodc5.Recordset.EOF
If Adodc5.Recordset.Fields("name") = "˜ãÑÓæÑ 2" And Adodc5.Recordset.Fields("service") = "ÊÚæíÖ ÝíáÊÑ ÓÑÇÊæÑ" Then
lbl10.Caption = ((150000 + Adodc5.Recordset.Fields("maxofcounter")) - Adodc5.Recordset.Fields("maxof2")) / 100
If Val(lbl10.Caption) < 0 Then
lbl10.BackColor = &H2222FF
Else
lbl10.BackColor = &H25B011
End If
GoTo Sep3
Else
Adodc5.Recordset.MoveNext
End If
Loop

Sep3:
Do Until Adodc5.Recordset.EOF
If Adodc5.Recordset.Fields("name") = "˜ãÑÓæÑ 3" And Adodc5.Recordset.Fields("service") = "ÊÚæíÖ ÝíáÊÑ ÓÑÇÊæÑ" Then
lbl15.Caption = ((150000 + Adodc5.Recordset.Fields("maxofcounter")) - Adodc5.Recordset.Fields("maxof3")) / 100
If Val(lbl15.Caption) < 0 Then
lbl15.BackColor = &H2222FF
Else
lbl15.BackColor = &H25B011
End If
GoTo Sep4
Else
Adodc5.Recordset.MoveNext
End If
Loop

Sep4:
Do Until Adodc5.Recordset.EOF
If Adodc5.Recordset.Fields("name") = "˜ãÑÓæÑ 4" And Adodc5.Recordset.Fields("service") = "ÊÚæíÖ ÝíáÊÑ ÓÑÇÊæÑ" Then
lbl20.Caption = ((150000 + Adodc5.Recordset.Fields("maxofcounter")) - Adodc5.Recordset.Fields("maxof4")) / 100
If Val(lbl20.Caption) < 0 Then
lbl20.BackColor = &H2222FF
Else
lbl20.BackColor = &H25B011
End If
Exit Sub
Else
Adodc5.Recordset.MoveNext
End If
Loop
End Sub

نویسنده : محمد رضا جوادیان بازدید : 1 تاريخ : دوشنبه 23 بهمن 1396 ساعت: 18:18
برچسب‌ها :
اخبار و رسانه هاهنر و ادبیاترایانه و اینترنتعلم و فن آوریتجارت و اقتصاداندیشه و مذهبفوتو بلاگوبلاگ و وبلاگ نویسیفرهنگ و تاریخجامعه و سیاستورزشسرگرمی و طنزشخصیخانواده و زندگیسفر و توریسمفارسی زبان در دیگر کشورها