Example #1
0
        public String GetOrderDetails(string emailAddress, string orderNumber, IOrderDataServices dataServices)
        {
            // Hit the database, check return value:
            // 2 means order is shipped
            // 1 means order is pending
            // anything else means order not found

            int returnValue;

            returnValue = dataServices.FetchOrder(Convert.ToInt32(orderNumber));

            if (returnValue == 2)
            {
                return("Shipped - Order is on it's way");
            }

            if (returnValue == 1)
            {
                return("Order pending");
            }


            return("Order not found");
        }
Example #2
0
 public OrderController()
 {
     orderDataService      = new OrderDataService();
     this.connectionString = ConfigurationManager.ConnectionStrings[ConfigurationManager.AppSettings["activeConnection"]].ConnectionString;
 }