private void InfoAnimalButton_Click(object sender, EventArgs e) { var animal = ((AnimalListItem)AnimalsListBox.SelectedItem).Animal; var form = new AnimalDetailsForm(animal); form.DatabaseChanged += (o, args) => AnimalDataChanged(); form.Show(this); }
private void InfoAnimalButton_Click(object sender, EventArgs e) { if (DeploymentDataGridView.CurrentRow == null) { return; } var item = DeploymentDataGridView.CurrentRow.DataBoundItem as DeploymentDataItem; if (item == null) { return; } var form = new AnimalDetailsForm(item.Animal); form.DatabaseChanged += (o, x) => AnimalDataChanged(); form.Show(this); }
private void InfoAnimalButton_Click(object sender, EventArgs e) { if (DeploymentDataGridView.CurrentRow == null) return; var item = DeploymentDataGridView.CurrentRow.DataBoundItem as DeploymentDataItem; if (item == null) return; var form = new AnimalDetailsForm(item.Animal); form.DatabaseChanged += (o, x) => AnimalDataChanged(); form.Show(this); }