public static string CreateTask(Task_Main task) { TaskDataProcessor processor = new TaskDataProcessor(); processor.Task = task; return((string)SqliteHelper.MainDbHelper.RunTransaction(new SqliteHelper.RunTransactionDelegate(processor.InsertTaskToDBTransaction))); }
public static bool DeleteTask(string taskId) { TaskDataProcessor processor = new TaskDataProcessor(); processor.Task = new Task_Main(); processor.Task.Id = taskId; return((bool)SqliteHelper.MainDbHelper.RunTransaction(processor.DeleteTaskTransaction)); }
public static bool ChangeTaskLevel(string taskId, int newLevel) { TaskDataProcessor processor = new TaskDataProcessor(); processor.Task = new Task_Main(); processor.Task.Id = taskId; processor.Task.Level = newLevel; return((bool)SqliteHelper.MainDbHelper.RunTransaction(processor.ChangeTaskLevelTransaction)); }
public static void UpdateDataAfterEndStep(string stepId, string taskId, bool succeed, string message) { TaskDataProcessor processor = new TaskDataProcessor(); processor.Step = new Task_Step(); processor.Step.Id = stepId; processor.Step.TaskId = taskId; processor.Step.StatusType = succeed ? TaskStatusType.Succeed : TaskStatusType.Error; processor.Step.Message = message; }
public static void UpdateDataAfterBeginStep(string stepId, string taskId) { TaskDataProcessor processor = new TaskDataProcessor(); processor.Step = new Task_Step(); processor.Step.Id = stepId; processor.Step.TaskId = taskId; processor.Step.StatusType = TaskStatusType.Running; SqliteHelper.MainDbHelper.RunTransaction(processor.UpdateDataAfterBeginStep); }
public static List <Task_Step> GetWaitingStepsInWaitingTasks(int count) { TaskDataProcessor processor = new TaskDataProcessor(); return(processor.GetWaitingStepsInTasks(count, TaskStatusType.Waiting)); }