public HttpResponseMessage FeedbackAndRating(FeedbackAndRating feedbackRating)
        {
            if ((string.IsNullOrEmpty(feedbackRating.FeedbackMessage)) && (feedbackRating.Stars == null))
            {
                return Request.CreateResponse(HttpStatusCode.BadRequest, string.Format(NotificationMessage.Miss2Param, "Feedback message", "Stars"));
            }

            try
            {
                //Create a feedback and rating record in FeedbackAndRating table
                bool isSuccess = Services.Call.CreateFeedbackAndRating(feedbackRating.CallId, feedbackRating.CustomerId,
                    feedbackRating.SpecialistId, feedbackRating.FeedbackMessage, feedbackRating.Stars);

                if (isSuccess)
                {
                    return Request.CreateResponse(HttpStatusCode.OK, Const.ResponseMessage.RequestSuccessful);
                }
                else
                {
                    return Request.CreateResponse(HttpStatusCode.OK, NotificationMessage.CanNotFindUser);
                }
            }
            catch (Exception e)
            {
                Log.Error("Create a feedback and rating", e);
                return Request.CreateResponse(HttpStatusCode.InternalServerError, e.Message);
            }
        }
        public ActionResult FeedbackAndRating(FeedbackAndRating feedbackRating, Guid specialistId)
        {
            if ((string.IsNullOrEmpty(feedbackRating.FeedbackMessage)) && ((feedbackRating.Stars == null) || (feedbackRating.Stars < 1)))
            {
                return Json(new RequestResult { Status = false, Message = string.Format(Web.Const.NotificationMessage.Miss2Param, "Feedback message", "Stars") });
            }

            try
            {
                //Create a feedback and rating record in FeedbackAndRating table
                bool isSuccess = Services.Call.CreateFeedbackAndRating(feedbackRating.CallId, CurrentUser.Id,
                    feedbackRating.SpecialistId, feedbackRating.FeedbackMessage, feedbackRating.Stars);

                if (isSuccess)
                {
                    return Json(new RequestResult { Status = true, Message = Const.ResponseMessage.RequestSuccessful });
                }
                else
                {
                    return Json(new RequestResult { Status = false, Message = Web.Const.NotificationMessage.CanNotFindUser });
                }
            }
            catch (Exception e)
            {
                Log.Error("Create a feedback and rating", e);
                return Json(new RequestResult { Status = false, Message = e.Message });
            }
        }
 public ActionResult FeedbackAndRating(Guid callId)
 {
     try
     {
         var callLog = Services.Call.Get(callId);
         var feedbackAndRating = new FeedbackAndRating();
         if (callLog != null)
         {
             feedbackAndRating.CallId = callId;
             feedbackAndRating.FeedbackMessage = callLog.Feedback;
             feedbackAndRating.Stars = callLog.Rating;
         }
         return PartialView("FollowUpActions/_GetFeedbackAndRatingPartial", feedbackAndRating);
     }
     catch (Exception e)
     {
         Log.Error("Create a feedback and rating", e);
         return Json(new RequestResult { Status = false, Message = e.Message });
     }
 }