private void bNewFT_Click(object sender, EventArgs e) { FormFT formFT = new FormFT(); formFT.txtFT.Text = ""; formFT.IdFT = 0; if (formFT.ShowDialog() == DialogResult.OK) { dbContext.NewFoulType(formFT.txtFT.Text); } }
private void listBoxFT_DoubleClick(object sender, EventArgs e) { FoulType foulType = (FoulType)listBoxFT.SelectedItem; FormFT formFT = new FormFT(); formFT.IdFT = foulType.Id; formFT.txtFT.Text = foulType.Type; if (formFT.ShowDialog() == DialogResult.OK) { foulType.Type = formFT.txtFT.Text; dbContext.UpdateFoulType(foulType); listBoxFT.Items[listBoxFT.SelectedIndex] = foulType; } UpdateListFT(txtFindFT.Text); }