Exemplo n.º 1
0
        /// <summary>
        ///  Updates the command of selected task
        /// </summary>
        /// <param name="taskID">Task ID</param>
        /// <param name="commandId">Command ID</param>
        /// <param name="userReturnValue">user parameter value</param>
        private void UpdateTaskCommand(int taskID, int commandId, AsyncProcessingServiceReturnValue userReturnValue)
        {
            // Sets parameters of AsyncProcessingServiceParameterValue to update the command of selected task.
            AsyncProcessingServiceParameterValue asyncParameterValue = new AsyncProcessingServiceParameterValue("AsyncProcessingService", "UpdateTaskCommand", "UpdateTaskCommand", "SQL",
                                                                                                                new MyUserInfo("AsyncProcessingService", "AsyncProcessingService"));

            asyncParameterValue.TaskId    = taskID;
            asyncParameterValue.CommandId = commandId;

            // Calls data access part of asynchronous processing service.
            LayerD myDao = new LayerD(this.GetDam(this.DamKeyforAMT));

            myDao.UpdateTaskCommand(asyncParameterValue, userReturnValue);
        }
Exemplo n.º 2
0
        /// <summary>
        ///  Resumes asynchronous process in the middle of the processing.
        /// </summary>
        /// <param name="taskID">Task ID</param>
        /// <param name="userReturnValue">asynchronous return value</param>
        private void ResumeProcessing(int taskID, AsyncProcessingServiceReturnValue userReturnValue)
        {
            // Sets parameters of AsyncProcessingServiceParameterValue to resume asynchronous process in the middle of the processing.
            AsyncProcessingServiceParameterValue asyncParameterValue = new AsyncProcessingServiceParameterValue("AsyncProcessingService", "UpdateTaskCommand", "UpdateTaskCommand", "SQL",
                                                                                                                new MyUserInfo("AsyncProcessingService", "AsyncProcessingService"));

            asyncParameterValue.TaskId    = taskID;
            asyncParameterValue.CommandId = 0;

            // Calls data access part of asynchronous processing service.
            LayerD myDao = new LayerD(this.GetDam(this.DamKeyforAMT));

            myDao.UpdateTaskCommand(asyncParameterValue, userReturnValue);
        }