本文整理汇总了C#中Stock.AddStockItem方法的典型用法代码示例。如果您正苦于以下问题:C# Stock.AddStockItem方法的具体用法?C# Stock.AddStockItem怎么用?C# Stock.AddStockItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stock
的用法示例。
在下文中一共展示了Stock.AddStockItem方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
public void Init()
{
i1 = new StockItem ("BMAC56790", "Propelling Pencil", "Supply Master", "1.49", "10", "20");
i3 = new StockItem ("BMAC56780", "Propelling Pencil", "Supply Master", "1.49", "10", "20");
i4 = new StockItem ("BMAC56770", "Propelling Pencil", "Supply Master", "1.49", "10", "20");
stock_list = new Stock();
stock_list.AddStockItem(i1.StockCode, i1);
stock_list.AddStockItem(i3.StockCode, i3);
stock_list.AddStockItem(i4.StockCode, i4);
}
示例2: Init
public void Init()
{
i1 = new StockItem ("BMAC56790", "Propelling Pencil", "Supply Master", "1.49", "10", "20");
stock_list = new Stock();
stock_list.AddStockItem(i1.StockCode, i1);
stock_control = new StockControl(stock_list);
}
示例3: Init
public void Init()
{
i1 = new StockItem ("BMAC56790", "Propelling Pencil", "Supply Master", "1.49", "10", "20");
stock_list = new Stock();
stock_list.AddStockItem(i1.StockCode, i1);
order_history = new OrderHistory();
DateTime timestamp = DateTime.Now;
o1 = new Order (timestamp, i1.StockCode, i1.Supplier, 10, 10);
order_history.AddOrder (o1);
}