public HttpResponseMessage DeleteGynCase(int id) { SuccessResponse response = new SuccessResponse(); GynCasesService.DeleteGynCase(id); return(Request.CreateResponse(response)); }
public HttpResponseMessage GetGynCaseByHospital(int hospitalId) { ItemsResponse <GynCases> response = new ItemsResponse <GynCases>(); response.Items = GynCasesService.GetGynCaseByHospital(hospitalId); return(Request.CreateResponse(response)); }
public HttpResponseMessage GetGynCase(int id) { ItemResponse <GynCases> response = new ItemResponse <GynCases>(); response.Item = GynCasesService.GetGynCase(id); return(Request.CreateResponse(response)); }
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)); }
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)); }
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)); }