Exemple #1
0
        public IActionResult Index(string sortOrder, string searchString)
        {
            string sort   = String.IsNullOrEmpty(sortOrder) ? "title_asc" : sortOrder;
            string search = String.IsNullOrEmpty(searchString) ? "" : searchString;

            ViewData["CurrentSort"]   = sort;
            ViewData["CurrentFilter"] = search;

            var drinks = new DrinksRepo(db).GetAll(sort, search);

            return(View(drinks));
        }
Exemple #2
0
 public ManageSellsForm()
 {
     InitializeComponent();
     this.dr = new DrinksRepo();
     this.sk = new SnacksRepo();
 }