Anarchosa Posted October 28, 2021 Share Posted October 28, 2021 Yukarıdaki resimdeki gibi her groupbox içinde radio buton var ve ben kullanıcının hangisini seçtiğini bilemem seçilenin ismini alıp dataya yazmak istiyorum.bunu nasıl yapabilirim? Aşağıda biraz uğraştım ancak yinede size sormak istiyorum. string depremrisk = ""; try { OleDbConnection baglanti = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=sistem1.mdb"); OleDbCommand komutt = new OleDbCommand(); baglanti.Open(); komutt.Connection = baglanti; komutt.CommandText = "INSERT into fema set Bina_isim='" + bina_isim.Text + "',Bina_adres='" + bina_adres.Text + "',pafta='" + bina_pafta.Text + "',yasi='" + bina_yasi.Text + "',kac_kat='" + kac_kat.Text + "',kategori='" + deprem.Text + "',maps_x='" + xkor.Text + "',maps_y='" + ykor.Text + "',combo='" + combo_yapi_denetim.Text + '", if (radio_risk_dusuk.Checked) { depremrisk = radio_risk_dusuk.Text; } else if (radio_risk_orta.Checked) { depremrisk = radio_risk_orta.Text; } else if (radio_risk_yuksek.Checked) { depremrisk = radio_risk_yuksek.Text; } komutt.ExecuteNonQuery(); baglanti.Close(); } catch (Exception Hata) { MessageBox.Show("Listeye Gerekli Bilgiler Eklenmeden İşlem Yapamassınız"); } Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted October 28, 2021 Editor Share Posted October 28, 2021 Please register to see this content. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.