Esempio n. 1
0
        public static List <Review> GetReviews()
        {
            List <Review> lsRev = new List <Review>();

            foreach (var item in RRBusinessLogic.GetAllReviews())
            {
                lsRev.Add((Review)item);
            }
            return(lsRev);
        }
Esempio n. 2
0
        public static List <Review> GetReviewsForRestaurant(string sRestName)
        {
            List <Review> lsRest = new List <Review>();

            foreach (var item in RRBusinessLogic.GetReviewsForRestaurant(sRestName))
            {
                lsRest.Add((Review)item);
            }
            return(lsRest);
        }
Esempio n. 3
0
        public static List <Restaurant> GetRestaurants()
        {
            List <Restaurant> lsRest = new List <Restaurant>();

            foreach (var item in RRBusinessLogic.GetAllRestaurants())
            {
                lsRest.Add((Restaurant)item);
            }
            return(lsRest);
        }
Esempio n. 4
0
        public static List <Restaurant> GetRestaurantsContaining(string sRestName)
        {
            List <Restaurant> lsRest = new List <Restaurant>();

            foreach (var item in RRBusinessLogic.SearchRestContaining(sRestName))
            {
                lsRest.Add((Restaurant)item);
            }
            return(lsRest);
        }
Esempio n. 5
0
        public static List <Restaurant> SortDescending(List <Restaurant> lsRestaurants)
        {
            List <Restaurant> lsRest = new List <Restaurant>();

            lsRestaurants = GetRestaurants();
            foreach (var item in RRBusinessLogic.SortDescending(ToBL(lsRestaurants)))
            {
                lsRest.Add((Restaurant)item);
            }
            return(lsRest);
        }
Esempio n. 6
0
        public static List <Restaurant> GetTopThreeRestaurants()
        {
            List <Restaurant> lsRest = new List <Restaurant>();

            foreach (var item in RRBusinessLogic.GetTopThreeRestaurants())
            {
                item.calcAverageRating();
                lsRest.Add((Restaurant)item);
            }
            return(lsRest);
        }
Esempio n. 7
0
        static void Main(string[] args)
        {
            List <Restaurant> lsRest = RRBusinessLogic.GetAllRestaurants();

            foreach (var item in lsRest)
            {
                Console.WriteLine(item.Name);
                Console.WriteLine();
            }

            string rest = "Wendys";

            RRBusinessLogic.DeleteRestInDB(rest);

            Console.WriteLine("after delete");

            foreach (var item in lsRest)
            {
                Console.WriteLine(item.Name);
                Console.WriteLine();
            }
            Console.Read();
        }
Esempio n. 8
0
        static void Main(string[] args)
        {
            string iKeepOn = "y";

            RestaurantReviewDisplay.DisplayMenu();
            string iUserInput = Console.ReadLine();

            RRBusinessLogic.ProgramLogic(iUserInput);

            Console.WriteLine();
            Console.WriteLine("Do you wanna continue? (y for yes / n for no)");
            iKeepOn = Console.ReadLine();

            while (iKeepOn == "y")
            {
                RestaurantReviewDisplay.DisplayMenu();
                iUserInput = Console.ReadLine();
                RRBusinessLogic.ProgramLogic(iUserInput);

                Console.WriteLine();
                Console.WriteLine("Do you wanna continue? (y for yes / n for no)");
                iKeepOn = Console.ReadLine();
            }
        }
Esempio n. 9
0
 public static void DeleteRevInDB(string sRestName, decimal dRating, string sSummary)
 {
     RRBusinessLogic.DeleteRevInDB(sRestName, dRating, sSummary);
 }
Esempio n. 10
0
 public static void UpdateRevInDB(string sRestName, string sAddress,
                                  decimal dRating, string sSummary)
 {
     RRBusinessLogic.UpdateRevInDB(sRestName, sAddress, dRating,
                                   sSummary);
 }
Esempio n. 11
0
 public static void InsertRevIntoDB(string sRestName, string sAddress,
                                    decimal dRating, string sRevSummary, int iFk_RId)
 {
     RRBusinessLogic.InsertRevIntoDB(sRestName, sAddress, dRating,
                                     sRevSummary, iFk_RId);
 }
Esempio n. 12
0
 public static void AddRestaurant(string sRestName, string sAddress)
 {
     RRBusinessLogic.InsertRestIntoDB(sRestName, sAddress);
 }
Esempio n. 13
0
 public static void UpdateRestaurant(string sRestName, string sAddress)
 {
     RRBusinessLogic.UpdateRestInDB(sRestName, sAddress);
 }
Esempio n. 14
0
 public static void DeleteRestaurant(string sRestName)
 {
     RRBusinessLogic.DeleteRestInDB(sRestName);
 }