示例#1
0
        /// <summary>
        /// Updates Async Parameter values to Database through LayerD
        /// </summary>
        /// <param name="asyncParameterValue"></param>
        private void UOC_Update(AsyncProcessingServiceParameterValue asyncParameterValue)
        {
            AsyncProcessingServiceReturnValue asyncReturnValue = new AsyncProcessingServiceReturnValue();

            this.ReturnValue = asyncReturnValue;

            LayerD myDao = new LayerD(this.GetDam());

            myDao.Update(asyncParameterValue, asyncReturnValue);
        }
示例#2
0
        /// <summary>
        /// Inserts Async Parameter values to Database through LayerD
        /// </summary>
        /// <param name="asyncParameterValue"></param>
        public void UOC_Start(AsyncProcessingServiceParameterValue asyncParameterValue)
        {
            // 戻り値クラスを生成して、事前に戻り地に設定しておく。
            AsyncProcessingServiceReturnValue asyncReturnValue = new AsyncProcessingServiceReturnValue();

            this.ReturnValue = asyncReturnValue;

            LayerD myDao = new LayerD(this.GetDam());

            myDao.Insert(asyncParameterValue, asyncReturnValue);
        }
示例#3
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);
        }
示例#4
0
        /// <summary>
        ///  Updates the progress rate in the database.
        /// </summary>
        /// <param name="taskID">asynchronous task id</param>
        /// <param name="progressRate">progress rate</param>
        private void UpdateProgressRate(int taskID, AsyncProcessingServiceReturnValue userReturnValue, decimal progressRate)
        {
            // Sets parameters of AsyncProcessingServiceParameterValue to Update progress rate
            AsyncProcessingServiceParameterValue asyncParameterValue = new AsyncProcessingServiceParameterValue("AsyncProcessingService", "UpdateTaskProgress", "UpdateTaskProgress", "SQL",
                                                                                                                new MyUserInfo("AsyncProcessingService", "AsyncProcessingService"));

            asyncParameterValue.TaskId       = taskID;
            asyncParameterValue.ProgressRate = progressRate;

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

            myDao.UpdateTaskProgress(asyncParameterValue, userReturnValue);
        }
示例#5
0
        /// <summary>
        ///  Get command information from database.
        /// </summary>
        /// <param name="taskID">asynchronous task id</param>
        /// <param name="userReturnValue">asynchronous return value</param>
        private void GetCommandValue(int taskID, AsyncProcessingServiceReturnValue userReturnValue)
        {
            // Sets parameters of AsyncProcessingServiceParameterValue to get command value.
            AsyncProcessingServiceParameterValue asyncParameterValue = new AsyncProcessingServiceParameterValue("AsyncProcessingService", "SelectCommand", "SelectCommand", "SQL",
                                                                                                                new MyUserInfo("AsyncProcessingService", "AsyncProcessingService"));

            asyncParameterValue.TaskId = taskID;

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

            myDao.SelectCommand(asyncParameterValue, userReturnValue);
            userReturnValue.CommandId = (int)userReturnValue.Obj;
        }
示例#6
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);
        }