public Form_Cont(Form_Index _form, String wname) { InitializeComponent(); frm1 = _form; workname = wname; SQLiteConnection conn = null; conn = new SQLiteConnection("Data Source=c:/SimpleWork79.sqlite;Version=3;"); conn.Open(); //업무 레이블들 생성 작업 필요 String sql = "select * from Work79 where wname = '" + wname + "'"; SQLiteCommand command = new SQLiteCommand(sql, conn); SQLiteDataReader rdr = command.ExecuteReader(); while (rdr.Read()) { tb_wname.Text = "" + rdr["wname"]; tb_wcon.Text = "" + rdr["wcon"]; tb_wsitu.Text = "" + rdr["wsitu"]; } rdr.Close(); sql = "select * from WorkAdd79 where wname = '" + wname + "'"; command = new SQLiteCommand(sql, conn); SQLiteDataReader rdr2 = command.ExecuteReader(); while (rdr2.Read()) { ListViewItem lvi = new ListViewItem("" + rdr2["wadd"]); // 프로세스 실행 가능 검사 코드 System.IO.FileInfo fi = new System.IO.FileInfo("" + rdr2["wadd"]); if (fi.Exists) { //파일존재 lvi.SubItems.Add("정상"); listView1.Items.Add(lvi); } else { //파일없음 lvi.SubItems.Add("불가"); listView1.Items.Add(lvi); } } rdr2.Close(); }
public Form_Content(Form_Index _form) { InitializeComponent(); frm1 = _form; }