Пример #1
0
        public HttpResponseMessage DeleteGynCase(int id)
        {
            SuccessResponse response = new SuccessResponse();

            GynCasesService.DeleteGynCase(id);
            return(Request.CreateResponse(response));
        }
Пример #2
0
        public HttpResponseMessage GetGynCaseByHospital(int hospitalId)
        {
            ItemsResponse <GynCases> response = new ItemsResponse <GynCases>();

            response.Items = GynCasesService.GetGynCaseByHospital(hospitalId);
            return(Request.CreateResponse(response));
        }
Пример #3
0
        public HttpResponseMessage GetGynCase(int id)
        {
            ItemResponse <GynCases> response = new ItemResponse <GynCases>();

            response.Item = GynCasesService.GetGynCase(id);
            return(Request.CreateResponse(response));
        }
Пример #4
0
        public HttpResponseMessage GetGynCaseList()
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

            ItemsResponse <GynCases> response = new ItemsResponse <GynCases>();

            response.Items = GynCasesService.GetGynCaseList();
            return(Request.CreateResponse(response));
        }
Пример #5
0
        public HttpResponseMessage ModifyGynCase(GynCasesUpdateRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

            SuccessResponse response = new SuccessResponse();

            GynCasesService.ModifyGynCase(model);
            return(Request.CreateResponse(response));
        }
Пример #6
0
        public HttpResponseMessage AddGynCase(GynCasesAddRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }
            //string userId = HttpContext.Current.User.Identity.GetUserId();
            ItemResponse <int> response = new ItemResponse <int>();

            response.Item = GynCasesService.CreateGynCase(model);
            return(Request.CreateResponse(response));
        }