Beispiel #1
0
        public HttpResponseMessage SaveGPA(HttpRequestMessage request, int id, double value)
        {
            try
            {
                var initiative = _initiativeService.GetById(id);

                if (initiative == null)
                {
                    return(request.CreateResponse(HttpStatusCode.OK, false));
                }

                initiative.ProvinceLevelGPA = value;

                _initiativeService.Update(initiative);

                _initiativeService.Save();

                return(request.CreateResponse(HttpStatusCode.OK, true));
            }
            catch
            {
                return(request.CreateResponse(HttpStatusCode.OK, false));
            }
        }