zk attendance device check-in and check-out (In Time - Out Time) - Need Seperated Column
**Check-In and Check-Out _ Time Perfectly Not Work,**
showing same InTime and OutTime - Column
InTime Column work okay, but Out time not to show exactly Check-Out time.
**[How to gain proper check-out time into Out-Time column][1]**
Out Time Coulumn showing In Time [TIME]-that is wrong...
This all program worked with zk-sdk: zkemkeeper
I'm not sure how I implement out time - because of there are only single attendance machine.
How to set check-in and check-out time by textBox.
Thank you.
Result I am expecting is like:
EID = 1, Date = 08/01/2020, CheckIn = 08:00:00, CheckOut = 10:00:00
EID = 1, Date = 08/02/2020, InTime = 08:04:00, OutTime = 10:05:00
EID = 2, Date = 08/01/2020, InTime = 08:10:00, OutTime = 10:15:00
EID = 2, Date = 08/02/2020, InTime = 08:00:00, OutTime = 10:20:00
EID = 3, Date = 08/01/2020, InTime = 10:00:00, OutTime =
EID = 4, Date = 08/01/2020, InTime = 08:00:00, OutTime =
EID = 5, Date = 08/01/2020, InTime = 08:00:00, OutTime =
- private void buttonViewAttendance_Click(object sender, EventArgs e)
- {
- string sdwEnrollNumber = "";
- int idwTMachineNumber = 0;
- int idwVerifyMode = 0;
- int idwInOutMode = 0;
- int idwYear = 0;
- int idwMonth = 0;
- int idwDay = 0;
- int idwHour = 0;
- int idwMinute = 0;
- int idwSecond = 0;
- int idwWorkcode = 0;
- int idwErrorCode = 0;
- int iGLCount = 0;
- int iIndex = 0;
-
- string sName = "";
- string sPassword = "";
- int iPrivilege = 0;
- bool bEnabled = false;
- int idwFingerIndex;
- string sTmpData = "";
- int iTmpLength = 0;
- int iFlag = 0;
- Cursor = Cursors.WaitCursor;
- listView2.Items.Clear();
-
-
- axCZKEM1.EnableDevice(iMachineNumber, false);
- axCZKEM1.ReadAllUserID(iMachineNumber);
-
- if (axCZKEM1.ReadGeneralLogData(iMachineNumber))
- {
- while
- (axCZKEM1.SSR_GetGeneralLogData(
- iMachineNumber,
- out sdwEnrollNumber,
- out idwVerifyMode,
- out idwInOutMode,
- out idwYear,
- out idwMonth,
- out idwDay,
- out idwHour,
- out idwMinute,
- out idwSecond,
- ref idwWorkcode))
- {
- iGLCount++;
- listView2.Items.Add(iGLCount.ToString());
- listView2.Items[iIndex].SubItems.Add(sdwEnrollNumber);
- foreach (ListViewItem item in listView2.Items)
- {
- if (item.SubItems[1].Text == "1")
- {
-
-
- item.SubItems.Add(Text = " " + textBox1st.Text);
- }
- else if (item.SubItems[1].Text == "2")
- {
- item.SubItems.Add(Text = " " + textBox2nd.Text);
- }
- else if (item.SubItems[1].Text == "3")
- {
- item.SubItems.Add(Text = " " + textBox3rd.Text);
- }
- else if (item.SubItems[1].Text == "4")
- {
- item.SubItems.Add(Text = " " + textBox4th.Text);
- }
- else if (item.SubItems[1].Text == "5")
- {
- item.SubItems.Add(Text = " " + textBox5th.Text);
- }
- else if (item.SubItems[1].Text == "6")
- {
- item.SubItems.Add(Text = " " + textBox6th.Text);
- }
- else if (item.SubItems[1].Text == "7")
- {
- item.SubItems.Add(Text = " " + textBox7th.Text);
- }
- else if (item.SubItems[1].Text == "8")
- {
- item.SubItems.Add(Text = " " + textBox8th.Text);
- }
- else
- {
- item.SubItems.Add(Text = "Limited Edition");
- }
- }
- listView2.Items[iIndex].SubItems.Add(idwDay.ToString() + "-" + idwMonth.ToString() + "-" + idwYear.ToString());
- listView2.Items[iIndex].SubItems.Add(idwHour.ToString() + ":" + idwMinute.ToString() + ":" + idwSecond.ToString());
- listView2.Items[iIndex].SubItems.Add(idwHour.ToString() + ":" + idwMinute.ToString() + ":" + idwSecond.ToString());
- foreach (ListViewItem item in listView2.Items)
- {
- if (item.SubItems[4].Text == item.SubItems[5].Text)
- {
- item.SubItems[5].Text.StartsWith(textBoxInTime.Text);
- }
- }
- listView2.Items[iIndex].SubItems.Add("");
- iIndex++;
- }
- }
- else
- {
- Cursor = Cursors.Default;
- axCZKEM1.GetLastError(ref idwErrorCode);
- if (idwErrorCode != 0)
- {
- MessageBox.Show("Reading data from terminal failed,ErrorCode: " + idwErrorCode.ToString(), "Error");
- }
- else
- {
- MessageBox.Show("No data from terminal returns!", "Error");
- }
- }
- axCZKEM1.EnableDevice(iMachineNumber, true);
- Cursor = Cursors.Hand;
- }