public GetListResponse<ScheduledTask> GetScheduledTaskListFiltered(ScheduledTaskListRequest request)
 {
     try
     {
         return ImardaDatabase.GetList<ScheduledTask>(
             "SPGetScheduledTaskListFiltered",
             request.IncludeInactive,
             request.CompanyID,
             request.OwnerID,
             request.TopN,
             request.StartTime,
             request.ManagerID,
             request.ProgramID,
             request.AnyStatus,
             request.IncludeNewAndQueued,
             request.IncludeSuccessful,
             request.IncludeFailed,
             request.IncludeCancelled
         );
     }
     catch (Exception ex)
     {
         return ErrorHandler.Handle<GetListResponse<ScheduledTask>>(ex);
     }
 }
Exemple #2
0
        public Get360ListResponse<ReportTask> GetReportTaskListFiltered(ReportTaskListRequest request)
        {
            try
            {
                Get360ListResponse<ReportTask> appResponse = null;
                var service = ImardaTaskProxyManager.Instance.IImardaTaskProxy;
                ChannelInvoker.Invoke(delegate(out IClientChannel channel)
                {
                    channel = service as IClientChannel;
                    var stReq = new ScheduledTaskListRequest
                                {
                                    CompanyID = request.CompanyID,
                                    OwnerID = request.OwnerID,
                                    IncludeInactive = request.IncludeInactive,
                                    TopN = request.TopN,
                                    StartTime = request.StartTime,
                                    ManagerID = TaskManagerParameters.ManagerID,
                                    ProgramID = (int) Programs.ReportHandler,
                                    AnyStatus = request.AnyStatus,
                                    IncludeNewAndQueued = request.IncludeNewAndQueued,
                                    IncludeSuccessful = request.IncludeSuccessful,
                                    IncludeFailed = request.IncludeFailed,
                                    IncludeCancelled = request.IncludeCancelled
                                };

                    var response = service.GetScheduledTaskListFiltered(stReq);
                    ErrorHandler.Check(response);
                    appResponse = new Get360ListResponse<ReportTask>(DeserializeReportTask(response.List));
                });
                return appResponse;
            }
            catch (Exception ex)
            {
                return ErrorHandler.Handle<Get360ListResponse<ReportTask>>(ex);
            }
        }