private void btnEdit_Click(object sender, EventArgs e) { Pass pass = (Pass)bindSrcPass.List[bindSrcPass.Position]; PassForm ft = new PassForm(pass); if (ft.ShowDialog() == DialogResult.OK) { bindSrcPass.List[bindSrcPass.Position] = pass; } }
private void btnAdd_Click(object sender, EventArgs e) { Pass pass = new Pass(); PassForm ft = new PassForm(pass); if (ft.ShowDialog() == DialogResult.OK) { bindSrcPass.Add(pass); } }