//検索ボタン private void m_selectBtn_Click(object sender, EventArgs e) { m_System_List.Clear(); DISP_dataSet dset = new DISP_dataSet(); Dictionary <string, string> param_dict = new Dictionary <string, string>(); Class_Detaget dg = new Class_Detaget(); if (m_selecttext.Text != "") { if (this.m_selectKoumoku.SelectedIndex.ToString() != "") { switch (this.m_selectKoumoku.SelectedIndex) { //システム通番 case 0: param_dict["systemno"] = m_selecttext.Text; break; //システム名 case 1: param_dict["systemname"] = m_selecttext.Text; break; //システム名カナ case 2: param_dict["systemkana"] = m_selecttext.Text; break; //ステータス case 3: param_dict["status"] = m_selecttext.Text; break; //備考 case 4: param_dict["biko"] = m_selecttext.Text; break; //カスタマ通番 case 5: param_dict["userno"] = m_selecttext.Text; break; //更新日時 case 6: DateTime dt; String str = m_selecttext.Text; //入力された日付の形式の確認 if (DateTime.TryParse(str, out dt)) { param_dict["chk_date"] = str; } else { MessageBox.Show("日付の形式が正しくありません。", "拠点検索"); return; } break; //更新者 case 7: param_dict["chk_name_id"] = m_selecttext.Text; break; default: break; } } } //システム一覧を取得する dset = dg.getSelectSystem(param_dict, con, dset, true); this.splitContainer1.SplitterDistance = 180; this.m_System_List.FullRowSelect = true; this.m_System_List.HideSelection = false; this.m_System_List.HeaderStyle = ColumnHeaderStyle.Clickable; this.m_System_List.Columns.Insert(0, "No", 30, HorizontalAlignment.Left); this.m_System_List.Columns.Insert(1, "システム名", 200, HorizontalAlignment.Left); this.m_System_List.Columns.Insert(2, "システム名カナ", 200, HorizontalAlignment.Left); this.m_System_List.Columns.Insert(3, "カスタマ通番", 90, HorizontalAlignment.Left); this.m_System_List.Columns.Insert(4, "カスタマ名", 200, HorizontalAlignment.Left); this.m_System_List.Columns.Insert(5, "ステータス", 50, HorizontalAlignment.Left); this.m_System_List.Columns.Insert(6, "備考", 200, HorizontalAlignment.Left); this.m_System_List.Columns.Insert(7, "更新日時", 120, HorizontalAlignment.Left); this.m_System_List.Columns.Insert(8, "更新者", 50, HorizontalAlignment.Left); //リストに表示 if (dset.system_L != null) { foreach (systemDS s_ds in dset.system_L) { ListViewItem itemx1 = new ListViewItem(); itemx1.Text = s_ds.systemno; itemx1.SubItems.Add(s_ds.systemname); itemx1.SubItems.Add(s_ds.systemkana); itemx1.SubItems.Add(s_ds.userno); itemx1.SubItems.Add(s_ds.username); itemx1.SubItems.Add(s_ds.status); itemx1.SubItems.Add(s_ds.biko); itemx1.SubItems.Add(s_ds.chk_date); itemx1.SubItems.Add(s_ds.chk_name_id); this.m_System_List.Items.Add(itemx1); } } }