private void Add_Click(object sender, RoutedEventArgs e) { if (controller.AddInventoryList(this.inventoryList) > 0) { MessageBox.Show("成功"); this.DialogResult = true; } else { MessageBox.Show("失败"); } }