private void btnEdit_Click(object sender, EventArgs e) { Phone phone = (Phone)bindSrcPhone.List[bindSrcPhone.Position]; fAddPhone ft = new fAddPhone(ref phone); if (ft.ShowDialog() == DialogResult.OK) { bindSrcPhone.List[bindSrcPhone.Position] = phone; } }
private void btnAdd_Click(object sender, EventArgs e) { Phone phone = new Phone(); fAddPhone fphone = new fAddPhone(ref phone); if (fphone.ShowDialog() == DialogResult.OK) { bindSrcPhone.Add(phone); } }