public HttpResponseMessage GetStatusHoursUnderTheDirectionOfTheTeamLeader(int idTeamLeader, int month) { List <DailyPresence> dailyPresence = LogicDailyPresence.GetDailyPresenceOfUserOfTheTeamLeader(idTeamLeader); double statusHours = 0; foreach (DailyPresence dailyPresenceItem in dailyPresence) { if (dailyPresenceItem.StartDatePresence.Month == month) { statusHours += (dailyPresenceItem.EndDatePresence - dailyPresenceItem.StartDatePresence).TotalHours; } } return(Request.CreateResponse(HttpStatusCode.OK, statusHours)); }
public HttpResponseMessage GetDailyPresenceOfUserOfTheTeamLeader(int idTeamLeader) { return(Request.CreateResponse(HttpStatusCode.OK, LogicDailyPresence.GetDailyPresenceOfUserOfTheTeamLeader(idTeamLeader))); }