Beispiel #1
0
        //一覧をダブルクリック
        private void m_templetelist_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ListView.SelectedIndexCollection item = m_templetelist.SelectedIndices;
            templeteDS templetedt = new templeteDS();

            templetedt.templeteno = this.m_templetelist.Items[item[0]].SubItems[0].Text;

            if (this.m_templetelist.Items[item[0]].SubItems[1].Text == "インシデント")
            {
                templetedt.templetetype = "1";
            }
            else if (this.m_templetelist.Items[item[0]].SubItems[1].Text == "タスク(インシデントタスク・計画作業)")
            {
                templetedt.templetetype = "2";
            }

            //templetedt.templetetype = this.m_templetelist.Items[item[0]].SubItems[1].Text;

            templetedt.templetename = this.m_templetelist.Items[item[0]].SubItems[2].Text;
            templetedt.userno       = this.m_templetelist.Items[item[0]].SubItems[3].Text;
            templetedt.title        = this.m_templetelist.Items[item[0]].SubItems[4].Text;


            templetedt.text        = this.m_templetelist.Items[item[0]].SubItems[5].Text;
            templetedt.chk_date    = this.m_templetelist.Items[item[0]].SubItems[6].Text;
            templetedt.chk_name_id = this.m_templetelist.Items[item[0]].SubItems[7].Text;

            getTemplete(templetedt);
        }
Beispiel #2
0
        //タスク区分コンボが変更された時
        private void taskchange()
        {
            //インシデントタスクテンプレートを取得する
            m_templeteCombo.Enabled = true;

            string userno = m_userno.Text;

            m_templeteCombo.DataSource = null;
            Class_Detaget dg = new Class_Detaget();

            templist
                = dg.getTempleteList(userno, "1", con, true);

            //コンボボックス
            DataTable templeteTable = new DataTable();

            templeteTable.Columns.Add("ID", typeof(string));
            templeteTable.Columns.Add("NAME", typeof(string));

            if (templist == null)
            {
                return;
            }

            //空白行を追加
            templeteDS tmp = new templeteDS();

            tmp.templeteno   = "";
            tmp.templetename = "";

            List <templeteDS> temptemplist = new List <templeteDS>();

            temptemplist.Add(tmp);

            //テンプレート情報を取得する
            foreach (templeteDS v in templist)
            {
                DataRow row = templeteTable.NewRow();
                row["ID"]   = v.templeteno;
                row["NAME"] = v.templetename;
                templeteTable.Rows.Add(row);
            }

            //データテーブルを割り当てる
            m_templeteCombo.DataSource    = templeteTable;
            m_templeteCombo.DisplayMember = "NAME";
            m_templeteCombo.ValueMember   = "ID";
            //初期値を反映させる
            templeteSelect();
        }
Beispiel #3
0
        //テンプレート一覧を取得する
        private void getTemplete(templeteDS templetedt)
        {
            this.m_tempno.Text = templetedt.templeteno;
            if (templetedt.templetetype == "1")
            {
                this.m_templete_type_combo.Text = "インシデント";
            }

            else if (templetedt.templetetype == "2")
            {
                this.m_templete_type_combo.Text = "タスク(インシデントタスク・計画作業)";
            }

            this.m_templetename.Text  = templetedt.templetename;
            this.m_userno.Text        = templetedt.userno;
            this.m_title.Text         = templetedt.title;
            this.m_content.Text       = templetedt.text;
            this.m_idlabel.Text       = templetedt.chk_date;
            this.m_labelinputOpe.Text = templetedt.chk_name_id;

            Read_CustomerCombo();
            m_usernameCombo.SelectedValue = templetedt.userno;
        }
Beispiel #4
0
        //タスク区分コンボが変更された時
        private void taskchange()
        {
            if (m_schedule_combo.SelectedItem == null)
            {
                return;
            }
            //1:インシデント
            //2:定期作業
            //3:計画作業
            //4:特別対応

            if (m_schedule_combo.SelectedItem.ToString() == "3:計画作業")
            {
                //計画作業が選択された場合は一覧を取得する
                m_templeteCombo.Enabled = true;

                string userno = m_userno.Text;
                m_templeteCombo.DataSource = null;
                Class_Detaget dg = new Class_Detaget();
                templist
                    = dg.getTempleteList(userno, "2", con, true);

                //コンボボックス
                DataTable templeteTable = new DataTable();
                templeteTable.Columns.Add("ID", typeof(string));
                templeteTable.Columns.Add("NAME", typeof(string));

                if (templist == null)
                {
                    return;
                }

                //空白行を追加
                templeteDS tmp = new templeteDS();
                tmp.templeteno   = "";
                tmp.templetename = "";
                List <templeteDS> templeteDSList = new List <templeteDS>();
                templeteDSList.Add(tmp);

                //テンプレート情報を取得する
                foreach (templeteDS v in templist)
                {
                    DataRow row = templeteTable.NewRow();
                    row["ID"]   = v.templeteno;
                    row["NAME"] = v.templetename;
                    templeteTable.Rows.Add(row);
                }

                //データテーブルを割り当てる
                m_templeteCombo.DataSource    = templeteTable;
                m_templeteCombo.DisplayMember = "NAME";
                m_templeteCombo.ValueMember   = "ID";
                //初期値を反映させる
                templeteSelect();
            }
            else if (m_schedule_combo.SelectedItem.ToString() == "1:インシデント")
            {
                //インシデントが選択された場合は一覧を取得する
                m_templeteCombo.Enabled = true;

                string userno = m_userno.Text;
                m_templeteCombo.DataSource = null;
                Class_Detaget dg = new Class_Detaget();
                templist
                    = dg.getTempleteList(userno, "1", con, true);

                //コンボボックス
                DataTable templeteTable = new DataTable();
                templeteTable.Columns.Add("ID", typeof(string));
                templeteTable.Columns.Add("NAME", typeof(string));

                if (templist == null)
                {
                    return;
                }

                //空白行を追加
                templeteDS tmp = new templeteDS();
                tmp.templeteno   = "";
                tmp.templetename = "";
                List <templeteDS> templeteDSList = new List <templeteDS>();
                templeteDSList.Add(tmp);

                //テンプレート情報を取得する
                foreach (templeteDS v in templist)
                {
                    DataRow row = templeteTable.NewRow();
                    row["ID"]   = v.templeteno;
                    row["NAME"] = v.templetename;
                    templeteTable.Rows.Add(row);
                }

                //データテーブルを割り当てる
                m_templeteCombo.DataSource    = templeteTable;
                m_templeteCombo.DisplayMember = "NAME";
                m_templeteCombo.ValueMember   = "ID";
                //初期値を反映させる
                templeteSelect();
            }
            else
            {
                m_templeteCombo.Enabled = false;
                //m_title.Text = "";
                m_naiyou.Text = "";
                m_templeteCombo.DataSource = null;
            }
        }