Esempio n. 1
0
        public OrderL(string x, string site)
        {
            LocationL location = new LocationL();

            CustomerLocation = location.FindLocationByName(x);
            Site             = location.FindLocationByName(site);
            TotalCost        = GetTotalCost();
            GetLocationDough(site);

            if (!CheckIfAnyPizzas())
            {
                throw new Exception("Add a pizza will ya.");
            }
            CheckIfStockLeft();

            EFData ef = new EFData();

            ef.AddOrder(CustomerLocation, Site, TotalCost);
        }