public OrderDisplay RetrieveOrderDisplay(int orderId) { OrderDisplay orderDisplay = new OrderDisplay(); var addressRepository = new AddressRepository(); if (orderId == 10) { orderDisplay.FirstName = "Bilbo"; orderDisplay.LastName = "Baggins"; orderDisplay.OrderDate = new DateTimeOffset(2014, 04, 14, 10, 00, 00, new TimeSpan(7, 0, 0)); orderDisplay.ShippingAddress = addressRepository.Retrieve(1); } orderDisplay.OrderDisplayItemList = new List <OrderDisplayItem>(); if (orderId == 10) { var orderDisplayItem = new OrderDisplayItem() { ProductName = "Sun Flowers", PurchasePrice = 15.96M, OrderQuantity = 2 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); orderDisplayItem = new OrderDisplayItem() { ProductName = "Rake", PurchasePrice = 6M, OrderQuantity = 1 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); } return(orderDisplay); }
/// <summary> /// Retrieve one order /// </summary> /// <param name="orderId"></param> /// <returns></returns> public OrderDisplay RetrieveOrderDisplay(int orderId) { //create the instance of the Order class //pass in the order id OrderDisplay orderDisplay = new OrderDisplay(); //code that retrieves the defined order fields //temporary hard coded values to return //a populated order if (orderId == 10) { orderDisplay.FirstName = "Glenn"; orderDisplay.LastName = "Danzig"; orderDisplay.OrderDate = new DateTimeOffset(2018, 4, 14, 10, 00, 00, new TimeSpan(7, 0, 0)); orderDisplay.ShippingAddress = new Address() { AddressType = 1, StreetLine1 = "Kitten Town", StreetLine2 = "Kitten Circle", City = "Hoboken", State = "New Jersey", Country = "United States", PostalCode = "666" }; } orderDisplay.orderDisplayItemList = new List <OrderDisplayItem>(); //code that retrieves order item //temporary hard coded items if (orderId == 10) { var orderDisplayItem = new OrderDisplayItem() { ProductName = "Sure Step Kitty Litter", PurchasePrice = 16.99M, OrderQuantity = 2 }; orderDisplay.orderDisplayItemList.Add(orderDisplayItem); orderDisplayItem = new OrderDisplayItem() { ProductName = "Litter Box Scooper", PurchasePrice = 6M, OrderQuantity = 1 }; orderDisplay.orderDisplayItemList.Add(orderDisplayItem); } return(orderDisplay); }
public OrderDisplay RetrieveOrderDisplay(int orderId) { OrderDisplay orderDisplay = new OrderDisplay(); //Code that retrieves the define fields //Temp hardcoded values if (orderId == 10) { orderDisplay.FirstName = "Bilbo"; orderDisplay.LastName = "Baggins"; orderDisplay.OrderDate = new DateTimeOffset(2014, 4, 14, 10, 00, 00, new TimeSpan(7, 0, 0)); orderDisplay.ShippingAddress = new Address() { AddressType = 1, StreetLine1 = "Bag End", StreetLine2 = "Bagshot End", City = "Hobbiton", State = "Shire", Country = "Middle Earth", PostalCode = "144" }; } orderDisplay.orderDisplayItemList = new List<OrderDisplayItem>(); //Code that retrieves order items //Temp hardcoded data if (orderId == 10) { var orderDisplayItem = new OrderDisplayItem() { ProductName = "Sunflowers", PurchasePrice = 15.96M, OrderQuantity = 2 }; orderDisplay.orderDisplayItemList.Add(orderDisplayItem); orderDisplayItem = new OrderDisplayItem() { ProductName = "Rake", PurchasePrice = 6M, OrderQuantity = 1 }; orderDisplay.orderDisplayItemList.Add(orderDisplayItem); } return orderDisplay; }
public OrderDisplay RetrieveOrderDisplay(int orderId) { OrderDisplay orderDisplay = new OrderDisplay(); // Code that retrieves the defined order fields // Temporary hard coded data if (orderId == 10) { orderDisplay.FirstName = "Bilbo"; orderDisplay.LastName = "Baggins"; orderDisplay.OrderDate = new DateTimeOffset(2014, 4, 14, 10, 00, 00, new TimeSpan(7, 0, 0)); orderDisplay.ShippingAddress = new Address() { AddressType = 1, StreetLine1 = "Bag End", StreetLine2 = "Bagshot Row", City = "Hobbiton", State = "Shire", Country = "Middle Earth", PostalCode = "144" }; } orderDisplay.OrderDisplayItemList = new List <OrderDisplayItem>(); // Code that retrieves the order items // Temporary hard coded data if (orderId == 10) { var orderDisplayItem = new OrderDisplayItem() { ProductName = "Sunflowers", PurchasePrice = 15.96M, OrderQuantity = 2 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); orderDisplayItem = new OrderDisplayItem() { ProductName = "Rake", PurchasePrice = 6M, OrderQuantity = 1 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); } return(orderDisplay); }
public OrderDisplay RetrieveOrderDisplay(int orderID) { OrderDisplay orderDisplay = new OrderDisplay(); // temp hardcoded if (orderID == 10) { orderDisplay.FirstName = "Bilbo"; orderDisplay.LastName = "Baggins"; orderDisplay.OrderDate = new DateTimeOffset(2014, TimeSpan.Zero); orderDisplay.ShippingAddress = new Address() { AddressType = 1, StreetLine1 = "Bag End", StreetLine2 = "Bagshot row", City = "Hobbiton", State = "Shire", Country = "Middle Earth", PostalCode = "144" }; } orderDisplay.OrderDisplayItemList = new List <OrderDisplayItem>(); if (orderID == 10) { var orderDisplayItem = new OrderDisplayItem() { ProductName = "Sunflowers", PurchasePrice = 15.95M, OrderItemQuantity = 2 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); orderDisplayItem = new OrderDisplayItem() { ProductName = "Rake", PurchasePrice = 6M, OrderItemQuantity = 1 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); } return(orderDisplay); }
public OrderDisplay RetrieveOrderDisplay(int orderId) { OrderDisplay orderDisplay = new OrderDisplay(); //Temporary hard coded if (orderId == 10) { orderDisplay.FirstName = "Duc"; orderDisplay.LastName = "Mai"; orderDisplay.OrderDate = new DateTimeOffset(2019, 2, 28, 23, 0, 0, TimeSpan.FromHours(+3)); orderDisplay.ShippingAddress = new Address() { AddressType = 1, StreetLine1 = "Bag End", StreetLine2 = "Bagshot row", City = "Quincy", State = "MA", Country = "United States", PostalCode = "02169" }; } orderDisplay.orderDisplayItemList = new List <OrderDisplayItem>(); //Temporary hard coded if (orderId == 10) { var orderDisplayItem = new OrderDisplayItem() { ProductName = "Sunflowers", PurchasePrice = 15.9M, OrderQuantity = 2 }; orderDisplay.orderDisplayItemList.Add(orderDisplayItem); orderDisplayItem = new OrderDisplayItem() { ProductName = "Rake", PurchasePrice = 6M, OrderQuantity = 1 }; orderDisplay.orderDisplayItemList.Add(orderDisplayItem); } return(orderDisplay); }
public OrderDisplay RetrieveOrderDisplay(int OrderId) { var orderDisplay = new OrderDisplay(); if (OrderId == 10) { orderDisplay.FirstName = "Bilbo"; orderDisplay.LastName = "Baggins"; orderDisplay.OrderDate = new DateTimeOffset(2018, 10, 10, 00, 00, 00, new TimeSpan()); orderDisplay.ShippingAddress = new Address() { AddressType = 1, StreetLine1 = "Bad End", StreetLine2 = "Bagshot row", City = "Hobbiton", State = "Shire", Country = "Middle Earth", PostalCode = "144" }; orderDisplay.OrderDisplayItemList = new List <OrderDisplayItem>(); if (OrderId == 10) { var orderDisplayItem = new OrderDisplayItem() { ProductName = "Sunflowers", PurchasePrice = 15.96M, OrderQuantity = 2 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); orderDisplayItem = new OrderDisplayItem() { ProductName = "Rake", PurchasePrice = 6M, OrderQuantity = 1 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); } } return(orderDisplay); }
public OrderDisplay RetrieveOrderDisplay(int orderId) { OrderDisplay orderDisplay = new OrderDisplay(); // Code that retrieves the defined order fields var addressRepository = new AddressRepository(); // Temporary Hard-coded data if (orderId == 10) { orderDisplay.FirstName = "Bilbo"; orderDisplay.LastName = "Baggins"; orderDisplay.OrderDate = new DateTimeOffset(2014, 4, 14, 10, 00, 00, new TimeSpan(7, 0, 0)); orderDisplay.ShippingAddress = addressRepository.Retrieve(1); } orderDisplay.OrderDisplayItemList = new List <OrderDisplayItem>(); // Code that retrieves the order items // Temporary Hard-coded data if (orderId == 10) { var orderDisplayItem = new OrderDisplayItem() { ProductName = "Sunflowers", PurchasePrice = 15.96M, OrderQuantity = 2 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); orderDisplayItem = new OrderDisplayItem() { ProductName = "Rake", PurchasePrice = 6M, OrderQuantity = 1 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); } return(orderDisplay); }
public OrderDisplay RetrieveOrderDisplay(int orderId) { OrderDisplay orderDisplay = new OrderDisplay(); // Code that retrieves the defined order fields var addressRepository = new AddressRepository(); // Temporary Hard-coded data if (orderId == 10) { orderDisplay.FirstName = "Bilbo"; orderDisplay.LastName = "Baggins"; orderDisplay.OrderDate = new DateTimeOffset(2014, 4, 14, 10, 00, 00, new TimeSpan(7, 0, 0)); orderDisplay.ShippingAddress = addressRepository.Retrieve(1); } orderDisplay.OrderDisplayItemList = new List<OrderDisplayItem>(); // Code that retrieves the order items // Temporary Hard-coded data if (orderId == 10) { var orderDisplayItem = new OrderDisplayItem() { ProductName = "Sunflowers", PurchasePrice = 15.96M, OrderQuantity = 2 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); orderDisplayItem = new OrderDisplayItem() { ProductName = "Rake", PurchasePrice = 6M, OrderQuantity = 1 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); } return orderDisplay; }
public OrderDisplay RetrieveOrderDisplay(int orderId) { OrderDisplay orderDisplay = new OrderDisplay(); if (orderId == 10) { orderDisplay.FirstName = "panchal"; orderDisplay.LastName = "parth"; var time = DateTime.Now; orderDisplay.OrderDate = new DateTimeOffset(time); orderDisplay.ShippingAddress = new Address() { AddressType = 1, StreetLine1 = "Bag End", StreetLine2 = "StreetLine2", City = "gdh", State = "Gujrat", Country = "India", PostalCode = "384001" }; } orderDisplay.OrderDisplayItemList = new List <OrderDisplayItem>(); if (orderId == 10) { var orderDisplayItem = new OrderDisplayItem() { ProductName = "toy", PurchasePrice = 50, OrderQuantity = 2 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); orderDisplayItem = new OrderDisplayItem() { ProductName = "toy", PurchasePrice = 50, OrderQuantity = 2 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); } return(orderDisplay); }
public OrderDisplay RetrieveOrderDisplay(int orderId) { OrderDisplay orderDisplay = new OrderDisplay(); if (orderId == 10) { orderDisplay.FirstName = "Zelimir"; orderDisplay.LastName = "Ilic"; orderDisplay.OrderDate = new DateTimeOffset(2018, 2, 14, 10, 00, 00, new TimeSpan(1, 0, 0)); orderDisplay.ShippingAddress = new Address() { AddressType = 1, StreetLine1 = "Majke Jevrosime bb", StreetLine2 = "selo Zuce", City = "Beograd", State = "Srbija", PostalCode = "11000", Country = "Srbija" }; } orderDisplay.OrderDisplayItemList = new List <OrderDisplayItem>(); if (orderId == 10) { var orderDisplayItem = new OrderDisplayItem() { ProductName = "Tulips", PurchasePrice = 12.54M, OrderQuantity = 2 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); orderDisplayItem = new OrderDisplayItem() { ProductName = "Raketa", PurchasePrice = 6M, OrderQuantity = 1 }; orderDisplay.OrderDisplayItemList.Add(orderDisplayItem); } return(orderDisplay); }
public OrderDisplay RetrieveOrderDisplay(int orderId) { OrderDisplay orderDisplay = new OrderDisplay(); if (orderId == 10) { orderDisplay.FirstName = "Zebby"; orderDisplay.ShippingAddress = new Address() { AddressType = 1, StreetLine1 = "27 Lakeside Dr" }; } orderDisplay.orderDisplayItemList = new List <OrderDisplayItem>(); if (orderId == 10) { OrderDisplayItem orderDisplayItem = new OrderDisplayItem() { ProductName = "Sunflowers", OrderQuantity = 5 }; orderDisplay.orderDisplayItemList.Add(orderDisplayItem); orderDisplayItem = new OrderDisplayItem() { ProductName = "Cakes", OrderQuantity = 6 }; orderDisplay.orderDisplayItemList.Add(orderDisplayItem); } return(orderDisplay); }