Exemplo n.º 1
0
        // Menu where is the list of all areas with its corresponding tables
        public ActionResult Tables()
        {
            try
            {
                // Joining list of areas and tables to a single model
                mainPageModel.Areas  = areaData.GetAll().OrderBy(x => x.Name).ToList();
                mainPageModel.Tables = tableData.GetAll().OrderBy(x => x.NumberOfTable).ToList();
            }
            catch (Exception ex)
            {
                log.Error("Could't load areas or tables from Database", ex);
                return(View("ErrorRetriveData"));
            }

            return(View(mainPageModel));
        }
Exemplo n.º 2
0
 // Lists all products
 public ActionResult Index()
 {
     try
     {
         return(View(productData.GetAll().OrderBy(x => x.Name)));
     }
     catch (Exception ex)
     {
         log.Error("Could't load products from Database", ex);
         return(View("ErrorRetriveData"));
     }
 }
Exemplo n.º 3
0
 // Lists all tables
 public ActionResult Index()
 {
     try
     {
         return(View(tableData.GetAll().OrderBy(x => x.NumberOfTable)));
     }
     catch (Exception ex)
     {
         log.Error("Could't load tables from Database", ex);
         return(View("ErrorRetriveData"));
     }
 }
Exemplo n.º 4
0
 // GET: api/Tables
 public List <ITableModel> Get()
 {
     return(tableData.GetAll());
 }
Exemplo n.º 5
0
 // GET: api/Products
 public List <IProductModel> Get()
 {
     return(productData.GetAll());
 }