Exemple #1
0
        protected void CancleTask(string device)
        {
            var viewModel = new UpdateWithTaskStateViewModel()
            {
                EquipmentDevice = device,

                TaskStatus = EnumTaskState.BeingCancelled
            };

            var currentTaskState = baseAction.CheckTaskState(device);

            if (currentTaskState != EnumTaskState.Cancle && currentTaskState != EnumTaskState.Complete)
            {
                baseAction._tagTaskState(viewModel);

                var returnData = baseAction.SingleSetTaskState(device);

                viewModel.TaskStatus = returnData;

                baseAction._tagTaskState(viewModel);

                //if (returnData != EnumTaskState.Cancle)
                //{
                ///viewModel.TaskStatus = returnData;

                ///baseAction._tagTaskState(viewModel);
                //}
            }
        }