private void UpdateAnnualClick(object sender, EventArgs e) { this.Hide(); FormUpdateAnnual frUpAn = new FormUpdateAnnual(dataConnection, isAdmin); frUpAn.Show(); frUpAn.Disposed += fr_Disposed; }
private void EditButton_Click(object sender, EventArgs e) { int index = checkedListBox1.CheckedIndices[0]; int idToShow = ids[index]; bool isAnnual = isAnnuals[index]; this.Hide(); if (isAnnual) { FormUpdateAnnual fr = new FormUpdateAnnual(dataConnection, idToShow); fr.Show(); fr.Disposed += fr_Disposed; } else { FormUpdateEvent fr = new FormUpdateEvent(dataConnection, idToShow); fr.Show(); fr.Disposed += fr_Disposed; } }