예제 #1
0
 public NorthWindTestStub()
 {
     //Add content
     AddOrder(DateTime.Now, "Patrick", "Road1", "Copenhagen", "None", "2300", "Denmark");
     AddOrder(DateTime.Now, "Stinus", "Road2", "Copenhagen", "None", "2300", "Denmark");
     Categories testCategory = new Categories();
     testCategory.CategoryID=0;
     testCategory.CategoryName = "General";
     testCategory.Description="Visual effects";
     Products testProduct= new Model.Products();
     testCategory.Products.Add(testProduct);
     testProduct.Categories = testCategory;
     testProduct.ProductID = 0;
     testProduct.ProductName ="ITU Wall LED Display";
     Order_Details order_Details = new Order_Details();
     order_Details.Discount = 35.5f;
     order_Details.OrderID = 0;
     order_Details.Orders = orders[0];
     order_Details.Products = testProduct;
     order_Details.Quantity = 4;
     order_Details.UnitPrice = 7000;
     orders[0].Order_Details.Add(order_Details);
     testProduct.Order_Details.Add(order_Details);
     products.Add(testProduct);
 }
예제 #2
0
 public NorthWindTestStub()
 {
     //Add content
     AddOrder(DateTime.Now, "Patrick", "Road1", "Copenhagen", "None", "2300", "Denmark");
     AddOrder(DateTime.Now, "Stinus", "Road2", "Copenhagen", "None", "2300", "Denmark");
     Categories testCategory = new Categories(0, "General", "Visual effects", null);
     Products testProduct = new Model.Products(0, "ITU Wall LED Display", null, null, "", null, null, null, null, false, testCategory);
     testCategory.Products.Add(testProduct);
     Order_Details order_Details = new Order_Details(0, -1, 7000, 4, 35.5f, orders[0], testProduct);
     orders[0].Order_Details.Add(order_Details);
     testProduct.Order_Details.Add(order_Details);
     products.Add(testProduct);
 }
예제 #3
0
파일: Products.cs 프로젝트: Rabka/BDSA2014
 public Products(int newID,string productName, Nullable<int> supplierID, Nullable<int> categoryID, string quantityPerUnit, Nullable<decimal> unitPrice, Nullable<short> unitsInStock, Nullable<short> unitsOnOrder, Nullable<short> reorderLevel, bool discontinued, Categories categories)
 {
     this.Order_Details = new HashSet<Order_Details>();
     this.ProductID = newID;
     this.ProductName = productName;
     this.SupplierID = supplierID;
     this.CategoryID = categoryID;
     this.QuantityPerUnit = quantityPerUnit;
     this.UnitPrice = unitPrice;
     this.UnitsInStock = unitsInStock;
     this.UnitsOnOrder = unitsOnOrder;
     this.ReorderLevel = reorderLevel;
     this.Discontinued = discontinued;
     this.Categories = categories;
 }