public static HourInfoList HourFetchInfoList(ITask[] task) { return(HourService.HourFetchInfoList( new HourCriteria { TaskId = task.Select(row => row.TaskId).ToArray() })); }
public static HourInfoList HourFetchInfoList(ITask task) { return(HourService.HourFetchInfoList( new HourCriteria { TaskId = new[] { task.TaskId } })); }
public static HourInfoList HourFetchInfoList(DateTime startDate, DateTime endDate) { return(HourService.HourFetchInfoList( new HourCriteria { Date = new DateRangeCriteria(startDate, endDate) })); }
public static HourInfoList HourFetchInfoList(DateTime startDate, DateTime endDate) { return(HourService.HourFetchInfoList( new HourCriteria { UserId = new[] { BusinessPrincipal.GetCurrentIdentity().UserId }, Date = new DateRangeCriteria(startDate, endDate) })); }
public static Hour HourArchive(int hourId) { var hour = HourService.HourFetch(hourId); if (hour.IsArchived) { return(hour); } hour.IsArchived = true; hour = HourService.HourSave(hour); return(hour); }
public static Hour HourSave(Hour hour) { if (!hour.IsValid) { return(hour); } Hour result; if (hour.IsNew) { result = HourService.HourInsert(hour); } else { result = HourService.HourUpdate(hour); } return(result); }
public static HourInfoList HourFetchInfoList() { return(HourService.HourFetchInfoList( new HourCriteria())); }
public static bool HourDelete(int hourId) { return(HourService.HourDelete( HourService.HourFetch(hourId))); }