private void gridViewPhones_RowCellClick(object sender, RowCellClickEventArgs e) { DoctorPhone phone = new DoctorPhone { Phone = e.CellValue.ToString(), IsActive = true }; doctorPhones.Remove(phone); gridControlPhones.RefreshDataSource(); textEditPhone.Text = e.CellValue.ToString(); }
private void simpleButtonNewPhone_Click(object sender, EventArgs e) { if (doctorPhones.Any(p => p.Phone == textEditPhone.Text.Trim())) { return; } DoctorPhone phone = new DoctorPhone { Phone = textEditPhone.Text.Trim(), IsActive = true }; doctorPhones.Add(phone); gridControlPhones.RefreshDataSource(); textEditPhone.Text = ""; }