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
ahmed elbarbary
NA
1.6k
278.9k
How to get last row attenndance of via zkemkeeper
Apr 3 2019 8:11 PM
How to get last row attenndance of via zkemkeeper ?
I need to get attendance for every user
when make attendance it will pull last record per date today
i cannot do that so i ask
I create windows form and i put timer every second get last attendance per employee
only last row
How to do that please ?
i can only get all rows from log data but cannot get last row based on time per datetoday
//Get all data
ICollection<MachineInfo> lstMachineInfo = manipulator.GetLogData(objZkeeper,
int
.Parse(tbxMachineNumber.Text.Trim()));
public
ICollection<MachineInfo> GetLogData(ZkemClient objZkeeper,
int
machineNumber)
{
string
dwEnrollNumber1 =
""
;
int
dwVerifyMode = 0;
int
dwInOutMode = 0;
int
dwYear = 0;
int
dwMonth = 0;
int
dwDay = 0;
int
dwHour = 0;
int
dwMinute = 0;
int
dwSecond = 0;
int
dwWorkCode = 0;
ICollection<MachineInfo> lstEnrollData =
new
List<MachineInfo>();
objZkeeper.ReadAllGLogData(machineNumber);
while
(objZkeeper.SSR_GetGeneralLogData(machineNumber,
out
dwEnrollNumber1,
out
dwVerifyMode,
out
dwInOutMode,
out
dwYear,
out
dwMonth,
out
dwDay,
out
dwHour,
out
dwMinute,
out
dwSecond,
ref
dwWorkCode))
{
string
inputDate =
new
DateTime(dwYear, dwMonth, dwDay, dwHour, dwMinute, dwSecond).ToString();
MachineInfo objInfo =
new
MachineInfo();
objInfo.MachineNumber = machineNumber;
objInfo.IndRegID =
int
.Parse(dwEnrollNumber1);
objInfo.DateTimeRecord = inputDate;
lstEnrollData.Add(objInfo);
}
return
lstEnrollData;
}
public
class
MachineInfo
{
{
public
int
MachineNumber {
get
;
set
; }
public
int
IndRegID {
get
;
set
; }
public
string
DateTimeRecord {
get
;
set
; }
public
DateTime DateOnlyRecord
{
get
{
return
DateTime.Parse(DateTime.Parse(DateTimeRecord).ToString(
"yyyy-MM-dd"
)); }
}
public
DateTime TimeOnlyRecord
{
get
{
return
DateTime.Parse(DateTime.Parse(DateTimeRecord).ToString(
"hh:mm:ss tt"
)); }
}
}
How to get lastrow from icollection lstMachineInfo
Reply
Answers (
0
)
Looking for Tips for Debugging and Developing web pages
How to data bind gridview(bootsrap Datatable) using jquery