Forum Xamarin Xamarin.Forms

Comparing data from SQLite database

NewtonEinherjarNewtonEinherjar Member ✭✭
edited September 2019 in Xamarin.Forms

Hello, guys! I'm working on a stock and sales project, so I need to check if a product quantity from the entry entQtde is avaliable by getting the amount in stock and comparing with the desired quantity. The verification would happen when the button btnSell is clicked. Here's my product class:

    public class Produto
        [PrimaryKey, AutoIncrement]
        public int ProdId { get; set; }
        public string ProdNome { get; set; }
        public string ProdMarca { get; set; }
        public int ProdQtde { get; set; }
        public string ProdDesc { get; set; }
        public string ProdFornecedor { get; set; }
        public decimal ProdRSCompra { get; set; }
        public decimal ProdRSVenda { get; set; }
        public string ProdEspecifica { get; set; }

I appreciate any help, thanks in advance!

Best Answer


  • NewtonEinherjarNewtonEinherjar Member ✭✭
    edited September 2019

    Thank you so much, LeonLu! It's working, now I just need to make it remove the product from the stock, but thanks anyway! Just tell me, please, can I use this same logic to get the respective price? i.e. Produtos[0].ProdPrice

Sign In or Register to comment.