Prev | Current Page 846 | Next

Frank Zammetti

"Practical DWR 2 Projects"


However, if the remaining number of allocated hours is greater than the number of hours
remaining until the target date, the project is considered late and hence the late.gif image
needs to be shown.
The final condition is if the number of remaining allocated hours equals the number of
hours left until the target date, this project is considered borderline because any slip will result
in it being late, and any time that gets us ahead of schedule makes it OK, so the
borderline.gif image is applicable here.
Methods Pertaining to Timesheets
The next couple of methods deal with timesheets and timesheet items, which are entries in a
user??™s timesheet for a given project on a given day.
getTimesheetItems() The first method we come across is getTimesheetItems(), and it??™s literally
one line of code (albeit one a little more than what??™s generally considered a ???single line???): a call
to the getTimesheetItems() method of the TimesheetItemDAO server object. This method gets
passed the ID of the current user, and the callback does nothing but store the return, which is
an array of TimesheetItem objects, in the timesheetItems field of the timekeeper object. Really,
that??™s it (so simple I didn??™t waste space showing it here)!
getBookedTimeForProjectByDate() The next method is getBookedTimeForProjectByDate(), and it??™s
a method with a relatively long name, but thankfully not a ton of code:
this.


Pages:
834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858