public static List <Review> GetReviews() { List <Review> lsRev = new List <Review>(); foreach (var item in RRBusinessLogic.GetAllReviews()) { lsRev.Add((Review)item); } return(lsRev); }
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); }
public static List <Restaurant> GetRestaurants() { List <Restaurant> lsRest = new List <Restaurant>(); foreach (var item in RRBusinessLogic.GetAllRestaurants()) { lsRest.Add((Restaurant)item); } return(lsRest); }
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); }
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); }
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); }
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(); }
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(); } }
public static void DeleteRevInDB(string sRestName, decimal dRating, string sSummary) { RRBusinessLogic.DeleteRevInDB(sRestName, dRating, sSummary); }
public static void UpdateRevInDB(string sRestName, string sAddress, decimal dRating, string sSummary) { RRBusinessLogic.UpdateRevInDB(sRestName, sAddress, dRating, sSummary); }
public static void InsertRevIntoDB(string sRestName, string sAddress, decimal dRating, string sRevSummary, int iFk_RId) { RRBusinessLogic.InsertRevIntoDB(sRestName, sAddress, dRating, sRevSummary, iFk_RId); }
public static void AddRestaurant(string sRestName, string sAddress) { RRBusinessLogic.InsertRestIntoDB(sRestName, sAddress); }
public static void UpdateRestaurant(string sRestName, string sAddress) { RRBusinessLogic.UpdateRestInDB(sRestName, sAddress); }
public static void DeleteRestaurant(string sRestName) { RRBusinessLogic.DeleteRestInDB(sRestName); }