예제 #1
0
        public static void Main(string[] args)
        {
            Order order1 = new Order("20181016001", "xiaolu");
            Order order2 = new Order("20181016002", "junyi");

            OrderDetails details1 = new OrderDetails("kindle", 1, 2399);
            OrderDetails details2 = new OrderDetails("ipad", 3, 13000);
            OrderDetails details3 = new OrderDetails("iponeX", 2, 20000);

            order1.Items = new List <OrderDetails>();
            order1.Items.Add(details1);
            order1.Items.Add(details2);
            order1.Items.Add(details3);

            order2.Items = new List <OrderDetails>();
            order2.Items.Add(details2);

            OrderService temp = new OrderService();

            temp.Add(order1);
            temp.Add(order2);
            temp.OrderMenu();
        }
예제 #2
0
파일: Program.cs 프로젝트: mistbiu/learngit
        public static void Main(string[] args)
        {
            Order order1 = new Order("10001", "fafa");
            Order order2 = new Order("10002", "lulu");

            OrderDetails details1 = new OrderDetails("酸奶", 1, 10);
            OrderDetails details2 = new OrderDetails("面包", 3, 8);
            OrderDetails details3 = new OrderDetails("牛奶", 2, 5);

            order1.Items = new List <OrderDetails>();
            order1.Items.Add(details1);
            order1.Items.Add(details2);
            order1.Items.Add(details3);

            order2.Items = new List <OrderDetails>();
            order2.Items.Add(details2);

            OrderService temp = new OrderService();

            temp.Add(order1);
            temp.Add(order2);
            temp.OrderMenu();
        }