//検索ボタン private void m_selectBtn_Click(object sender, EventArgs e) { m_incidentList.Clear(); List <incidentDS> incidentdsList = new List <incidentDS>(); 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["incident_no"] = m_selecttext.Text; break; case 1: if (m_selecttext.Text == "未完了") { param_dict["status"] = "1"; } else if (m_selecttext.Text == "完了") { param_dict["status"] = "0"; } break; case 2: param_dict["mpms_incident"] = m_selecttext.Text; break; case 3: param_dict["s_cube_id"] = m_selecttext.Text; break; case 4: if (m_selecttext.Text == "アラーム検知") { param_dict["incident_type"] = "1"; } else if (m_selecttext.Text == "障害申告") { param_dict["incident_type"] = "2"; } else if (m_selecttext.Text == "問い合わせ") { param_dict["incident_type"] = "3"; } break; case 5: param_dict["content"] = m_selecttext.Text; break; case 6: if (m_selecttext.Text == "有") { param_dict["matflg"] = "1"; } else if (m_selecttext.Text == "無") { param_dict["matflg"] = "0"; } break; case 7: param_dict["matcommand"] = m_selecttext.Text; break; case 8: param_dict["uketukedate"] = m_selecttext.Text; break; case 9: param_dict["tehaidate"] = m_selecttext.Text; break; case 10: param_dict["fukyudate"] = m_selecttext.Text; break; case 11: param_dict["enddate"] = m_selecttext.Text; break; case 12: param_dict["timer"] = m_selecttext.Text; break; case 13: param_dict["kakunin"] = m_selecttext.Text; break; case 14: param_dict["userno"] = m_selecttext.Text; break; case 15: param_dict["systemno"] = m_selecttext.Text; break; case 16: param_dict["siteno"] = m_selecttext.Text; break; case 17: param_dict["hostno"] = m_selecttext.Text; break; //更新日時 case 18: param_dict["chk_date"] = m_selecttext.Text; break; //更新者 case 19: param_dict["chk_name_id"] = m_selecttext.Text; break; default: break; } } } //インシデント一覧を取得する incidentdsList = dg.getIncidentSummary(param_dict, con); this.m_incidentList.FullRowSelect = true; this.m_incidentList.HideSelection = false; this.m_incidentList.HeaderStyle = ColumnHeaderStyle.Clickable; this.m_incidentList.Columns.Insert(0, "超過時間", 100, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(1, "No", 30, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(2, "ステータス", 50, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(3, "MPMSインシデント番号", 90, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(4, "S-cude事例ID", 90, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(5, "インシデント区分", 80, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(6, "インシデント内容(タイトル)", 300, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(7, "MAT対応", 50, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(8, "MAT対応コマンド", 120, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(9, "受付日時", 120, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(10, "手配日時", 120, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(11, "復旧日時", 120, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(12, "完了日時", 120, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(13, "タイマー", 120, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(14, "要確認メッセージ", 50, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(15, "カスタマ番号", 50, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(16, "システム通番番号", 50, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(17, "拠点通番", 50, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(18, "ホスト通番", 50, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(19, "更新日時", 110, HorizontalAlignment.Left); this.m_incidentList.Columns.Insert(20, "更新者", 50, HorizontalAlignment.Left); //リストに表示 if (incidentdsList != null) { foreach (incidentDS s_ds in incidentdsList) { ListViewItem itemx1 = new ListViewItem(); itemx1.Text = s_ds.interval; itemx1.SubItems.Add(s_ds.incident_no); itemx1.SubItems.Add(s_ds.status); itemx1.SubItems.Add(s_ds.mpms_incident); itemx1.SubItems.Add(s_ds.s_cube_id); //インシデントのタイプの取得 if (s_ds.incident_type == "1") { //1:アラーム検知 2:障害申告 3:問い合わせ itemx1.SubItems.Add("アラーム検知"); } else if (s_ds.incident_type == "2") { itemx1.SubItems.Add("障害申告"); } else if (s_ds.incident_type == "3") { itemx1.SubItems.Add("問い合わせ"); } else { itemx1.SubItems.Add(""); } itemx1.SubItems.Add(s_ds.content); if (s_ds.matflg == "1") { itemx1.SubItems.Add("有"); } else { itemx1.SubItems.Add("無"); } itemx1.SubItems.Add(s_ds.matcommand); itemx1.SubItems.Add(s_ds.uketukedate); itemx1.SubItems.Add(s_ds.tehaidate); itemx1.SubItems.Add(s_ds.fukyudate); itemx1.SubItems.Add(s_ds.enddate); itemx1.SubItems.Add(s_ds.timer); itemx1.SubItems.Add(s_ds.kakuninmsg); itemx1.SubItems.Add(s_ds.userno); itemx1.SubItems.Add(s_ds.systemno); itemx1.SubItems.Add(s_ds.siteno); itemx1.SubItems.Add(s_ds.hostno); itemx1.SubItems.Add(s_ds.chk_date); itemx1.SubItems.Add(s_ds.chk_name_id); this.m_incidentList.Items.Add(itemx1); } } }