Esempio n. 1
0
        public override void OnSwiped(ViewHolder viewHolder, int direction)
        {
            int position = viewHolder.AdapterPosition;

            ListItems.DateList.RemoveAt(position);
            ListItems.TimeList.RemoveAt(position);
            ListItems.CommentList.RemoveAt(position);
            ListItems.PlanList.RemoveAt(position);

            string           dbPath = Path.Combine(Android.OS.Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryDcim).ToString(), "App4no.db");
            SQLiteConnection db     = new SQLiteConnection(dbPath);

            mAdapter.NotifyItemRemoved(position);
            int SwipedId = ListItems.IdList[position];

            db.Query <Stock>("DELETE FROM Items WHERE _id=?", SwipedId);

            ListItems.Syokika();
            Getfromdb();
        }