public List <Table> GetAllTables() { try { return(tab_DAO.DB_GetAllTables()); } catch { //add fake tables to the list in case database connection is not working; List <Table> tables = new List <Table>(); Table tab1 = new Table(1, 0); Table tab2 = new Table(2, 0); tables.Add(tab1); tables.Add(tab2); return(tables); } }