private void btnEdit_Click(object sender, EventArgs e) { Sub sub = (Sub)bindSrcSubs.List[bindSrcSubs.Position]; SubForm ft = new SubForm(sub); if (ft.ShowDialog() == DialogResult.OK) { bindSrcSubs.List[bindSrcSubs.Position] = sub; } }
private void btnAdd_Click(object sender, EventArgs e) { Sub sub = new Sub(); SubForm ft = new SubForm(sub); if (ft.ShowDialog() == DialogResult.OK) { bindSrcSubs.Add(sub); } }