Page 646 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 646
}
else if (radioButton4.Checked == true)
{
command = "select * from work order by no desc;";
}
else if (radioButton6.Checked == true)
{
command = "select * from work order by whend desc;";
}
else if (radioButton7.Checked == true)
{
command = "select * from work where checkd='YES';";
}
else if (radioButton8.Checked == true)
{
command = "select * from work where checkd='NO';";
}
else
{
command = "select * from work;";
}
listView1.Items.Clear();
try
{
listView1.BeginUpdate();
if (Init_MySQL(ipbox.Text, namebox.Text, idbox.Text, passwdbox.Text))
{
var MConn = new MySqlConnection(strCnn);
MConn.Open();
var Comm = new MySqlCommand(command, MConn);
var myRead = Comm.ExecuteReader();
while (myRead.Read())
{
string[] data = {myRead["no"].ToString(), myRead["keyd"].ToString(),
myRead["checkd"].ToString() , myRead["whend"].ToString()};
- 639 -