public ActionResult PayAllConfirm(int id) { try { // Finding the sold products from the table that are confirmed as paid List <ISoldProductModel> sold = soldProductData.GetByTable(id); // Moving in the database the sold products to a table of all sold products accomplished MainMenuHelper.PaySoldProducts(sold, soldProductData, soldProductAccomplishedData); //Set the table to empty ITableModel table = tableData.FindById(id); table.Occupied = false; tableData.Update(table); } catch (Exception ex) { log.Error("Could't load sold products or tables from Database", ex); return(View("ErrorRetriveData")); } return(RedirectToAction("Tables")); }