Beispiel #1
0
        public HttpResponseMessage Get(string id)
        {
            if (id == "0")

            {
                TemplateWithData templateWithData = new TemplateWithData();
                //mr.MaterialRequisitionId = id;

                return(Request.CreateResponse(HttpStatusCode.OK, templateWithData));
            }
            else
            {
                var templateWithData = _templateWithData.Get(id);
                if (templateWithData != null)
                {
                    return(Request.CreateResponse(HttpStatusCode.OK, templateWithData));
                }
                return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "UserTrip not found for provided id."));
            }
        }
Beispiel #2
0
        // [Route("edit/{BlockId}")]

        public HttpResponseMessage Put([FromBody] TemplateWithData templateWithData)
        {
            // department.DepId =department.ObjectId;
            _templateWithData.Update(templateWithData);
            return(Request.CreateResponse(HttpStatusCode.OK, templateWithData));
        }
Beispiel #3
0
 public HttpResponseMessage Post([FromBody] TemplateWithData templateWithData)
 {
     templateWithData.TmlWDataId = "";
     _templateWithData.Insert(templateWithData);
     return(Request.CreateResponse(HttpStatusCode.OK, templateWithData));
 }