15,908,437 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Leila Toumi (Top 19 by date)
Leila Toumi
1-Oct-15 7:17am
View
Thanks a lot Gauri Chodanker it works successfully :)
Leila Toumi
30-Jul-15 9:29am
View
Please see the column "ConfirmedWorkStarted" in the stored procedure output and in the datagridview output , they are not the same!
Leila Toumi
12-Jul-15 10:59am
View
I can't because I have another EventMode like CheckIn, CheckOut, BreakIn and breakOut
Leila Toumi
12-Jul-15 10:53am
View
I want that it calculate the duration between 2 overtimein and overtimeout ana if the employee has an in without out , it displays null in the column of the overtimeduration
Leila Toumi
12-Jul-15 10:19am
View
thanks for your reply but can you give me an example please.
Leila Toumi
10-Jul-15 7:39am
View
thanks for your reply but it gives me wrong value !!
Leila Toumi
25-Jun-15 17:43pm
View
Thanks a lot j snooze :) it works successfully :)
Leila Toumi
25-Jun-15 13:07pm
View
thanks mathi for your reply, can you give me an example please ?
Leila Toumi
25-Jun-15 12:35pm
View
Thanks for your reply, I eliminate the second + but i get the same error !!
the query: MAX( cast(whour as char(4))+':'++cast(wMinute as varchar(2))+':'++cast(wSecond as varchar(2)) ) works successfully but when i put it in the Pivot it gives me the previous error !! any idea please?
Leila Toumi
24-Jun-15 19:42pm
View
Deleted
thanks Maciej Los for your reply but please what if ModeAttendance has tha value 4 witch reference to the OverTimeIn and tha value 5 if OverTimeOut ? I tried to replace in your suggested code the OverTimeIn by 4 and OverTimeOut by 5 but in the time column result it gives me 4 and 5 !! any solution please ?
Leila Toumi
10-Jun-15 5:34am
View
it's not the same question !!
Leila Toumi
9-Jun-15 13:26pm
View
please what if I want to display data from 2 tables (Emp_Attendance and Emp_permissionrequest), i try this sql request but i get a wrong result:
WITH per As
(
SELECT
Emp_PermissionsRequest.EmployeeID,
Emp_Attendance.EmpID,
CAST(Emp_PermissionsRequest._Date As date) As DatePermission,
CAST(Emp_Attendance._Date As date) As DateAttendance,
Emp_PermissionsRequest.StartTime,
Emp_PermissionsRequest.EndTime,
Emp_Attendance.times_IN,
Emp_Attendance.Times_Out,
ROW_NUMBER() OVER (PARTITION BY Emp_PermissionsRequest.EmployeeID, CAST(Emp_PermissionsRequest._Date As date) ORDER BY StartTime) As RNI,
ROW_NUMBER() OVER (PARTITION BY Emp_PermissionsRequest.EmployeeID, CAST(Emp_PermissionsRequest._Date As date) ORDER BY EndTime DESC) As RNO,
ROW_NUMBER() OVER (PARTITION BY Emp_Attendance.EmpID, CAST(Emp_Attendance._Date As date) ORDER BY Times_In) As RNIn,
ROW_NUMBER() OVER (PARTITION BY Emp_Attendance.EmpID, CAST(Emp_Attendance._Date As date) ORDER BY Times_Out DESC) As RNOut
FROM
MST_Employee
inner join Emp_Attendance on Emp_Attendance.EmpID=MST_Employee.ID
inner join Emp_PermissionsRequest on Emp_PermissionsRequest.EmployeeID=MST_Employee.ID
-- dbo.Emp_PermissionsRequest
WHERE
Month(Emp_Attendance._Date) = 6
And
EmployeeID = 35
)
SELECT
EmployeeID,--DateAttendance,
DatePermission,
Max(CASE WHEN RNI = 1 THEN StartTime ELSE Null END) As FirstStartTime,
Max(CASE WHEN RNI = 2 THEN StartTime ELSE Null END) As SecondStartTime,
Max(CASE WHEN RNI = 3 THEN StartTime ELSE Null END) As ThirdStartTime,
Max(CASE WHEN RNI = 4 THEN StartTime ELSE Null END) As LastStartTime,
Max(CASE WHEN RNO = 4 THEN EndTime ELSE Null END) As FirstEndTime,
Max(CASE WHEN RNO = 3 THEN EndTime ELSE Null END) As SeconEndTime,
Max(CASE WHEN RNO = 2 THEN EndTime ELSE Null END) As ThirdEndTime,
Max(CASE WHEN RNO = 1 THEN EndTime ELSE Null END) As LastEndTime,
Max(CASE WHEN RNIn = 1 THEN Times_IN ELSE Null END) As FirstTimesIn,
Max(CASE WHEN RNIn = 2 THEN Times_IN ELSE Null END) As SecondTimesIn,
Max(CASE WHEN RNIn = 3 THEN Times_IN ELSE Null END) As ThirdTimeIN,
Max(CASE WHEN RNIn = 4 THEN Times_IN ELSE Null END) As LastTimeIn,
Max(CASE WHEN RNOut = 4 THEN Times_Out ELSE Null END) As FirstEndTime,
Max(CASE WHEN RNOut = 3 THEN Times_Out ELSE Null END) As SeconEndTime,
Max(CASE WHEN RNOut = 2 THEN Times_Out ELSE Null END) As ThirdEndTime,
Max(CASE WHEN RNOut = 1 THEN Times_Out ELSE Null END) As LastEndTime
FROM
per
GROUP BY
EmployeeID,
DatePermission --DateAttendance-- ,
;
Leila Toumi
9-Jun-15 12:23pm
View
thank you very much :) it works successfully that's what I want to get :)
Leila Toumi
9-Jun-15 5:09am
View
it works, but i need to get this list of successive dates in each date
Leila Toumi
8-Jun-15 14:40pm
View
I tried it but no result
Leila Toumi
6-May-15 10:32am
View
Thanks @John C Rayan it works succesully now i just replace "DrugsValue" by "DrugsValues"
Leila Toumi
6-May-15 10:32am
View
Deleted
Thanks @John C Rayan it works succesully now i just replace "DrugsValue" by "DrugsValues"
Leila Toumi
6-May-15 9:28am
View
when i add my ValueMember which is "ID_Drugs" it works successfully but it insert only the list of the id, and when i add my displaymember which is "DrugsValue" i got the same error: DrugsValue is not a DataColumn or a DataRelation for the table. in my situation i need to insert the value of the checkedlistbox not the id
Leila Toumi
6-May-15 7:33am
View
thanks for your reply. u tried but i got an error: DisplayMember /valueMember is not a DataColumn or a DataRelation for the table !!
Show More