private void EditStages_Click(object sender, EventArgs e) { if (stagesList.FocusedItem != null) { // Get primary keys ListViewItem firstSelectedItem = stagesList.FocusedItem; DateTime date = Convert.ToDateTime(firstSelectedItem.SubItems[0].Text); string startLocation = firstSelectedItem.SubItems[1].Text; string endLocation = firstSelectedItem.SubItems[2].Text; Stage S = DBLayer.Stages.Read(date, startLocation, endLocation); DialogStages dialog = new DialogStages(E, S); dialog.Show(); } }
private void AddStages_Click(object sender, EventArgs e) { DialogStages dialog = new DialogStages(E); dialog.Show(); }