public IHttpActionResult GetReservation(string num, string pos, string mode) { try { Reservation reservation = sap.GetReservation(num, pos, mode); if (reservation == null) { return(NotFound()); } return(Ok(reservation)); } catch (Exception e) { return(NotFound()); } }
public void Test_ClientSAP_GetReservation() { ClientSAP sap = new ClientSAP(); Reservation reserv = sap.GetReservation("3052703", "1", "5"); Console.WriteLine("RSNUM = {0}", reserv.RSNUM); Console.WriteLine("RSPOS = {0}", reserv.RSPOS); Console.WriteLine("MATNR = {0}", reserv.MATNR); Console.WriteLine("WERKS = {0}", reserv.WERKS); Console.WriteLine("LGORT = {0}", reserv.LGORT); Console.WriteLine("UMLGO = {0}", reserv.UMLGO); Console.WriteLine("UMWRK = {0}", reserv.UMWRK); Console.WriteLine("BDMNG = {0}", reserv.BDMNG); Console.WriteLine("ENMNG = {0}", reserv.ENMNG); Console.WriteLine("LGOBE = {0}", reserv.LGOBE); Console.WriteLine("MEINS = {0}", reserv.MEINS); Console.WriteLine("BWART = {0}", reserv.BWART); }