public ActionResult DeletePromotionParticipant(PromotionParticipantViewModel viewModel)
        {
            if (viewModel.KeyID != null)
            {
                viewModel.TaskID = viewModel.DecryptKeyValue();
            }

            try
            {
                models.ExecuteCommand("delete PDQTask where TaskID = {0}", viewModel.TaskID);
                return(Json(new { result = true }));
            }
            catch (Exception ex)
            {
                ApplicationLogging.CreateLogger <PromotionController>().LogError(ex, ex.Message);
                return(Json(new { result = false, message = "點數已兌換,無法刪除!!" }));
            }
        }
        public ActionResult DeletePromotionParticipant(PromotionParticipantViewModel viewModel)
        {
            if (viewModel.KeyID != null)
            {
                viewModel.TaskID = viewModel.DecryptKeyValue();
            }

            try
            {
                models.ExecuteCommand("delete PDQTask where TaskID = {0}", viewModel.TaskID);
                return(Json(new { result = true }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                return(Json(new { result = false, message = "點數已兌換,無法刪除!!" }, JsonRequestBehavior.AllowGet));
            }
        }