Click here to Skip to main content
15,891,607 members

duo!@# - Professional Profile



Summary

    Blog RSS
20
Authority
-167
Debator
20
Enquirer
333
Participant
0
Author
0
Editor
0
Organiser
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
Generalreduce Pin
duo!@#25-Jul-07 17:34
duo!@#25-Jul-07 17:34 
OMG | :OMG: Can any one reduce this code try!!



Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim conn1 As New Data.SqlClient.SqlConnection("data source=.\SQLEXPRESS;initial catalog=C:\DOCUMENTS AND SETTINGS\PROJ\APP_DATA\DATABASE.MDF;integrated security = true")
Dim sql1 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=101", conn1)
Dim sql2 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=102", conn1)
Dim sql3 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=103", conn1)
Dim sql4 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=104", conn1)
Dim sql5 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=201", conn1)
Dim sql6 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=202", conn1)
Dim sql7 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=203", conn1)
Dim sql8 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=204", conn1)
Dim sql9 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=301", conn1)
Dim sql10 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=302", conn1)
Dim sql11 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=303", conn1)
Dim sql12 As New Data.SqlClient.SqlCommand("select status from carpark where Lot_id=304", conn1)

Dim haha1 As String
Dim haha2 As String
Dim haha3 As String
Dim haha4 As String
Dim haha5 As String
Dim haha6 As String
Dim haha7 As String
Dim haha8 As String
Dim haha9 As String
Dim haha10 As String
Dim haha11 As String
Dim haha12 As String

conn1.Open()

haha1 = CStr(sql1.ExecuteScalar)
haha2 = CStr(sql2.ExecuteScalar)
haha3 = CStr(sql3.ExecuteScalar)
haha4 = CStr(sql4.ExecuteScalar)
haha5 = CStr(sql5.ExecuteScalar)
haha6 = CStr(sql6.ExecuteScalar)
haha7 = CStr(sql7.ExecuteScalar)
haha8 = CStr(sql8.ExecuteScalar)
haha9 = CStr(sql9.ExecuteScalar)
haha10 = CStr(sql10.ExecuteScalar)
haha11 = CStr(sql11.ExecuteScalar)
haha12 = CStr(sql12.ExecuteScalar)
If haha1 = "occupied" Then
Label2.BackColor = Drawing.Color.Green
Label1.Text = "101 is available"
Else
Label2.BackColor = Drawing.Color.Red
Label1.Text = "101 is not available"
End If

If haha2 = "occupied" Then
Label4.BackColor = Drawing.Color.Green
Label3.Text = "102 is available"
Else
Label4.BackColor = Drawing.Color.Red
Label3.Text = "102 is not available"
End If

If haha3 = "occupied" Then
Label6.BackColor = Drawing.Color.Green
Label5.Text = "103 is available"
Else
Label6.BackColor = Drawing.Color.Red
Label5.Text = "103 is not available"
End If

If haha4 = "occupied" Then
Label8.BackColor = Drawing.Color.Green
Label7.Text = "104 is available"
Else
Label8.BackColor = Drawing.Color.Red
Label7.Text = "104 is not available"
End If

If haha5 = "occupied" Then
Label10.BackColor = Drawing.Color.Green
Label9.Text = "201` is available"
Else
Label10.BackColor = Drawing.Color.Red
Label9.Text = "201 is not available"
End If

If haha6 = "occupied" Then
Label12.BackColor = Drawing.Color.Green
Label11.Text = "202 is available"
Else
Label12.BackColor = Drawing.Color.Red
Label11.Text = "202 is not available"
End If

If haha7 = "occupied" Then
Label14.BackColor = Drawing.Color.Green
Label13.Text = "203 is available"
Else
Label14.BackColor = Drawing.Color.Red
Label13.Text = "203 is not available"
End If

If haha8 = "occupied" Then
Label16.BackColor = Drawing.Color.Green
Label15.Text = "204 is available"
Else
Label16.BackColor = Drawing.Color.Red
Label15.Text = "204 is not available"
End If

If haha9 = "occupied" Then
Label18.BackColor = Drawing.Color.Green
Label17.Text = "301 is available"
Else
Label18.BackColor = Drawing.Color.Red
Label17.Text = "301 is not available"
End If

If haha10 = "occupied" Then
Label20.BackColor = Drawing.Color.Green
Label19.Text = "302 is available"
Else
Label20.BackColor = Drawing.Color.Red
Label19.Text = "302 is not available"
End If

If haha11 = "occupied" Then
Label22.BackColor = Drawing.Color.Green
Label21.Text = "303 is available"
Else
Label22.BackColor = Drawing.Color.Red
Label21.Text = "303 is not available"
End If

If haha12 = "occupied" Then
Label24.BackColor = Drawing.Color.Green
Label23.Text = "304 is available"
Else
Label24.BackColor = Drawing.Color.Red
Label23.Text = "304 is not available"
End If
conn1.Close()
End If
End Sub

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.