Professional Documents
Culture Documents
Quezon City University: Pf101 - Object Oriented Programming Laboratory Examination
Quezon City University: Pf101 - Object Oriented Programming Laboratory Examination
INSTRUCTIONS:
Design and develop an application system using ADO hard code for LOGIN and Data source Wizard for
ADMIN sub menu. Your application has Preview – Printable copy for your database record. Follow the given
below in designing and developing the application program.
• Authentication
Login (sub menu)
Logout (sub menu)
• Records
Admin (sub menu)
Print (sub menu)
• TestII
BasicPOS (sub menu)
TestII: Create basic POS that will accept price-input from the user. Then your program will continuously
accept enter price. The results will be displayed on the screen such as prices of an item(inside the listbox)
and total price(will be displayed in Label Control)
textbox
listbox
label
Source Code:
Try
con1 = New SqlClient.SqlConnection
con1.ConnectionString = "Data Source=DANIELIII\SQLSERVER;Initial Catalog=login1;User
ID=sa;Password=123"
con1.Open()
sql1 = "select * from admin where username='" & username1 & "'
and password='" & password1 & " ' "
da1.Fill(ds1, "login1")
rescount = ds1.Tables(0).Rows.Count
If rescount > 0 Then
Form1.RecordsToolStripMenuItem.Enabled = True
MessageBox.Show("Welcome " & username1.ToUpper())
Me.Close()
Else
Form1.RecordsToolStripMenuItem.Enabled = False
MessageBox.Show("Invalid Login")
End If
'burst'
con1.Close()
TextBox1.Clear()
TextBox2.Clear()
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
End Sub
End Class
'TODO: This line of code loads data into the 'Login1DataSet.admin' table. You
can move, or remove it, as needed.
Me.AdminTableAdapter.Fill(Me.Login1DataSet.admin)
End Sub
End Sub
End Class
Paste the screenshot of your output here. (And upload your whole project(winrar) on Google Classroom so
that your professor can validate your work)
QUEZON CITY UNIVERSITY
COLLEGE OF COMPUTER SCIENCE AND INFORMATION TECHNOLOGY