public HttpResponseMessage GetDispatchItems(string orderdetailkey) { DispatchDeliveryDL dl = new DispatchDeliveryDL(); var Details = dl.GetDispatchItems(Guid.Parse(orderdetailkey)); return(Request.CreateResponse(HttpStatusCode.OK, Details, Configuration.Formatters.JsonFormatter)); }
public HttpResponseMessage GetDispatchItemsList() { DispatchDeliveryDL dl = new DispatchDeliveryDL(); List <DeliveryOrderBO> dorder = dl.GetDispatchItemsList(); if (dorder != null) { foreach (var data in dorder) { var Details = new List <DispatchBO>(); Details = dl.GetDispatchItems(data.OrderDetails.OrderDetailKey); data.dispatchdetails = Details; } } return(Request.CreateResponse(HttpStatusCode.OK, dorder, Configuration.Formatters.JsonFormatter)); }