예제 #1
0
        public static List <Customer> GetList()
        {
            var list = new List <Customer>();

            db.ReaderRows(db.ReturnCommand("select * from tbCustomer"), row => list.Add(new Customer(AccountDAO.GetById((uint)row[0]), (string)row[1], (string)row[2], (string)row[3], row[4] + "")));
            return(list);
        }
예제 #2
0
        public static Customer GetByCPF(string cpf)
        {
            var row = db.ReaderRow(db.ReturnCommand($"select * from tbcustomer where custcpf = '{cpf}'"));

            return(new Customer(AccountDAO.GetById((uint)row[0]), (string)row[1], (string)row[2], (string)row[3], row[4] + ""));
        }