private void Add_Click(object sender, EventArgs e) { warning.Text = $" "; addForm1 form2 = new addForm1(); form2.ShowDialog(); if (form2.isSuccess == true) { if (OrderService.InquireNo(orderList, form2.order.OrderNo) != null) { warning.Text = $"已经存在订单{form2.order.OrderNo}"; } else { OrderService.addOrder(orderList, form2.order); } } this.OrderDataSource.ResetBindings(false); }