0

Hi,

i am trying to build Employee Attendance system and was successful in assigning TAGS to employees.now i want to calculate in/out timings of employees and which TAG swapped His/Her TAG without displaying any data to end user. i had tried basic sql query but seems to be not working.

Please Help.

code i am using for saving and assigning Tags to employees is as follows :

SqlConnection con = new SqlConnection(str);
                con.Open();
                SqlCommand cmd = new SqlCommand("insert into EmpTable(TagID,Firstname,Lastname,Title) values (@TagID,@Firstname,@Lastname,@Title)", con);
              //   cmd.Parameters.AddWithValue("@EmpID", txtempid.Text);
                  cmd.Parameters.AddWithValue("@TagID", txttagid.Text);
                cmd.Parameters.AddWithValue("@Firstname", txtfirstname.Text);
                cmd.Parameters.AddWithValue("@Lastname", txtlastname.Text);
                cmd.Parameters.AddWithValue("@Title", txttitle.Text);
                cmd.ExecuteNonQuery();
                MessageBox.Show("Data Saved.");
                con.Close();

Edited by Dani: Moved to Programming forum

2
Contributors
1
Reply
21
Views
4 Months
Discussion Span
Last Post by rproffitt
0

So many questions.

I used bar code readers to do similar but you claim this is to be done without display to the user.

I see no sign how you would tell if they are leaving or arriving. What does you design document say about that?
(Did you design this before you wrote code?)

Edited by rproffitt: Spelling

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.