예제 #1
0
        public async Task <TaskSchedulesResult> GetItemsAsync(string SessionKey, int CompanyId)
        {
            return(await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token =>
            {
                var result = (await taskScheduleProcessor.GetAsync(new TaskScheduleSearch {
                    CompanyId = CompanyId,
                }, token)).ToList();

                return new TaskSchedulesResult
                {
                    ProcessResult = new ProcessResult {
                        Result = true
                    },
                    TaskSchedules = result,
                };
            }, logger));
        }
예제 #2
0
 public async Task <ActionResult <IEnumerable <TaskSchedule> > > GetItems(TaskScheduleSearch option, CancellationToken token)
 => (await taskScheduleProcessor.GetAsync(option, token)).ToArray();