Example #1
0
        //[WebGet(ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
        public List <CreatedFeedback> CreateFeedback(NewFeedbackRequest request)
        {
            try
            {
                FeedbackBL feedbackBl = new FeedbackBL();
                return(feedbackBl.CreateFeedback(request));
            }
            catch (Exception e)
            {
                WebOperationContext.Current.OutgoingResponse.StatusCode        = HttpStatusCode.PreconditionFailed;
                WebOperationContext.Current.OutgoingResponse.StatusDescription = e.Message;
            }

            return(null);
        }
        public List <CreatedFeedback> CreateFeedback(NewFeedbackRequest request)
        {
            try
            {
                FeedbackBL feedbackBl = new FeedbackBL();
                return(feedbackBl.CreateFeedback(request));
            }
            catch (Exception e)
            {
                WebOperationContext.Current.OutgoingResponse.StatusCode        = HttpStatusCode.PreconditionFailed;
                WebOperationContext.Current.OutgoingResponse.StatusDescription = e.Message;
                BusinessLogic.Common.Common common = new BusinessLogic.Common.Common();
                common.CreateErrorLog(0, "CreateFeedback", e.Message, 0);
            }

            return(null);
        }