Create a windows form that retrieves the username and Password of the user.
The windows form must have the following functionalities
1. The form is capable of adding a new user
2. The details of the user can be displayed on the
Datagridview when you add a new user. (Tip: you can use the Login code on form1.vb)
3. Only the user with Admin position can log in and can view and modify the details of the user
4. The form must be capable of modifying the existing details of the user
5. The form is capable of deleting the existing details of the user
To the other details of your task, feel free to use and run the sample program I provided. Some of the buttons of the new form for retrieving username and password were disabled, you have to do the same!
For your Final:
I want you to copy and paste your software project on your own USB flash drive ( bumili ka na lang ng sarili mong USB) and submit it personally to me.
Deadline for submission will be on or before: March 8, 2019.
Late submission of your software project will not be accepted! Do not submit it if there were some errors.
Username: Clinton101
Password : Clint
Hint: You can use the given part of an SQL query conditions below under login button. ^_^
Make your own layout. Do not copy my own (basic) design! ^_^
COPY AND PASTE THE DATABASE ACCESS FILE TO YOUR VB PROJECT(INSIDE DEBUG FOLDER)
---------------------------------
---------------------------- CREATE A MODULE ---------------------------- ----------------------------------------------------- ADD THE GIVEN CODE BELOW -----------------------------------------------------
Code:
===============================================
Public Sub deletedata()
con.Open()
Dim rs As New OleDb.OleDbCommand("Delete from emp where Empid= '" & _
txtid.Text & "'", con)
rs.ExecuteNonQuery()
con.Close()
displaydata()
End Sub =========================================================
NEXT Result Code under delete button :
Dim message As String = MsgBox(" Are you sure you want to permanently delete the selected record(s)? ", MsgBoxStyle.YesNo, "Delete")
If message = DialogResult.Yes Then
deletedata()
MsgBox(txtid.Text & " has been deleted!")
'tO CLEAR TEXTBOX
txtid.Text = ""
txtfirstname.Text = ""
txtlastname.Text = ""
txtposition.Text = ""
txtsalaryfrom.Text = ""
txtno_of_days.Text = ""
txtsalaryperday.Text = ""
txtbonus.Text = ""
txtdeduction.Text = ""
displaydata() ' to display all the data
Else
End If
=========================================================
Printing data from a database
To print the data from the database table
we need a seperate program. We'll be working with "Crystal Reports" to do this!
------------------------------------------------------------------
Since the continuation of your task is too complex, instead of giving the right steps using multiple images, I decided to create a video tutorial on how to print the data from our data source.
Feel free to watch the video below!
-----------------------------------------------------------------
========================================================== PRINTING SPECIFIC RECORD ============================ ------------------------------ watch this video tutorial below. This is the continuation of your task on how to print specific data using parameter field . -------------------------------
------------------------------------------- ------------------------ CODER UNDER PRINT ---------------------- Dim report1 As New CrystalReport2 report1.SetParameterValue("empid", txtid.Text) report1.SetParameterValue("firstname", txtfirstname.Text) report1.SetParameterValue("lastname", txtlastname.Text) report1.SetParameterValue("salaryfrom", txtsalaryfrom.Text) report1.SetParameterValue("no_of_days", txtno_of_days.Text) report1.SetParameterValue("salaryperday", txtsalaryperday.Text) report1.SetParameterValue("bonus", txtbonus.Text) report1.SetParameterValue("deductions", txtdeduction.Text) report1.SetParameterValue("grossSalary", lblgross.Text)