Exemplo n.º 1
0
        //Delete Data Operation

        public bool RemoveTable(UserInfoLocal localuserinfo)
        {
            try
            {
                using (var connection = new SQLiteConnection(System.IO.Path.Combine(folder, "UserInfoLocal.db")))
                {
                    connection.Delete(localuserinfo);
                    return(true);
                }
            }
            catch (SQLiteException ex)
            {
                Log.Info("SQLiteEx", ex.Message);
                return(false);
            }
        }
Exemplo n.º 2
0
        //Edit Operation

        public bool UpdateTable(UserInfoLocal localuserinfo)
        {
            try
            {
                using (var connection = new SQLiteConnection(System.IO.Path.Combine(folder, "UserInfoLocal.db")))
                {
                    connection.Query <UserInfoLocal>("UPDATE UserInfoLocal set IsLogin=?, UserInfoId=? Where Id=?", localuserinfo.IsLogin, localuserinfo.UserInfoId, localuserinfo.Id);
                    return(true);
                }
            }
            catch (SQLiteException ex)
            {
                Log.Info("SQLiteEx", ex.Message);
                return(false);
            }
        }