示例#1
0
        public async Task <int> CreatepocketMoney(Data.pocketMoney pocketMoney)
        {
            _sqLiteConnection = await DependencyService.Get <ISQLite>().GetConnection();

            //var db = new ISQLite().Connition;
            int res = _sqLiteConnection.Insert(pocketMoney);
            var x   = 0;

            return(res);
        }
示例#2
0
        public async Task <int> DleatepocketMoney(Data.pocketMoney pocketMoney)
        {
            _sqLiteConnection = await DependencyService.Get <ISQLite>().GetConnection();

            //var db = new ISQLite().Connition;
            var res = _sqLiteConnection.Delete(pocketMoney);

            if (res != null)
            {
                return(res);
            }
            else
            {
                return(0);
            }
            var x = 5;
        }
示例#3
0
        public async Task <int> UpdatepocketMoney(Data.pocketMoney pocketMoney)
        {
            _sqLiteConnection = await DependencyService.Get <ISQLite>().GetConnection();

            var existingpocketMoney = _sqLiteConnection.Query <Data.pocketMoney>("select * from pocketMoney where pocketMoney_id = ?", pocketMoney.pocketMoney_id).FirstOrDefault();

            if (existingpocketMoney != null)
            {
                var res = _sqLiteConnection.Update(pocketMoney);
                return(res);
            }
            else
            {
                var res = 0;
                return(res);
            }
        }