コード例 #1
0
 public static HourInfoList HourFetchInfoList(ITask[] task)
 {
     return(HourService.HourFetchInfoList(
                new HourCriteria
     {
         TaskId = task.Select(row => row.TaskId).ToArray()
     }));
 }
コード例 #2
0
 public static HourInfoList HourFetchInfoList(ITask task)
 {
     return(HourService.HourFetchInfoList(
                new HourCriteria
     {
         TaskId = new[] { task.TaskId }
     }));
 }
コード例 #3
0
 public static HourInfoList HourFetchInfoList(DateTime startDate, DateTime endDate)
 {
     return(HourService.HourFetchInfoList(
                new HourCriteria
     {
         Date = new DateRangeCriteria(startDate, endDate)
     }));
 }
コード例 #4
0
ファイル: MyService.cs プロジェクト: WhiteIsland/epiworx
 public static HourInfoList HourFetchInfoList(DateTime startDate, DateTime endDate)
 {
     return(HourService.HourFetchInfoList(
                new HourCriteria
     {
         UserId = new[] { BusinessPrincipal.GetCurrentIdentity().UserId },
         Date = new DateRangeCriteria(startDate, endDate)
     }));
 }
コード例 #5
0
        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);
        }
コード例 #6
0
        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);
        }
コード例 #7
0
 public static HourInfoList HourFetchInfoList()
 {
     return(HourService.HourFetchInfoList(
                new HourCriteria()));
 }
コード例 #8
0
 public static bool HourDelete(int hourId)
 {
     return(HourService.HourDelete(
                HourService.HourFetch(hourId)));
 }