public WorkerBase(LogWriter logger, ILogin login, TaskSchedule task, ApplicationControl appControl = null, DataExpression expression = null) { this.logger = logger; Login = login; Setting = task; if (appControl != null) { AppControl = appControl; } if (expression != null) { DataExpression = expression; } History = new TaskScheduleHistory { CompanyId = login.CompanyId, ImportType = task.ImportType, ImportSubType = task.ImportSubType, StartAt = DateTime.Now /* get DB Server timestamp */ }; }
public async Task <TaskScheduleHistoryResult> SaveAsync(string SessionKey, TaskScheduleHistory history) { return(await authorizationProcess.DoAuthorizeAsync(SessionKey, async token => { var result = await taskScheduleHistoryProcessor.SaveAsync(history, token); return new TaskScheduleHistoryResult { ProcessResult = new ProcessResult { Result = true }, TaskScheduleHistoryList = new List <TaskScheduleHistory> { result }, }; }, logger)); }
public Task <TaskScheduleHistory> AddAsync(TaskScheduleHistory history, CancellationToken token = default(CancellationToken)) { var query = @" INSERT INTO [dbo].[TaskScheduleHistory] ( [CompanyId] , [ImportType] , [ImportSubType] , [StartAt] , [EndAt] , [Result] , [Errors]) OUTPUT inserted.* VALUES (@CompanyId , @ImportType , @ImportSubType , @StartAt , @EndAt , @Result , @Errors) "; return(dbHelper.ExecuteAsync <TaskScheduleHistory>(query, history, token)); }
public ViewData(TaskScheduleHistory taskScheduleModel, PH0501.DisplayValueDictionaries dispValue) { Model = taskScheduleModel; DisplayValueDictionaries = dispValue; }
public static TaskScheduleHistoryResult SaveTaskScheduleHistory(ILogin login, TaskScheduleHistory history) => ServiceProxyFactory.Do((TaskScheduleHistoryService.TaskScheduleHistoryServiceClient client) => { var result = client.Save(login.SessionKey, history); return(result); });
public async Task <TaskScheduleHistory> SaveAsync(TaskScheduleHistory history, CancellationToken token = default(CancellationToken)) => await addTaskScheduleHistoryQueryProcessor.AddAsync(history, token);
public async Task <TaskScheduleHistory> Save(TaskScheduleHistory history, CancellationToken token) => await taskScheduleHistoryProcessor.SaveAsync(history, token);