Beispiel #1
0
 internal void SetPending(AsyncTask asyncTask)
 {
     _status = FlowStatuses.Pending;
     StatusChanged(FlowStatuses.Pending, Id, asyncTask);
 }
Beispiel #2
0
        private static void FlowStatusChanged(FlowStatuses status, int id, AsyncTask task)
        {
            Console.WriteLine("Flow {0} new status {1}", id, status);
            const string sql = @"
              UPDATE    Flow
              SET       Status = @status
              WHERE     Id = @id;";
            var statusParam = new SqlParameter("@status", SqlDbType.NVarChar) { Value = status.ToString() };

            var idParam = new SqlParameter("@id", SqlDbType.Int) { Value = id };

            new DbDao().ExecuteSqlNonQueryRequest(ConnectionString, sql, new[] { statusParam, idParam });

            if (task != null)
            {
                SaveTask(task);
            }
        }
Beispiel #3
0
 internal void SetInProgress(AsyncTask asyncTask)
 {
     _status = FlowStatuses.InProgress;
     StatusChanged(FlowStatuses.InProgress, Id, asyncTask);
 }