Ejemplo n.º 1
0
        public static List<ShakeList> GetRecentLists()
        {
            List<ShakeList> recentLists = new List<ShakeList>();
            string selectRecentsQuery = string.Format("SELECT * FROM {0} ORDER BY {1} DESC LIMIT {2}", TABLE_NAME, LAST_OPENED_DATE, 5);
            DataTable table = SQLiteLinker.GetDataTable(selectRecentsQuery);

            foreach (DataRow singleRow in table.Rows)
            {
                ShakeList newList = new ShakeList();
                newList.LoadData(singleRow);

                recentLists.Add(newList);
            }

            return recentLists;
        }
Ejemplo n.º 2
0
        public static List<ShakeList> GetAllLists()
        {
            List<ShakeList> allLists = new List<ShakeList>();

            string selectAllQuery = string.Format("SELECT * FROM {0}", TABLE_NAME);
            DataTable table = SQLiteLinker.GetDataTable(selectAllQuery);

            foreach (DataRow singleRow in table.Rows)
            {
                ShakeList newList = new ShakeList();
                newList.LoadData(singleRow);

                allLists.Add(newList);
            }

            return allLists;
        }