0
그룹 상자에 라디오 버튼이 있습니다.C#을 사용하여 데이터베이스에서 라디오 버튼 값을 가져 오는 방법
O 레벨 1
O 레벨 2
어떻게 데이터베이스에서 값을로드하고 내 GUI에 라디오 botton을 확인할 수 있습니다?
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();
}
미리 감사드립니다.
UI 어떤 종류의, 창 형태, asp.net을? –
라디오 버튼을 바인딩하려는 데이터의 종류는 무엇입니까? 비트, 문자열, 정수 열입니까? –
@BrianMains applications from application – NOGRP90