Exemple #1
0
        //[WebGet(ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
        public bool SavePOEResult(List <SavePOEResultRequest> request)
        {
            // var loggedInUser = UserData.GetCurrentUser();

            try
            {
                FeedbackBL feedbackBl = new FeedbackBL();

                int index = 0;
                foreach (var req in request)
                {
                    // req.LoggedInUserName = loggedInUser.UserName;
                    //req.LoggedInUserId = loggedInUser.UserId;
                    feedbackBl.SaveResult(req, request.Count, index);
                    index++;
                }
                return(true);
            }
            catch (Exception e)
            {
                WebOperationContext.Current.OutgoingResponse.StatusCode        = HttpStatusCode.PreconditionFailed;
                WebOperationContext.Current.OutgoingResponse.StatusDescription = e.Message;
            }
            return(true);
        }
        public bool SavePOEResult(List <SavePOEResultRequest> request)
        {
            try
            {
                FeedbackBL feedbackBl = new FeedbackBL();

                int index = 0;
                foreach (var req in request)
                {
                    feedbackBl.SaveResult(req, request.Count, index);
                    index++;
                }
                return(true);
            }
            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, "SavePOEResult", e.Message, 0);
            }
            return(true);
        }