public void AddOrder() { try { Console.Write("输入客户名字:"); string ClientName = Convert.ToString(Console.ReadLine()); Console.Write("输入订单号码:"); long Number = long.Parse(Console.ReadLine()); Console.Write("输入苹果数量:"); int AppleNum = Convert.ToInt32(Console.ReadLine()); Console.Write("输入球数量:"); int BallNum = Convert.ToInt32(Console.ReadLine()); Console.Write("输入笔数量:"); int PenNum = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("输入客户的电话号码:"); long phone = long.Parse(Console.ReadLine()); order NewOrder = new order(ClientName, Number, AppleNum, BallNum, PenNum, phone); list.Add(NewOrder); } catch (Exception e) { Console.WriteLine(e.Message); } }
public Form3(OrderService value1, order value) { InitializeComponent(); order3Service = value1; order3 = value; }
//事件处理方法(增加订单的操作) void form2_TransfEvent(order value) { orderOP.list.Add(value); }