Exemplo n.º 1
0
        public void Cleanup()
        {
            List <Order> orders = db_order.FindOrderByUsername(user.Username);

            foreach (Order order in orders)
            {
                db_order.DeleteOrder(order.Id);
            }

            db_user.DeleteUser(user.Username);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Deletes an order.
        /// </summary>
        /// <param name="id"></param>
        /// <param name="call_origin"></param>
        /// <returns>string</returns>
        public string Delete(int id, string call_origin)
        {
            string result;

            result = db_order.DeleteOrder(id);

            return(result);
        }
Exemplo n.º 3
0
        public void Cleanup()
        {
            //Deletes test products
            foreach (Product product in products)
            {
                db_product.DeleteProduct(product.Id);
            }

            //Deletes test orders
            foreach (Order order in orders)
            {
                db_order.DeleteOrder(order.Id);
            }

            //Deletes test userproduct
            foreach (OrderDetail order_detail in orderdetails)
            {
                db_orderdetail.DeleteOrderDetail(order_detail);
            }

            db_user.DeleteUser(user.Username);
        }