Ejemplo n.º 1
0
        //対応状況を取得する
        private void disp_alermList()
        {
            m_taioulist.Clear();
            DISP_dataSet dset = new DISP_dataSet();
            Dictionary <string, string> param_dict = new Dictionary <string, string>();
            Class_Detaget dg = new Class_Detaget();


            param_dict["alertdatetime_Before"] = m_alertdatetime_Before.Value.ToString("yyyy-MM-dd HH:mm");
            param_dict["alertdatetime_After"]  = m_alertdatetime_After.Value.ToString("yyyy-MM-dd HH:mm");
            param_dict["taiou"] = m_taiouchk.Checked.ToString();
            if (m_taiou.Text != "")
            {
                param_dict["opeid"] = m_taiou.Text;
            }


            this.m_taioulist.FullRowSelect = true;
            this.m_taioulist.HideSelection = false;
            this.m_taioulist.HeaderStyle   = ColumnHeaderStyle.Clickable;

            this.m_taioulist.Columns.Insert(0, "No", 30, HorizontalAlignment.Left);
            this.m_taioulist.Columns.Insert(1, "スケジュールタイプ", 90, HorizontalAlignment.Left);
            this.m_taioulist.Columns.Insert(2, "繰り返し区分", 60, HorizontalAlignment.Left);
            this.m_taioulist.Columns.Insert(3, "アラーム日時", 120, HorizontalAlignment.Left);
            this.m_taioulist.Columns.Insert(4, "対応者", 90, HorizontalAlignment.Left);
            this.m_taioulist.Columns.Insert(5, "対応日時", 120, HorizontalAlignment.Left);
            this.m_taioulist.Columns.Insert(6, "タイマーID", 30, HorizontalAlignment.Left);
            this.m_taioulist.Columns.Insert(7, "タイマー名", 120, HorizontalAlignment.Left);
            this.m_taioulist.Columns.Insert(8, "内容", 80, HorizontalAlignment.Left);
            this.m_taioulist.Columns.Insert(9, "カスタマ名", 80, HorizontalAlignment.Left);



            almList = dg.gettaiouRireki(param_dict, con);
            if (almList != null && almList.Count > 0)
            {
                //リストに表示
                foreach (alermDS ads in almList)
                {
                    ListViewItem itemx1 = new ListViewItem();
                    itemx1.Text = ads.schedule_no;


                    //スケジュールタイプ
                    string str = "";
                    if (ads.schedule_type == "1")
                    {
                        str = "インシデント対応";
                    }
                    else if (ads.schedule_type == "2")
                    {
                        str = "定期作業";
                    }
                    else if (ads.schedule_type == "3")
                    {
                        str = "計画作業";
                    }
                    else if (ads.schedule_type == "4")
                    {
                        str = "特別対応";
                    }

                    itemx1.SubItems.Add(str);

                    //繰り返しタイプ //1:1回、2:1時間毎、3:日毎、4:週毎、5:月毎
                    if (ads.repeat_type == "1")
                    {
                        str = "1回";
                    }
                    else if (ads.repeat_type == "2")
                    {
                        str = "時間毎";
                    }
                    else if (ads.repeat_type == "3")
                    {
                        str = "日毎";
                    }
                    else if (ads.repeat_type == "4")
                    {
                        str = "週毎";
                    }
                    else if (ads.repeat_type == "5")
                    {
                        str = "月毎";
                    }
                    itemx1.SubItems.Add(str);

                    itemx1.SubItems.Add(ads.alertdatetime);
                    itemx1.SubItems.Add(ads.opeid);
                    itemx1.SubItems.Add(ads.taioudate);
                    itemx1.SubItems.Add(ads.timerid);
                    itemx1.SubItems.Add(ads.timername);
                    itemx1.SubItems.Add(ads.naiyou);
                    itemx1.SubItems.Add(ads.username);

                    this.m_taioulist.Items.Add(itemx1);
                }
            }
        }