Ejemplo n.º 1
0
        /// <summary>
        ///  Updates command value information of a selected asynchronous task
        /// </summary>
        /// <param name="parameterValue">Asynchronous Parameter Values</param>
        private void UOC_UpdateTaskCommand(ApsParameterValue parameterValue)
        {
            ApsReturnValue returnValue = new ApsReturnValue();

            this.ReturnValue = returnValue;

            ApsLayerD layerD = new ApsLayerD(this.GetDam());

            layerD.UpdateTaskCommand(parameterValue, returnValue);
        }
        /// <summary>
        ///  Updates the command of selected task
        /// </summary>
        /// <param name="taskID">Task ID</param>
        /// <param name="commandId">Command ID</param>
        /// <param name="returnValue">user parameter value</param>
        /// <param name="dam">BaseDam</param>
        public static void UpdateTaskCommand(int taskID, int commandId, ApsReturnValue returnValue, BaseDam dam)
        {
            // Sets parameters of AsyncProcessingServiceParameterValue to update the command of selected task.
            ApsParameterValue parameterValue = new ApsParameterValue(
                "AsyncProcessingService", "UpdateTaskCommand", "UpdateTaskCommand", "SQL",
                new MyUserInfo("AsyncProcessingService", "AsyncProcessingService"));

            parameterValue.TaskId    = taskID;
            parameterValue.CommandId = commandId;

            // Calls data access part of asynchronous processing service.
            ApsLayerD layerD = new ApsLayerD(dam);

            layerD.UpdateTaskCommand(parameterValue, returnValue);
        }