abrufen Ich habe eine Gruppe enthält Radioknöpfe zB.Wie Radio Button-Wert aus der Datenbank mit C#
o Stufe 1
o Stufe 2
Wie kann ich Wert aus der Datenbank laden und überprüfen Radio Botton auf meinem GUI?
private void button_clone_Click(object sender, EventArgs e)
{
try
{
connection.Open();
OleDbCommand command = new OleDbCommand();
command.Connection = connection;
command.CommandText = "SELECT * from PPAPdatabase where [PSW ID]=" + txt_c_PSW_ID.Text + "";
OleDbDataReader dr = null;
dr = command.ExecuteReader();
while (dr.Read())
{
comboBox_PPAP.Text = (dr["Reason"].ToString());
checkedListBox_prodline.Text = (dr["Production Line"].ToString());
checkedListBox_owner.Text = (dr["Owner"].ToString());
txt_comment.Text = (dr["Comment"].ToString());
}
}
catch (Exception ex)
{
MessageBox.Show("An error has occurred: " + ex.Message,
"Important Note",
MessageBoxButtons.OK,
MessageBoxIcon.Error,
MessageBoxDefaultButton.Button1);
}
finally
{
connection.Close();
}
Vielen Dank im Voraus!
Welche Art von UI, Windows Forms, asp.net? –
Um welche Art von Daten möchten Sie den Radiobutton binden? Ist es ein bisschen, String, Integer-Spalte? –
@BrianMains Fenster aus der Anwendung – NOGRP90