TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
UNIQUE IT
1.7k
61
3.6k
zk attendance device check-in and check-out (In Time - Out Time)
Sep 28 2020 6:19 AM
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();
//listView2.BeginUpdate();
//axCZKEM1.EnableDevice(iMachineNumber, false);//disable the device
axCZKEM1.EnableDevice(iMachineNumber,
false
);
axCZKEM1.ReadAllUserID(iMachineNumber);
//read all the user information to the memory
//Cursor = Cursors.WaitCursor;
if
(axCZKEM1.ReadGeneralLogData(iMachineNumber))
//read all the attendance records to the memory
{
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);
//modify by Darcy on Nov.26 2009
foreach
(ListViewItem item
in
listView2.Items)
{
if
(item.SubItems[1].Text ==
"1"
)
{
//textBoxEnroll.Text = "Staff-1";
//item.SubItems[6].Text = "AAA";
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());
// Date
listView2.Items[iIndex].SubItems.Add(idwHour.ToString() +
":"
+ idwMinute.ToString() +
":"
+ idwSecond.ToString());
// In-Time
listView2.Items[iIndex].SubItems.Add(idwHour.ToString() +
":"
+ idwMinute.ToString() +
":"
+ idwSecond.ToString());
// Out-Time
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(
""
);
// To performed blank last-column
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
);
//enable the device
Cursor = Cursors.Hand;
}
Reply
Answers (
2
)
Develop application for windows 10 using C#
How to read the data in the .txt file from 4 different paths