コード例 #1
0
 private void addGoodToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (lvSuppliers.SelectedItems.Count > 0)
     {
         GoodForm goodForm = new GoodForm((Supplier)lvSuppliers.SelectedItems[0].Tag);
         goodForm.ShowDialog();
     }
 }
コード例 #2
0
 private void btnAddGood_Click(object sender, EventArgs e)
 {
     if (lvSuppliers.SelectedItems.Count == 0)
     {
         MessageBox.Show("Choose a Supplier");
     }
     else
     {
         var      supplier = (Supplier)lvSuppliers.SelectedItems[0].Tag;
         GoodForm goodForm = new GoodForm(supplier);
         goodForm.ShowDialog();
     }
 }