Example #1
0
        public DTORevenue GetRevenueById(int idrevenue)
        {
            string     query = string.Format("SELECT idrevenue,datecheck,total FROM TableRevenue WHERE idrevenue={0}", idrevenue);
            DataTable  dt    = DataProvider.Instance.ExecuteQuery(query);
            DTORevenue gv    = new DTORevenue(dt.Rows[0]);

            return(gv);
        }
Example #2
0
        public List <DTORevenue> GetListRevenue()
        {
            List <DTORevenue> list  = new List <DTORevenue>();
            string            query = string.Format("SELECT * FROM TableStaff ");
            DataTable         dt    = DataProvider.Instance.ExecuteQuery(query);

            foreach (DataRow item in dt.Rows)
            {
                DTORevenue revenue = new DTORevenue(item);
                list.Add(revenue);
            }
            return(list);
        }