public async Task <ActionResult> DeleteFeedback(int feedbackId)
        {
            var operationdetails = await _feedbackService.DeleteFeedback(feedbackId);

            Log.Information($"Feedback {feedbackId} is deleted");
            return(Ok(operationdetails));
        }
Пример #2
0
        public IActionResult Delete([FromQuery] int?[] id = null)
        {
            var result   = _feedbackService.DeleteFeedback(id);
            var response = new ApiResponse <bool>(result);

            return(Ok(response));
        }
Пример #3
0
        public JsonResult DeleteFeedback(int feedbackId)
        {
            var result = _feedbackService.DeleteFeedback(feedbackId);

            return(Json(new
            {
                success = result
            }));
        }
Пример #4
0
        public void Delete(int id)
        {
            var feedback = feedbackService.GetFeedback(id);

            if (feedback == null)
            {
                throw new Exception("No feedback with id: " + id);
            }
            feedbackService.DeleteFeedback(id);
        }
Пример #5
0
        public ActionResult DeleteRecord(int id)
        {
            var feedBack = _feedbackService.GetFeedback(id);

            if (feedBack != null)
            {
                _feedbackService.DeleteFeedback(id);
            }

            return(RedirectToAction("CarrierFeedbacks", "Feedback", new { id = feedBack?.CarrierId }));
        }
Пример #6
0
 public IActionResult DeleteFeedback(FeedbackViewModel feedbackViewModel)
 {
     try
     {
         _feedbackService.DeleteFeedback(feedbackViewModel.Id);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View("ExceptionView"));
     }
 }
        public async Task <HttpResponseMessage> DeleteFeedback(
            [HttpTrigger(AuthorizationLevel.Function, "delete", Route = "Deliveries/{id}/Feedback")] HttpRequest req, string id)
        {
            string token = req.Headers["Authorization"].ToString().Replace("Bearer ", "");

            if (_authorizationsService.IsTokenValid(token, true))
            {
                var result = await _feedbackService.DeleteFeedback(Guid.Parse(id));

                return(result == true
                    ? new HttpResponseMessage(HttpStatusCode.OK)
                    : new HttpResponseMessage(HttpStatusCode.BadRequest));
            }
            // Authorized access only
            return(new HttpResponseMessage(HttpStatusCode.Unauthorized));
        }
 public IActionResult Delete(FeedbackDetailsViewModel feedbackDetailsViewModel)
 {
     try
     {
         _feedbackService.DeleteFeedback(feedbackDetailsViewModel.Id);
         return(RedirectToAction("Index"));
     }
     catch (ResourceNotFoundException e)
     {
         return(View("ResourceNotFound"));
     }
     catch (Exception e)
     {
         return(View("ExceptionPage"));
     }
 }
Пример #9
0
 public ActionResult Delete(int id)
 {
     try
     {
         var feedback = _feedbackService.GetFeedbackById(id);
         if (feedback == null)
         {
             return(RedirectToAction("List"));
         }
         _feedbackService.DeleteFeedback(id);
         SuccessNotification("Delete successfully.");
         return(RedirectToAction("List"));
     }
     catch (Exception e)
     {
         ErrorNotification("Deleted failed");
         return(RedirectToAction("List"));
     }
 }
Пример #10
0
        public ActionResult Delete(int?filterByArticleId, int id)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageFeedbacks))
            {
                return(AccessDeniedView());
            }

            var topic = _feedbackService.GetFeedbackById(id);

            if (topic == null)
            {
                //No topic found with the specified id
                return(Json(new { Result = false }));
            }

            _feedbackService.DeleteFeedback(topic);

            NotifySuccess(_localizationService.GetResource("Admin.ContentManagement.Feedbacks.Deleted"));


            return(Json(new { Result = true }));
        }
Пример #11
0
        public ActionResult Delete(int id)
        {
            var feedback = feedbackService.GetFeedback(id);

            if (feedback != null)
            {
                var fdvalue = feedbackService.GetFeedbackValueByFeedbackId(feedback.Id);
                foreach (var item in fdvalue)
                {
                    feedbackValueService.DeleteFeedbackValue(item.Id);
                }

                feedbackValueService.SaveFeedbackValue();
                feedbackService.DeleteFeedback(id);
                feedbackService.SaveFeedback();
                formService.DeleteForm(id);
                formService.SaveForm();
                return(RedirectToAction("Index"));
            }


            return(RedirectToAction("Index"));
        }
Пример #12
0
 public IActionResult DeleteAnswer(int feedbackId)
 {
     _feedbackService.DeleteFeedback(feedbackId);
     return(Ok());
 }