public Products(int productID, string productName, Nullable<int> supplierID, Categories category, string quantityPerUnit, Nullable<decimal> unitPrice, Nullable<short> unitsInStock, Nullable<short> unitsOnOrder, Nullable<short> reorderLevel, bool discontinued) { this.ProductID = productID; this.ProductName = productName; this.SupplierID = supplierID; if (category != null) { this.CategoryID = category.CategoryID; this.Categories = category; } this.QuantityPerUnit = quantityPerUnit; this.UnitPrice = unitPrice; this.UnitsInStock = unitsInStock; this.UnitsOnOrder = unitsOnOrder; this.ReorderLevel = reorderLevel; this.Discontinued = discontinued; }
/// <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); }
/// <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(); }