Beispiel #1
0
        public void DeleteFavorite(PhoneCall phoneCall)
        {
            SQLiteConnection conn        = new SQLiteConnection(DB_PATH);
            FavoriteDB       newfavorite = new FavoriteDB()
            {
                Name        = phoneCall.Name,
                PhoneNumber = phoneCall.PhoneNumber
            };

            conn.Delete <FavoriteDB>(newfavorite.PhoneNumber);
        }
Beispiel #2
0
        public void UpdateFavorite(PhoneCall phoneCall)
        {
            SQLiteConnection conn        = new SQLiteConnection(DB_PATH);
            FavoriteDB       newfavorite = new FavoriteDB()
            {
                Name            = phoneCall.Name,
                PhoneNumber     = phoneCall.PhoneNumber,
                CallDateTimeStr = phoneCall.CallDateTimeStr
            };

            conn.Update(newfavorite);
        }
Beispiel #3
0
        public void AddFavorite(PhoneCall phoneCall)
        {
            SQLiteConnection conn        = new SQLiteConnection(DB_PATH);
            FavoriteDB       newfavorite = new FavoriteDB()
            {
                Name            = phoneCall.Name,
                PhoneNumber     = phoneCall.PhoneNumber,
                CallDateTimeStr = phoneCall.CallDateTimeStr
            };

            conn.Insert(newfavorite);

            //this.retrieveFavorites();
        }