Esempio n. 1
0
 public Order_Details(Orders order, Products product, decimal unitPrice, short quantity, float discount)
 {
     this.OrderID = order.OrderID;
     this.ProductID = product.ProductID;
     this.UnitPrice = unitPrice;
     this.Quantity = quantity;
     this.Discount = discount;
     this.Orders = order;
     this.Products = product;
 }
Esempio n. 2
0
        /// <summary>
        /// Set up the dataclasses to be contained.
        /// </summary>
        public RespiratoryTestStub()
        {
            products = new List<Products>();
            categories = new List<Categories>();
            orders = new List<Orders>();

            Categories category_electronics = new Categories();
            category_electronics.CategoryID = 0;
            Orders order = new Orders();
            order.OrderDate = new DateTime(2014, 10, 2);
            Products product_computer = new Products();
            product_computer.ProductID = 1;
            Order_Details order_details = new Order_Details();
            order_details.Discount = 500;
            order_details.OrderID = 1;
            order_details.Orders = order;
            order_details.ProductID = product_computer.ProductID;
            order_details.Products = product_computer;
            order_details.Quantity = 1;
            order_details.UnitPrice = 4000;
            Customers custommer = new Customers();
            custommer.ContactName = "Niels";
            custommer.CustomerID = "1";
            order.CustomerID = custommer.CustomerID;
            order.Customers = custommer;
            order.OrderID = 1;
            order.Order_Details.Add(order_details);
            product_computer.CategoryID = category_electronics.CategoryID;
            product_computer.Categories = category_electronics;
            product_computer.Order_Details.Add(order_details);
            product_computer.ProductID = 1;
            product_computer.ProductName = "Laptop";
            product_computer.QuantityPerUnit = "0";
            product_computer.ReorderLevel = 0;
            product_computer.UnitsInStock = 2;
            product_computer.UnitsOnOrder = 0;
            products.Add(product_computer);
            orders.Add(order);
            categories.Add(category_electronics);
        }
Esempio n. 3
0
 /// <summary>
 /// Set up the dataclasses to be contained.
 /// </summary>
 /// <param name="products">A array of the Products</param>
 /// <param name="categories">A array of the Categories</param>
 /// <param name="orders">A array of the Orders</param>
 /// <param name="ordersDetails">A array of the OrdersDetails</param>
 public CSVRespiratory(Products[] products, Categories[] categories, Orders[] orders)
 {
     this.products = products.ToList();
     this.categories = categories.ToList();
     this.orders = orders.ToList();
 }
Esempio n. 4
0
 public ProductsBySaleDto(Products product)
 {
     this.product = product;
 }