Exemplo n.º 1
0
        public static ClassPurchases GetSinglePurchase(Dal.Purchases p)
        {
            ClassPurchases cp = new ClassPurchases()
            {
                customer_id = p.customer_id,
                sub_id      = p.sub_id,
                status      = p.status,
                training_id = p.training_id
            };

            return(cp);
        }
Exemplo n.º 2
0
        public static List <ClassPurchases> GetDtoAllPurchases(List <Dal.Purchases> p)
        {
            List <ClassPurchases> DtoPurchase = new List <ClassPurchases>();

            foreach (var item in p)
            {
                ClassPurchases cp = new ClassPurchases()
                {
                    customer_id = item.customer_id,
                    sub_id      = item.sub_id,
                    status      = item.status,
                    training_id = item.training_id
                };
                DtoPurchase.Add(cp);
            }
            return(DtoPurchase);
        }