public IHttpActionResult GetSupply(string post) { try { List <Supply> list_sypply = sap.GetSupply(post); if (list_sypply == null) { return(NotFound()); } return(Ok(list_sypply)); } catch (Exception e) { return(NotFound()); } }
public void Test_ClientSAP_GetSupply() { ClientSAP sap = new ClientSAP(); List <Supply> list_sypply = sap.GetSupply("8000000020"); Console.WriteLine("list_post = {0}", list_sypply.Count()); foreach (Supply p in list_sypply) { Console.WriteLine("vbeln = {0}", p.VBELN); Console.WriteLine("posnr = {0}", p.POSNR); Console.WriteLine("MATNR = {0}", p.MATNR); Console.WriteLine("WERKS = {0}", p.WERKS); Console.WriteLine("LGORT = {0}", p.LGORT); Console.WriteLine("KUNNR = {0}", p.KUNNR); Console.WriteLine("LFIMG = {0}", p.LFIMG); Console.WriteLine("LGOBE = {0}", p.LGOBE); Console.WriteLine("MEINS = {0}", p.MEINS); } }