Пример #1
0
        public List <CoffeeTable> LoadTableList()
        {
            List <CoffeeTable> tableList = new List <CoffeeTable>();
            string             query     = "select * from CoffeeTable";
            DataTable          data      = ConnectDB.Instance.ExecuteQuery(query);

            foreach (DataRow item in data.Rows)
            {
                CoffeeTable table = new CoffeeTable(item);
                tableList.Add(table);
            }

            return(tableList);
        }
Пример #2
0
        public List <CoffeeTable> LoadTableListOrderByTime()
        {
            List <CoffeeTable> tableList = new List <CoffeeTable>();
            string             query     = "SELECT CoffeeTable.* FROM CoffeeTable inner join Invoice on CoffeeTable.tableId = Invoice.tableId" +
                                           " where invoiceStatus=1 order by invoiceId";
            DataTable data = ConnectDB.Instance.ExecuteQuery(query);

            foreach (DataRow item in data.Rows)
            {
                CoffeeTable table = new CoffeeTable(item);
                tableList.Add(table);
            }

            return(tableList);
        }