private void dgvHastalar_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { _secilenHastaId = Convert.ToInt32(dgvHastalar.SelectedRows[0].Cells[0].Value); if (_secilenHastaId == 0) { return; } _secilenHasta = _hastaService.GetHastaById(_secilenHastaId); txtAd.Text = _secilenHasta.Ad; txtSoyad.Text = _secilenHasta.Soyad; txtTCKimlikNo.Text = _secilenHasta.TCKimlikNo; cbCinsiyet.Text = _secilenHasta.Cinsiyet; txtCepTelefonu.Text = _secilenHasta.CepTel; txtEvTelefonu.Text = _secilenHasta.EvTel; txtKanGrubu.Text = _secilenHasta.KanGrubu; dtpDogumTarihi.Value = (DateTime)_secilenHasta.DogumTarihi; cbil.Text = _secilenHasta.il; cbIlce.Text = _secilenHasta.Ilce; cbKurum.Text = _secilenHasta.Kurumlar.KurumAd; txtAdres.Text = _secilenHasta.Adres; txtAdSoyadRandevu.Text = _secilenHasta.Ad + " " + _secilenHasta.Soyad; }