Exemplo n.º 1
0
        //タブが変更されたとき
        private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            Class_Detaget dataget = new Class_Detaget();
            Dictionary <string, string> param_dict = new Dictionary <string, string>();
            List <MailaddressDS>        Maillist   = new List <MailaddressDS>();

            if (tabcontrol1.SelectedIndex == 0)
            {
                if (addressList_ope == null)
                {
                    //オペレータが選択されていたとき
                    Maillist        = dataget.selectMailList_ope(param_dict, con);
                    addressList_ope = Maillist;
                    disp_addressList(Maillist, m_operaterList);
                }
            }
            else if (tabcontrol1.SelectedIndex == 1)
            {
                if (addressList_tantou == null)
                {
                    //カスタマ担当者が選択されていたとき
                    Maillist           = dataget.selectMailList_Tantou(param_dict, con);
                    addressList_tantou = Maillist;
                    disp_addressList(Maillist, m_user_tanntouList);
                }
            }
        }
Exemplo n.º 2
0
        //カスタマ一覧を取得する
        private void getcustomer(userDS userdt)
        {
            this.m_userno.Text         = userdt.userno;
            this.m_customerID.Text     = userdt.customerID;
            this.m_username.Text       = userdt.username;
            this.m_username_kana.Text  = userdt.username_kana;
            this.m_username_Ryaku.Text = userdt.username_sum;
            this.m_statusCombo.Text    = userdt.status;

            //元のステータスを保存しておく
            orgStatus = userdt.status;

            this.m_reportCombo.Text = userdt.report_status;
            this.m_biko.Text        = userdt.biko;
            this.m_update.Text      = userdt.chk_date;
            this.m_updateOpe.Text   = userdt.chk_name_id;

            //担当者を取得する
            m_tantouList.Clear();

            Class_Detaget dataget = new Class_Detaget();
            Dictionary <string, string> param_dict = new Dictionary <string, string>();

            param_dict["userno"] = userdt.userno;

            slist = dataget.get_tantouName(param_dict, con);

            //担当者リストを表示
            disp_tantouList();
        }
Exemplo n.º 3
0
        //拠点一覧を取得する
        private void getsite(siteDS sitedt)
        {
            this.m_siteno.Text      = sitedt.siteno;
            this.m_userno.Text      = sitedt.userno;
            this.m_systemno.Text    = sitedt.systemno;
            this.m_systemname.Text  = sitedt.systemname;
            this.m_sitename.Text    = sitedt.sitename;
            this.m_address1.Text    = sitedt.address1;
            this.m_address2.Text    = sitedt.address2;
            this.m_tel.Text         = sitedt.telno;
            this.m_statusCombo.Text = sitedt.status;
            orgStatus             = sitedt.status;
            this.m_biko.Text      = sitedt.biko;
            this.m_update.Text    = sitedt.chk_date;
            this.m_updateOpe.Text = sitedt.chk_name_id;

            Class_Detaget dg = new Class_Detaget();

            dg.con = con;
            if (sitedt.userno != "")
            {
                this.m_cutomername.Text = dg.getCustomername(sitedt.userno);
            }
            if (sitedt.systemno != "")
            {
                this.m_systemname.Text = dg.getSystemname(sitedt.systemno);
            }
        }
Exemplo n.º 4
0
        //担当者名
        private void Form_UserTantouInsert_Load(object sender, EventArgs e)
        {
            m_idlabel.Text       = loginDS.opeid;
            m_labelinputOpe.Text = loginDS.lastname + loginDS.fastname;

            DataTable cutomerTable = new DataTable();

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

            Class_Detaget getuser = new Class_Detaget();

            getuser.con = con;
            userList    = getuser.getUserList();
            if (userList == null)
            {
                return;
            }
            //カスタマ情報を取得する
            foreach (userDS v in userList)
            {
                DataRow row = cutomerTable.NewRow();
                row["ID"]   = v.userno;
                row["NAME"] = v.username;
                cutomerTable.Rows.Add(row);
            }
            //データテーブルを割り当てる
            m_usernameCombo.DataSource    = cutomerTable;
            m_usernameCombo.DisplayMember = "NAME";
            m_usernameCombo.ValueMember   = "ID";

            //選択されているカスタマのNOを表示する
            m_userno.Text = m_usernameCombo.SelectedValue.ToString();
        }
Exemplo n.º 5
0
        //ホスト情報を表示する
        private void gethost(hostDS hostdt)
        {
            this.m_hostno.Text      = hostdt.host_no;
            this.m_userno.Text      = hostdt.userno;
            this.m_systemno.Text    = hostdt.systemno;
            this.m_siteno.Text      = hostdt.siteno;
            this.m_hostname.Text    = hostdt.hostname;
            this.m_settikikiid.Text = hostdt.settikikiid;
            this.m_statusCombo.Text = hostdt.status;

            //元のステータスを保存しておく
            orgStatus = hostdt.status;

            this.m_kisyu.Text  = hostdt.device;
            this.m_locate.Text = hostdt.location;
            this.m_usefor.Text = hostdt.usefor;
            if (hostdt.kansiStartdate == "")
            {
                m_start_date.Checked = false;
            }
            else
            {
                this.m_start_date.Text = hostdt.kansiStartdate;
            }

            if (hostdt.kansiEndsdate == "")
            {
                m_end_date.Checked = false;
            }
            else
            {
                this.m_end_date.Text = hostdt.kansiEndsdate;
            }
            this.m_kanrino.Text   = hostdt.hosyukanri;
            this.m_hosyu.Text     = hostdt.hosyuinfo;
            this.m_biko.Text      = hostdt.biko;
            this.m_update.Text    = hostdt.chk_date;
            this.m_updateOpe.Text = hostdt.chk_name_id;

            Class_Detaget dg = new Class_Detaget();

            dg.con = con;
            if (hostdt.userno != "")
            {
                this.m_cutomername.Text = dg.getCustomername(hostdt.userno);
            }
            //システム情報
            if (hostdt.systemno != "")
            {
                this.m_systemname.Text = dg.getSystemname(hostdt.systemno);
            }
            //拠点名取得
            if (hostdt.siteno != "")
            {
                this.m_sitename.Text = dg.getSitename(hostdt.siteno);
            }
        }
Exemplo n.º 6
0
        //システム名のコンボボックスが変更されたとき拠点情報を読み込む
        private void Read_siteCombo()
        {
            m_siteCombo.DataSource = null;
            m_siteno.Text          = "";
            if (m_systemno.Text == "")
            {
                return;
            }

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

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

            //システム情報を取得する

            if (siteList == null || siteList.Count <= 0)
            {
                try
                {
                    Class_Detaget getuser = new Class_Detaget();

                    //検索
                    List <siteDS> siteDSList = getuser.getSiteList(m_systemno.Text, con, true);

                    //空白行を追加
                    siteDS tmp = new siteDS();
                    tmp.sitename = "";
                    tmp.siteno   = "";
                    List <siteDS> tmpsiteDSList = new List <siteDS>();
                    tmpsiteDSList.Add(tmp);

                    //取得した行を空行についか
                    if (tmpsiteDSList != null)
                    {
                        tmpsiteDSList.AddRange(siteDSList);
                    }

                    m_siteCombo.DataSource    = tmpsiteDSList;
                    m_siteCombo.DisplayMember = "sitename";
                    m_siteCombo.ValueMember   = "siteno";
                    //拠点名ラベルを表示
                    if (siteDSList.Count > 0)
                    {
                        m_siteno.Text = m_siteCombo.SelectedValue.ToString();
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("拠点情報取得に失敗しました。  " + ex.Message, "ホスト登録", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            return;
        }
Exemplo n.º 7
0
        //アドレス
        private void getmailaddress(Dictionary <string, string> param_dict, NpgsqlConnection con)
        {
            m_addressslist.Clear();

            Class_Detaget        dg          = new Class_Detaget();
            List <MailaddressDS> addressList = new List <MailaddressDS>();

            //アドレスを取得3は両方
            addressList = dg.selectMailList(param_dict, con, "3");

            this.m_addressslist.FullRowSelect = true;
            this.m_addressslist.HideSelection = false;
            this.m_addressslist.HeaderStyle   = ColumnHeaderStyle.Clickable;
            this.m_addressslist.Columns.Insert(0, "ユーザ区分", 100, HorizontalAlignment.Left);
            this.m_addressslist.Columns.Insert(1, "ユーザ通番", 50, HorizontalAlignment.Left);
            this.m_addressslist.Columns.Insert(2, "アドレス番号", 50, HorizontalAlignment.Left);
            this.m_addressslist.Columns.Insert(3, "ユーザ名", 150, HorizontalAlignment.Left);
            this.m_addressslist.Columns.Insert(4, "カスタマ名", 150, HorizontalAlignment.Left);
            this.m_addressslist.Columns.Insert(5, "メールアドレス", 250, HorizontalAlignment.Left);
            this.m_addressslist.Columns.Insert(6, "アドレス名", 250, HorizontalAlignment.Left);
            this.m_addressslist.Columns.Insert(7, "更新日時", 120, HorizontalAlignment.Left);
            this.m_addressslist.Columns.Insert(8, "更新者", 120, HorizontalAlignment.Left);

            //リストに表示
            if (addressList != null)
            {
                foreach (MailaddressDS ad_ds in addressList)
                {
                    ListViewItem itemx1   = new ListViewItem();
                    string       kubunstr = "";
                    if (ad_ds.kubun == "1")
                    {
                        kubunstr = "1:オペレータ";
                    }
                    else if (ad_ds.kubun == "2")
                    {
                        kubunstr = "2:カスタマ担当者";
                    }

                    itemx1.Text = kubunstr;
                    itemx1.SubItems.Add(ad_ds.opetantouno);

                    itemx1.SubItems.Add(ad_ds.addressNo);
                    itemx1.SubItems.Add(ad_ds.user_tantou_name);
                    itemx1.SubItems.Add(ad_ds.username);
                    itemx1.SubItems.Add(ad_ds.mailAddress);

                    itemx1.SubItems.Add(ad_ds.addressname);
                    itemx1.SubItems.Add(ad_ds.chk_date);
                    itemx1.SubItems.Add(ad_ds.chk_name_id);

                    this.m_addressslist.Items.Add(itemx1);
                }
            }
        }
Exemplo n.º 8
0
        //検索ボタン
        private void m_selectBtn_Click(object sender, EventArgs e)
        {
            this.m_selectBtn.Enabled = false;
            try
            {
                m_system_list.Rows.Clear();
                m_site_list.Rows.Clear();
                m_host_list.Rows.Clear();
                m_interface_list.Rows.Clear();


                Dictionary <string, string> param_dict = new Dictionary <string, string>();

                Class_Detaget getdata = new Class_Detaget();

                dsp_L = new DISP_dataSet();

                //カスタマ名コンボボックス
                if (m_usernameCombo.Text != "")
                {
                    param_dict["username"] = m_usernameCombo.Text;
                }

                //構成データの取得
                getdata.con = con;
                dsp_L       = getdata.getSelectDataFor_Interface(param_dict, con, dsp_L);


                disp_system(dsp_L);

                disp_site(dsp_L);

                disp_host(dsp_L);

                disp_interface(dsp_L);

                //テンプレートを取得
                taskchange();
            }
            catch (Exception ex)
            {
                MessageBox.Show("構成情報の表示時にエラーが発生しました。" + ex.Message, "構成情報表示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                logger.ErrorFormat("構成情報の表示時にエラーが発生しました。" + ex.Message);
            }
            finally
            {
                this.m_selectBtn.Enabled = true;
            }

            this.m_selectBtn.Enabled = true;
        }
Exemplo n.º 9
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();
        }
Exemplo n.º 10
0
        void Read_hostCombo()
        {
            try
            {
                //ラベルに反映
                if (m_siteCombo.SelectedValue != null)
                {
                    m_siteno.Text = m_siteCombo.SelectedValue.ToString();
                }

                m_hostCombo.DataSource = null;
                m_hostno.Text          = "";

                Class_Detaget getuser = new Class_Detaget();

                //ホスト名を検索
                List <hostDS> hostDSList = getuser.getHostList(m_siteno.Text, con, true);

                //空白行を追加
                hostDS tmp = new hostDS();
                tmp.hostname = "";
                tmp.host_no  = "";
                List <hostDS> tmphostDSList = new List <hostDS>();
                tmphostDSList.Add(tmp);

                //取得した行を空行についか
                if (hostDSList != null)
                {
                    tmphostDSList.AddRange(hostDSList);
                }

                m_hostCombo.DataSource    = tmphostDSList;
                m_hostCombo.DisplayMember = "hostname";
                m_hostCombo.ValueMember   = "host_no";

                //ホスト名ラベルを表示
                if (hostDSList.Count > 0)
                {
                    if (m_hostCombo.Text != "")
                    {
                        m_hostno.Text = m_hostCombo.SelectedValue.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("ホストコンボボックスの一覧を取得することができませんでした。 " + ex.Message, "ホスト情報取得");
            }
        }
Exemplo n.º 11
0
        //表示前処理
        private void Form_TimerInsert_Load(object sender, EventArgs e)
        {
            m_idlabel.Text       = loginDS.opeid;
            m_labelinputOpe.Text = loginDS.lastname + loginDS.fastname;


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

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

            Class_Detaget getuser = new Class_Detaget();

            getuser.con = con;

            //カスタマ名を取得
            userList = getuser.getUserList();

            if (userList == null)
            {
                return;
            }

            //カスタマ情報を取得する
            foreach (userDS v in userList)
            {
                DataRow row = cutomerTable.NewRow();
                row["ID"]   = v.userno;
                row["NAME"] = v.username;
                cutomerTable.Rows.Add(row);
            }

            //データテーブルを割り当てる
            m_usernameCombo.DataSource    = cutomerTable;
            m_usernameCombo.DisplayMember = "NAME";
            m_usernameCombo.ValueMember   = "ID";

            Read_systemCombo();

            //3年以上の期間は入力できない
            m_endDate.MaxDate = DateTime.Now.AddYears(3);

            //利用不可にする
            m_startDate.Enabled = false;
            m_endDate.Enabled   = false;
        }
Exemplo n.º 12
0
        //アドレス
        private void opeAddress()
        {
            m_addressslist.Clear();

            Class_Detaget               dg          = new Class_Detaget();
            List <MailaddressDS>        addressList = new List <MailaddressDS>();
            Dictionary <string, string> param_dict  = new Dictionary <string, string>();

            param_dict["opetantouno"] = m_tantouno.Text;

            //アドレスを取得
            addressList = dg.selectMailList_Tantou(param_dict, con);

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

            this.m_addressslist.Columns.Insert(0, "アドレス番号", 50, HorizontalAlignment.Left);
            this.m_addressslist.Columns.Insert(1, "メールアドレス", 150, HorizontalAlignment.Left);
            this.m_addressslist.Columns.Insert(2, "アドレス名", 150, HorizontalAlignment.Left);
            this.m_addressslist.Columns.Insert(3, "更新日時", 120, HorizontalAlignment.Left);
            this.m_addressslist.Columns.Insert(4, "更新者", 120, HorizontalAlignment.Left);

            //リストに表示
            if (addressList != null)
            {
                foreach (MailaddressDS ad_ds in addressList)
                {
                    ListViewItem itemx1 = new ListViewItem();
                    itemx1.Text = ad_ds.addressNo;

                    itemx1.SubItems.Add(ad_ds.mailAddress);
                    itemx1.SubItems.Add(ad_ds.addressname);
                    itemx1.SubItems.Add(ad_ds.chk_date);
                    itemx1.SubItems.Add(ad_ds.chk_name_id);

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

                //件数表示
                this.m_mail_count.Text = addressList.Count.ToString() + "件";
            }
        }
Exemplo n.º 13
0
        //インターフェイス情報を表示する
        private void getInterface(watch_InterfaceDS interfacedt)
        {
            this.m_interfaceno.Text   = interfacedt.watch_Interfaceno;
            this.m_hostno.Text        = interfacedt.host_no;
            this.m_userno.Text        = interfacedt.userno;
            this.m_systemno.Text      = interfacedt.systemno;
            this.m_siteno.Text        = interfacedt.siteno;
            this.m_interfaceName.Text = interfacedt.interfacename;
            this.m_statusCombo.Text   = interfacedt.status;
            this.m_watchtype.Text     = interfacedt.type;

            this.m_koumoku.Text    = interfacedt.kanshi;
            this.m_sikiiti.Text    = interfacedt.border;
            this.m_addressIP.Text  = interfacedt.IPaddress;
            this.m_addressNAT.Text = interfacedt.IPaddressNAT;
            this.m_biko.Text       = interfacedt.biko;

            this.m_updateOpe.Text = interfacedt.chk_name_id;
            this.m_update.Text    = interfacedt.chk_date;

            Class_Detaget dg = new Class_Detaget();

            dg.con = con;
            if (interfacedt.userno != null && interfacedt.userno != "")
            {
                this.m_cutomername.Text = dg.getCustomername(interfacedt.userno);
            }
            //システム情報
            if (interfacedt.systemno != null && interfacedt.systemno != "")
            {
                this.m_systemname.Text = dg.getSystemname(interfacedt.systemno);
            }
            //拠点名取得
            if (interfacedt.siteno != null && interfacedt.siteno != "")
            {
                this.m_sitename.Text = dg.getSitename(interfacedt.siteno);
            }
            //ホスト名取得
            if (interfacedt.host_no != null && interfacedt.host_no != "")
            {
                this.m_hostname.Text = dg.getHostname(interfacedt.host_no);
            }
        }
Exemplo n.º 14
0
        //表示前処理
        private void Form_IncidentMailSend_Load(object sender, EventArgs e)
        {
            //カスタマ名コンボボックスに表示する値を取得する

            DataTable cutomerTable = new DataTable();

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

            Class_Detaget getuser = new Class_Detaget();

            getuser.con = con;

            //カスタマ名を取得
            userDSList = getuser.getUserList();

            if (userDSList == null)
            {
                return;
            }

            //カスタマ情報を取得する
            foreach (userDS v in userDSList)
            {
                DataRow row = cutomerTable.NewRow();
                row["ID"]   = v.userno;
                row["NAME"] = v.username;
                cutomerTable.Rows.Add(row);
            }

            //データテーブルを割り当てる
            m_usernameCombo.DataSource    = cutomerTable;
            m_usernameCombo.DisplayMember = "NAME";
            m_usernameCombo.ValueMember   = "ID";

            //Read_systemCombo();
            //ラベルに反映
            if (m_usernameCombo.SelectedValue != null)
            {
                m_userno.Text      = m_usernameCombo.SelectedValue.ToString();
                m_cutomername.Text = m_usernameCombo.Text;
            }
        }
Exemplo n.º 15
0
        //ホスト名を読み込む
        private void Read_hostCombo(string siteno)
        {
            m_hostCombo.DataSource = null;
            m_hostno.Text          = "";

            Class_Detaget getuser = new Class_Detaget();

            //ホスト名を検索
            List <hostDS> hostDSList = getuser.getHostList(siteno, con, true);

            m_hostCombo.DataSource    = hostDSList;
            m_hostCombo.DisplayMember = "hostname";
            m_hostCombo.ValueMember   = "host_no";
            //ホスト名ラベルを表示
            if (hostDSList.Count > 0)
            {
                m_hostno.Text = m_hostCombo.SelectedValue.ToString();
            }
        }
Exemplo n.º 16
0
        //カスタマ担当者の表示
        private void user_tanntou_Disp(tantouDS tantoudt)
        {
            m_userno.Text = tantoudt.userno;
            Class_Detaget dg = new Class_Detaget();

            dg.con = con;
            string cusname = dg.getCustomername(tantoudt.userno);

            m_username.Text    = cusname;
            m_tantouno.Text    = tantoudt.user_tantou_no;
            m_tantouname.Text  = tantoudt.user_tantou_name;
            m_tantoukana.Text  = tantoudt.user_tantou_name_kana;
            m_busyoname.Text   = tantoudt.busho_name;
            m_tel1.Text        = tantoudt.telno1;
            m_tel2.Text        = tantoudt.telno2;
            m_statusCombo.Text = tantoudt.status;
            m_yakusyoku.Text   = tantoudt.yakusyoku;
            m_biko.Text        = tantoudt.biko;
            m_update.Text      = tantoudt.chk_date;
            m_updateOpe.Text   = tantoudt.chk_name_id;
        }
Exemplo n.º 17
0
        //表示前
        private void Form_mailTempleteList_Load(object sender, EventArgs e)
        {
            _columnSorter = new Class_ListViewColumnSorter();
            m_mailTempleteList.ListViewItemSorter = _columnSorter;

            List <mailTempleteDS>       templeteList = new List <mailTempleteDS>();
            Dictionary <string, string> param_dict   = new Dictionary <string, string>();
            Class_Detaget dg = new Class_Detaget();

            //メールテンプレートの取得
            templeteList = dg.selectMailtemplete(param_dict, con);
            m_To_list.Columns.Add("アドレス名", 120);
            m_To_list.Columns.Add("アドレス", 120);
            m_To_list.Columns.Add("区分", 20);
            m_Cc_list.Columns.Add("アドレス名", 120);
            m_Cc_list.Columns.Add("アドレス", 120);
            m_Cc_list.Columns.Add("区分", 20);
            m_Bcc_list.Columns.Add("アドレス名", 120);
            m_Bcc_list.Columns.Add("アドレス", 120);
            m_Bcc_list.Columns.Add("区分", 20);

            //インシデントメールの場合
            if (incidentmail_flg)
            {
                m_OK.Enabled = false;
                this.splitContainer1.SplitterDistance = 32;
            }

            m_subject.Text = mailTitle;

            //アカウント
            m_account.Text = System.Configuration.ConfigurationManager.AppSettings["mailsender_address"];

            m_body.Text = mailBody;
            if ((mailTitle == "" || mailTitle == null) && (mailBody == "" || mailBody == null))
            {
                disp_mailtemplete(templeteList);
            }
        }
Exemplo n.º 18
0
        //リストをダブルクリック
        private void m_mailTempleteList_DoubleClick(object sender, EventArgs e)
        {
            if (this.m_mailTempleteList.SelectedItems.Count > 0)
            {
                m_To_list.Clear();
                m_Cc_list.Clear();
                m_Bcc_list.Clear();
                m_To_list.Columns.Add("アドレス名", 120);
                m_To_list.Columns.Add("アドレス", 120);
                m_To_list.Columns.Add("区分", 20);
                m_Cc_list.Columns.Add("アドレス名", 120);
                m_Cc_list.Columns.Add("アドレス", 120);
                m_Cc_list.Columns.Add("区分", 20);
                m_Bcc_list.Columns.Add("アドレス名", 120);
                m_Bcc_list.Columns.Add("アドレス", 120);
                m_Bcc_list.Columns.Add("区分", 20);

                ListView.SelectedIndexCollection item = m_mailTempleteList.SelectedIndices;
                mailTempleteDS maildt = new mailTempleteDS();
                maildt.templateno    = this.m_mailTempleteList.Items[item[0]].SubItems[0].Text;
                maildt.template_name = this.m_mailTempleteList.Items[item[0]].SubItems[1].Text;
                maildt.subject       = this.m_mailTempleteList.Items[item[0]].SubItems[2].Text;
                maildt.body          = this.m_mailTempleteList.Items[item[0]].SubItems[3].Text;
                maildt.account       = this.m_mailTempleteList.Items[item[0]].SubItems[4].Text;

                maildt.attach1     = this.m_mailTempleteList.Items[item[0]].SubItems[5].Text;
                maildt.attach2     = this.m_mailTempleteList.Items[item[0]].SubItems[6].Text;
                maildt.attach3     = this.m_mailTempleteList.Items[item[0]].SubItems[7].Text;
                maildt.attach4     = this.m_mailTempleteList.Items[item[0]].SubItems[8].Text;
                maildt.attach5     = this.m_mailTempleteList.Items[item[0]].SubItems[9].Text;
                maildt.chk_date    = this.m_mailTempleteList.Items[item[0]].SubItems[10].Text;
                maildt.chk_name_id = this.m_mailTempleteList.Items[item[0]].SubItems[11].Text;
                //アドレスを取得
                Class_Detaget dg = new Class_Detaget();
                mailsendaddressDSList = dg.getToCcBcc(maildt.templateno, con);
                DispMailtemplete(maildt);
            }
        }
Exemplo n.º 19
0
        //アドレスの表示
        private void Form_addressSelect_Load(object sender, EventArgs e)
        {
            _columnSorter1 = new Class_ListViewColumnSorter();
            m_operaterList.ListViewItemSorter = _columnSorter1;

            _columnSorter2 = new Class_ListViewColumnSorter();
            m_user_tanntouList.ListViewItemSorter = _columnSorter2;


            m_selectKoumoku.Items.Add("カスタマ担当者、オペレータID(通番)");
            m_selectKoumoku.Items.Add("カスタマ名");

            m_selectKoumoku.Items.Add("アドレス番号");
            m_selectKoumoku.Items.Add("メールアドレス");
            m_selectKoumoku.Items.Add("アドレス名");
            m_selectKoumoku.Items.Add("更新者");

            Class_Detaget dataget = new Class_Detaget();
            Dictionary <string, string> param_dict = new Dictionary <string, string>();
            List <MailaddressDS>        Maillist   = new List <MailaddressDS>();

            if (tabcontrol1.SelectedIndex == 0)
            {
                //オペレータが選択されていたとき
                Maillist        = dataget.selectMailList_ope(param_dict, con);
                addressList_ope = Maillist;
                disp_addressList(Maillist, m_operaterList);
            }
            else if (tabcontrol1.SelectedIndex == 1)
            {
                //カスタマ担当者が選択されていたとき
                Maillist           = dataget.selectMailList_Tantou(param_dict, con);
                addressList_tantou = Maillist;
                disp_addressList(Maillist, m_user_tanntouList);
            }
        }
Exemplo n.º 20
0
        //ホスト名を読み込む
        private void Read_hostCombo(string siteno)
        {
            try {
                m_hostCombo.DataSource = null;
                m_hostno.Text          = "";

                Class_Detaget getuser = new Class_Detaget();

                //ホスト名を検索

                //空白行を追加
                hostDS tmp = new hostDS();
                tmp.hostname = "";
                tmp.host_no  = "";
                List <hostDS> hostDSList = new List <hostDS>();
                hostDSList.Add(tmp);

                //リストの取得
                List <hostDS> hostDSList1 = getuser.getHostList(siteno, con, true);
                hostDSList.AddRange(hostDSList1);

                m_hostCombo.DataSource    = hostDSList;
                m_hostCombo.DisplayMember = "hostname";
                m_hostCombo.ValueMember   = "host_no";

                //ホスト名ラベルを表示
                if (hostDSList.Count > 0)
                {
                    m_hostno.Text = m_hostCombo.SelectedValue.ToString();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ホスト情報の読み込みに失敗", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Exemplo n.º 21
0
        void Read_siteCombo()
        {
            m_siteCombo.DataSource = null;
            m_siteno.Text          = "";
            m_hostno.Text          = "";
            m_hostCombo.DataSource = null;


            //ラベルに反映
            if (m_systemCombo.SelectedValue != null)
            {
                m_systemno.Text = m_systemCombo.SelectedValue.ToString();
            }

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

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

            string systemid = "";

            if (m_systemno.Text != "")
            {
                systemid = m_systemno.Text;
            }

            //拠点情報の取得
            Class_Detaget DGclass = new Class_Detaget();

            siteList = DGclass.getSiteList(systemid, con, true);

            //取れなかったらなにもしない
            if (siteList == null || siteList.Count <= 0)
            {
                return;
            }

            //空行の挿入
            DataRow row = siteTable.NewRow();

            row["ID"]   = "";
            row["NAME"] = "";
            siteTable.Rows.Add(row);

            //拠点件数分ループを行う
            foreach (siteDS v in siteList)
            {
                if (m_systemCombo.SelectedValue != null)
                {
                    if (v.systemno == m_systemCombo.SelectedValue.ToString())
                    {
                        row         = siteTable.NewRow();
                        row["ID"]   = v.siteno;
                        row["NAME"] = v.sitename;
                        siteTable.Rows.Add(row);
                    }
                }
            }
            //データテーブルを割り当てる
            m_siteCombo.DataSource    = siteTable;
            m_siteCombo.DisplayMember = "NAME";
            m_siteCombo.ValueMember   = "ID";
            if (siteTable.Rows.Count > 0)
            {
                if (m_siteCombo.Text != "")
                {
                    m_siteno.Text = m_siteCombo.SelectedValue.ToString();
                }
            }
        }
Exemplo n.º 22
0
        //検索ボタン
        private void m_selectBtn_Click(object sender, EventArgs e)
        {
            m_Customer_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["userno"] = m_selecttext.Text;
                        break;

                    //カスタマID
                    case 1:
                        param_dict["customerID"] = m_selecttext.Text;
                        break;

                    //カスタマ名
                    case 2:
                        param_dict["username"] = m_selecttext.Text;
                        break;

                    //カスタマ名カナ
                    case 3:
                        param_dict["username_kana"] = m_selecttext.Text;
                        break;

                    //カスタマ名略称
                    case 4:
                        param_dict["username_sum"] = m_selecttext.Text;
                        break;

                    //有効/無効
                    case 5:
                        if (m_selecttext.Text == "無効")
                        {
                            param_dict["status"] = "0";
                        }
                        else if (m_selecttext.Text == "有効")
                        {
                            param_dict["status"] = "1";
                        }

                        break;

                    //レポート出力有無
                    case 6:
                        if (m_selecttext.Text == "無効")
                        {
                            param_dict["report_status"] = "0";
                        }
                        else if (m_selecttext.Text == "有効")
                        {
                            param_dict["report_status"] = "1";
                        }

                        break;

                    //備考
                    case 7:
                        param_dict["biko"] = m_selecttext.Text;
                        break;

                    //更新日時
                    case 8:
                        DateTime dt;
                        String   str = m_selecttext.Text;

                        //入力された日付の形式の確認
                        if (DateTime.TryParse(str, out dt))
                        {
                            param_dict["chk_date"] = str;
                        }
                        else
                        {
                            MessageBox.Show("日付の形式が正しくありません。", "カスタマ検索");
                            return;
                        }
                        break;

                    //更新者
                    case 9:
                        param_dict["chk_name_id"] = m_selecttext.Text;
                        break;

                    default:
                        break;
                    }
                }
            }

            dset = dg.getSelectUser(param_dict, con, dset, true);

            this.splitContainer1.SplitterDistance = 220;

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

            this.m_Customer_List.Columns.Insert(0, "No", 30, HorizontalAlignment.Left);
            this.m_Customer_List.Columns.Insert(1, "カスタマID", 50, HorizontalAlignment.Left);
            this.m_Customer_List.Columns.Insert(2, "カスタマ名", 200, HorizontalAlignment.Left);
            this.m_Customer_List.Columns.Insert(3, "カスタマ名カナ", 200, HorizontalAlignment.Left);
            this.m_Customer_List.Columns.Insert(4, "カスタマ名略称", 100, HorizontalAlignment.Left);
            this.m_Customer_List.Columns.Insert(5, "有効/無効", 40, HorizontalAlignment.Left);
            this.m_Customer_List.Columns.Insert(6, "SLO対象", 40, HorizontalAlignment.Left);
            this.m_Customer_List.Columns.Insert(7, "備考", 300, HorizontalAlignment.Left);
            this.m_Customer_List.Columns.Insert(8, "更新日時", 120, HorizontalAlignment.Left);
            this.m_Customer_List.Columns.Insert(9, "更新者", 120, HorizontalAlignment.Left);

            //リストに表示
            if (dset.user_L != null)
            {
                foreach (userDS t_ds in dset.user_L)
                {
                    ListViewItem itemx1 = new ListViewItem();
                    itemx1.Text = t_ds.userno;

                    itemx1.SubItems.Add(t_ds.customerID);
                    itemx1.SubItems.Add(t_ds.username);
                    itemx1.SubItems.Add(t_ds.username_kana);
                    itemx1.SubItems.Add(t_ds.username_sum);
                    itemx1.SubItems.Add(t_ds.status);
                    itemx1.SubItems.Add(t_ds.report_status);
                    itemx1.SubItems.Add(t_ds.biko);
                    itemx1.SubItems.Add(t_ds.chk_date);
                    itemx1.SubItems.Add(t_ds.chk_name_id);

                    this.m_Customer_List.Items.Add(itemx1);
                }
            }
        }
Exemplo n.º 23
0
        //検索ボタン
        private void m_select_btn_Click(object sender, EventArgs e)
        {
            m_oper_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_selectCombo.SelectedIndex.ToString() != "")
                {
                    switch (this.m_selectCombo.SelectedIndex)
                    {
                    case 0:
                        param_dict["openo"] = m_selecttext.Text;
                        break;

                    case 1:
                        param_dict["opeid"] = m_selecttext.Text;
                        break;

                    case 2:
                        param_dict["lastname"] = m_selecttext.Text;
                        break;

                    case 3:
                        param_dict["fastname"] = m_selecttext.Text;
                        break;

                    case 4:
                        param_dict["password"] = m_selecttext.Text;
                        break;

                    case 5:
                        param_dict["type"] = m_selecttext.Text;
                        break;

                    case 6:
                        param_dict["biko"] = m_selecttext.Text;
                        break;

                    //更新日時
                    case 7:

                        DateTime dt;
                        String   str = m_selecttext.Text;

                        //入力された日付の形式の確認
                        if (DateTime.TryParse(str, out dt))
                        {
                            param_dict["chk_date"] = str;
                        }
                        else
                        {
                            MessageBox.Show("日付の形式が正しくありません。", "拠点検索");
                            return;
                        }
                        break;

                    //更新者
                    case 11:
                        param_dict["chk_name_id"] = m_selecttext.Text;
                        break;

                    default:
                        break;
                    }
                }
            }

            List <opeDS> opeList = dg.getSelectOper(param_dict, con);

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

            this.m_oper_List.Columns.Insert(0, "No", 30, HorizontalAlignment.Left);
            this.m_oper_List.Columns.Insert(1, "オペレータID", 120, HorizontalAlignment.Left);
            this.m_oper_List.Columns.Insert(2, "姓", 120, HorizontalAlignment.Left);
            this.m_oper_List.Columns.Insert(3, "名", 90, HorizontalAlignment.Left);
            this.m_oper_List.Columns.Insert(4, "パスワード", 80, HorizontalAlignment.Left);
            this.m_oper_List.Columns.Insert(5, "権限", 80, HorizontalAlignment.Left);
            this.m_oper_List.Columns.Insert(6, "備考", 50, HorizontalAlignment.Left);
            this.m_oper_List.Columns.Insert(7, "更新日時", 50, HorizontalAlignment.Left);
            this.m_oper_List.Columns.Insert(8, "更新者", 50, HorizontalAlignment.Left);

            //リストに表示
            if (opeList != null)
            {
                foreach (opeDS t_ds in opeList)
                {
                    ListViewItem itemx1 = new ListViewItem();
                    itemx1.Text = t_ds.openo;

                    itemx1.SubItems.Add(t_ds.opeid);
                    itemx1.SubItems.Add(t_ds.lastname);
                    itemx1.SubItems.Add(t_ds.fastname);
                    itemx1.SubItems.Add(t_ds.password);
                    String str = "";
                    if (t_ds.type == "1")
                    {
                        str = "管理者";
                    }
                    else
                    {
                        str = "利用者";
                    }

                    itemx1.SubItems.Add(str);
                    itemx1.SubItems.Add(t_ds.biko);
                    itemx1.SubItems.Add(t_ds.chk_date);
                    itemx1.SubItems.Add(t_ds.chk_name_id);

                    this.m_oper_List.Items.Add(itemx1);
                }
            }
        }
Exemplo n.º 24
0
        //検索ボタン
        private void m_select_btn_Click(object sender, EventArgs e)
        {
            m_templetelist.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_selectCombo.SelectedIndex.ToString() != "")
                {
                    switch (this.m_selectCombo.SelectedIndex)
                    {
                    //テンプレート通番
                    case 0:
                        param_dict["templeteno"] = m_selecttext.Text;
                        break;

                    //テンプレート種別
                    case 1:
                        if (m_selecttext.Text == "インシデント")
                        {
                            param_dict["templetetype"] = "1";
                        }
                        else if (m_selecttext.Text.IndexOf("タスク") > -1 || m_selecttext.Text.IndexOf("計画作業") > -1)
                        {
                            param_dict["templetetype"] = "2";
                        }
                        break;

                    //テンプレート名
                    case 2:
                        param_dict["templetename"] = m_selecttext.Text;
                        break;

                    //カスタマ名
                    case 3:
                        param_dict["username"] = m_selecttext.Text;
                        break;


                    case 4:
                        param_dict["title"] = m_selecttext.Text;
                        break;

                    //本文
                    case 5:
                        param_dict["text"] = 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;
                    }
                }
            }

            //まず件数を取得する
            Int64 count = dg.getTempleteListCount("", param_dict, con);

            if (MessageBox.Show(count.ToString() + "件ヒットしました。表示しますか?", "ホスト", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
            {
                return;
            }

            //テンプレート一覧を取得する
            templList = dg.selectTempleteList("", param_dict, con);

            this.splitContainer1.SplitterDistance = 210;

            this.m_templetelist.VirtualMode = true;
            // 1行全体選択
            this.m_templetelist.FullRowSelect = true;
            this.m_templetelist.HideSelection = false;
            this.m_templetelist.HeaderStyle   = ColumnHeaderStyle.Clickable;
            //Hook up handlers for VirtualMode events.
            this.m_templetelist.RetrieveVirtualItem += new RetrieveVirtualItemEventHandler(incident_RetrieveVirtualItem);
            this.m_templetelist.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
            this.m_templetelist.Scrollable = true;

            this.m_templetelist.Columns.Insert(0, "テンプレート通番", 30, HorizontalAlignment.Left);
            this.m_templetelist.Columns.Insert(1, "テンプレート種別", 50, HorizontalAlignment.Left);
            this.m_templetelist.Columns.Insert(2, "テンプレート名", 300, HorizontalAlignment.Left);
            this.m_templetelist.Columns.Insert(3, "カスタマ通番", 50, HorizontalAlignment.Left);
            this.m_templetelist.Columns.Insert(4, "タイトル(インシデントのみ)", 80, HorizontalAlignment.Left);
            this.m_templetelist.Columns.Insert(5, "テンプレート内容", 300, HorizontalAlignment.Left);
            this.m_templetelist.Columns.Insert(6, "更新日時", 110, HorizontalAlignment.Left);
            this.m_templetelist.Columns.Insert(7, "更新者", 50, HorizontalAlignment.Left);

            //リストビューを初期化する
            templ_list = new DataTable("table1");
            templ_list.Columns.Add("テンプレート通番", Type.GetType("System.Int32"));
            templ_list.Columns.Add("テンプレート種別", Type.GetType("System.String"));
            templ_list.Columns.Add("テンプレート名", Type.GetType("System.String"));
            templ_list.Columns.Add("カスタマ通番", Type.GetType("System.String"));
            templ_list.Columns.Add("タイトル(インシデントのみ)", Type.GetType("System.String"));
            templ_list.Columns.Add("テンプレート内容", Type.GetType("System.String"));
            templ_list.Columns.Add("更新日時", Type.GetType("System.String"));
            templ_list.Columns.Add("更新者", Type.GetType("System.String"));

            //リストに表示
            if (templList != null)
            {
                m_templetelist.BeginUpdate();
                foreach (templeteDS s_ds in templList)
                {
                    DataRow urow = templ_list.NewRow();
                    urow["テンプレート通番"] = s_ds.templeteno;

                    //1:インシデント 2:計画作業
                    string typestr = "";
                    if (s_ds.templetetype == "1")
                    {
                        typestr = "インシデント";
                    }
                    else if (s_ds.templetetype == "2")
                    {
                        typestr = "タスク(インシデントタスク・計画作業)";
                    }

                    urow["テンプレート種別"] = typestr;
                    urow["テンプレート名"]  = s_ds.templetename;
                    urow["カスタマ通番"]   = s_ds.userno;

                    urow["テンプレート内容"]       = s_ds.text;
                    urow["タイトル(インシデントのみ)"] = s_ds.title;

                    urow["更新日時"] = s_ds.chk_date;
                    urow["更新者"]  = s_ds.chk_name_id;

                    templ_list.Rows.Add(urow);
                }
                this.m_templetelist.VirtualListSize = templ_list.Rows.Count;
                this.m_templetelist.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
                m_templetelist.EndUpdate();
            }
        }
Exemplo n.º 25
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);
                }
            }
        }
Exemplo n.º 26
0
        //検索ボタン
        private void m_selectBtn_Click(object sender, EventArgs e)
        {
            ListView lv;

            if (tabcontrol1.SelectedIndex == 1)
            {
                lv = m_user_tanntouList;
            }
            else
            {
                lv = m_operaterList;
            }

            lv.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)
                    {
                    //ユーザID
                    case 0:
                        param_dict["opetantouno"] = m_selecttext.Text;
                        break;

                    //カスタマメイ
                    case 1:
                        param_dict["username"] = m_selecttext.Text;
                        break;

                    //アドレス番号
                    case 2:
                        param_dict["addressNo"] = m_selecttext.Text;
                        break;

                    case 3:
                        param_dict["mailAddress"] = m_selecttext.Text;
                        break;

                    case 4:
                        param_dict["addressname"] = m_selecttext.Text;
                        break;

                    //更新者
                    case 5:
                        param_dict["chk_name_id"] = m_selecttext.Text;
                        break;

                    default:
                        break;
                    }
                }
            }
            List <MailaddressDS> addressList;

            if (tabcontrol1.SelectedIndex == 1)
            {
                //カスタマ担当者
                addressList_tantou = dg.selectMailList(param_dict, con, "2");
                addressList        = addressList_tantou;
            }
            else
            {
                //オペレータ
                addressList_ope = dg.selectMailList(param_dict, con, "1");
                addressList     = addressList_ope;
            }

            //リストに表示
            if (addressList != null)
            {
                //リストに表示
                disp_addressList(addressList, lv);
            }
        }
Exemplo n.º 27
0
        //検索ボタン
        private void m_selectBtn_Click(object sender, EventArgs e)
        {
            m_InterfaceList.Clear();
            DISP_dataSet dset = new DISP_dataSet();
            Dictionary <string, string> param_dict = new Dictionary <string, string>();
            Class_Detaget dg = new Class_Detaget();
            String        str;

            if (m_selecttext.Text != "")
            {
                if (this.m_selectKoumoku.SelectedIndex.ToString() != "")
                {
                    switch (this.m_selectKoumoku.SelectedIndex)
                    {
                    case 0:
                        param_dict["kennshino"] = m_selecttext.Text;
                        break;

                    //ホスト名
                    case 1:
                        param_dict["interfacename"] = m_selecttext.Text;
                        break;

                    case 2:
                        if (m_selecttext.Text == "無効")
                        {
                            param_dict["status"] = "0";
                        }
                        else if (m_selecttext.Text == "有効")
                        {
                            param_dict["status"] = "1";
                        }
                        break;

                    case 3:
                        param_dict["type"] = m_selecttext.Text;
                        break;

                    case 4:
                        param_dict["kanshi"] = m_selecttext.Text;
                        break;

                    case 5:
                        param_dict["border"] = m_selecttext.Text;
                        break;

                    case 6:
                        param_dict["IPaddress"] = m_selecttext.Text;
                        break;

                    case 7:
                        param_dict["IPaddressNAT"] = m_selecttext.Text;
                        break;

                    case 8:
                        param_dict["biko"] = m_selecttext.Text;
                        break;

                    case 9:
                        param_dict["userno"] = m_selecttext.Text;
                        break;

                    case 10:
                        param_dict["systemno"] = m_selecttext.Text;
                        break;

                    case 11:
                        param_dict["siteno"] = m_selecttext.Text;
                        break;

                    case 12:
                        param_dict["host_no"] = m_selecttext.Text;
                        break;

                    //更新日時
                    case 13:
                        DateTime dt;
                        str = m_selecttext.Text;

                        //入力された日付の形式の確認
                        if (DateTime.TryParse(str, out dt))
                        {
                            param_dict["chk_date"] = str;
                        }
                        else
                        {
                            MessageBox.Show("日付の形式が正しくありません。", "監視インターフェイス検索");
                            return;
                        }
                        break;

                    //更新者
                    case 14:
                        param_dict["chk_name_id"] = m_selecttext.Text;
                        break;

                    default:
                        break;
                    }
                }
            }
            //まず件数を取得する
            Int64 count = dg.getSelectInterfaceCount(param_dict, con, dset, true);

            if (MessageBox.Show(count.ToString() + "件ヒットしました。表示しますか?", "監視インターフェイス", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
            {
                return;
            }
            //インターフェイス一覧を取得する
            dset = dg.getSelectInterface(param_dict, con, dset, true);


            this.splitContainer1.SplitterDistance = 250;

            this.m_InterfaceList.VirtualMode = true;
            // 1行全体選択
            this.m_InterfaceList.FullRowSelect = true;
            this.m_InterfaceList.HideSelection = false;
            this.m_InterfaceList.HeaderStyle   = ColumnHeaderStyle.Clickable;
            //Hook up handlers for VirtualMode events.
            this.m_InterfaceList.RetrieveVirtualItem += new RetrieveVirtualItemEventHandler(InterfaceList_RetrieveVirtualItem);
            this.m_InterfaceList.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
            this.m_InterfaceList.Scrollable = true;


            this.m_InterfaceList.Columns.Insert(0, "No", 30, HorizontalAlignment.Left);
            this.m_InterfaceList.Columns.Insert(1, "インターフェイス名", 120, HorizontalAlignment.Left);
            this.m_InterfaceList.Columns.Insert(2, "ステータス", 90, HorizontalAlignment.Left);
            this.m_InterfaceList.Columns.Insert(3, "監視タイプ", 90, HorizontalAlignment.Left);
            this.m_InterfaceList.Columns.Insert(4, "監視項目名", 80, HorizontalAlignment.Left);
            this.m_InterfaceList.Columns.Insert(5, "閾値", 50, HorizontalAlignment.Left);
            this.m_InterfaceList.Columns.Insert(6, "IPアドレス", 50, HorizontalAlignment.Left);
            this.m_InterfaceList.Columns.Insert(7, "IPアドレス(NAT)", 50, HorizontalAlignment.Left);
            this.m_InterfaceList.Columns.Insert(8, "備考", 50, HorizontalAlignment.Left);
            this.m_InterfaceList.Columns.Insert(9, "カスタマ番号", 50, HorizontalAlignment.Left);
            this.m_InterfaceList.Columns.Insert(10, "システム通番番号", 50, HorizontalAlignment.Left);
            this.m_InterfaceList.Columns.Insert(11, "拠点通番", 50, HorizontalAlignment.Left);
            this.m_InterfaceList.Columns.Insert(12, "ホスト通番", 50, HorizontalAlignment.Left);
            this.m_InterfaceList.Columns.Insert(13, "更新日時", 50, HorizontalAlignment.Left);
            this.m_InterfaceList.Columns.Insert(14, "更新者", 50, HorizontalAlignment.Left);

            //リストビューを初期化する
            interface_list = new DataTable("table1");
            interface_list.Columns.Add("No", Type.GetType("System.Int32"));
            interface_list.Columns.Add("インターフェイス名", Type.GetType("System.String"));
            interface_list.Columns.Add("ステータス", Type.GetType("System.String"));
            interface_list.Columns.Add("監視タイプ", Type.GetType("System.String"));
            interface_list.Columns.Add("監視項目名", Type.GetType("System.String"));
            interface_list.Columns.Add("閾値", Type.GetType("System.String"));
            interface_list.Columns.Add("IPアドレス", Type.GetType("System.String"));
            interface_list.Columns.Add("IPアドレス(NAT)", Type.GetType("System.String"));
            interface_list.Columns.Add("備考", Type.GetType("System.String"));
            interface_list.Columns.Add("カスタマ番号", Type.GetType("System.String"));
            interface_list.Columns.Add("システム通番番号", Type.GetType("System.String"));
            interface_list.Columns.Add("拠点通番", Type.GetType("System.String"));
            interface_list.Columns.Add("ホスト通番", Type.GetType("System.String"));
            interface_list.Columns.Add("更新日時", Type.GetType("System.String"));
            interface_list.Columns.Add("更新者", Type.GetType("System.String"));



            //リストに表示
            if (dset.watch_L != null)
            {
                m_InterfaceList.BeginUpdate();

                foreach (watch_InterfaceDS s_ds in dset.watch_L)
                {
                    DataRow urow = interface_list.NewRow();

                    urow["No"]          = s_ds.watch_Interfaceno;
                    urow["インターフェイス名"]   = s_ds.interfacename;
                    urow["ステータス"]       = s_ds.status;
                    urow["監視タイプ"]       = s_ds.type;
                    urow["監視項目名"]       = s_ds.kanshi;
                    urow["閾値"]          = s_ds.border;
                    urow["IPアドレス"]      = s_ds.IPaddress;
                    urow["IPアドレス(NAT)"] = s_ds.IPaddressNAT;
                    urow["備考"]          = s_ds.biko;

                    urow["カスタマ番号"]   = s_ds.userno;
                    urow["システム通番番号"] = s_ds.systemno;
                    urow["拠点通番"]     = s_ds.siteno;
                    urow["ホスト通番"]    = s_ds.host_no;
                    urow["更新日時"]     = s_ds.chk_date;
                    urow["更新者"]      = s_ds.chk_name_id;
                    interface_list.Rows.Add(urow);
                }
                this.m_InterfaceList.VirtualListSize = interface_list.Rows.Count;
                this.m_InterfaceList.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);

                m_InterfaceList.EndUpdate();
            }
        }
Exemplo n.º 28
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;
            }
        }
Exemplo n.º 29
0
        //検索ボタン
        private void m_selectBtn_Click(object sender, EventArgs e)
        {
            m_kaisenList.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["kaisenno"] = m_selecttext.Text;
                        break;

                    case 1:
                        if (m_selecttext.Text == "無効")
                        {
                            param_dict["status"] = "0";
                        }
                        else if (m_selecttext.Text == "有効")
                        {
                            param_dict["status"] = "1";
                        }
                        break;

                    //ホスト名日本
                    case 2:
                        param_dict["career"] = m_selecttext.Text;
                        break;

                    case 3:
                        param_dict["type"] = m_selecttext.Text;
                        break;

                    case 4:
                        param_dict["kaisenid"] = m_selecttext.Text;
                        break;

                    case 5:
                        param_dict["isp"] = m_selecttext.Text;
                        break;

                    case 6:
                        param_dict["servicetype"] = m_selecttext.Text;
                        break;

                    case 7:
                        param_dict["serviceid"] = m_selecttext.Text;
                        break;

                    case 8:
                        param_dict["userno"] = m_selecttext.Text;
                        break;

                    case 9:
                        param_dict["systemno"] = m_selecttext.Text;
                        break;

                    case 10:
                        param_dict["siteno"] = m_selecttext.Text;
                        break;

                    case 11:
                        param_dict["host_no"] = m_selecttext.Text;
                        break;

                    case 12:
                        param_dict["telno"] = m_selecttext.Text;
                        break;

                    case 13:
                        param_dict["biko"] = m_selecttext.Text;
                        break;

                    //更新日時
                    case 14:
                        DateTime dt;
                        String   str = m_selecttext.Text;

                        //入力された日付の形式の確認
                        if (DateTime.TryParse(str, out dt))
                        {
                            param_dict["start_date"] = str;
                        }
                        else
                        {
                            MessageBox.Show("日付の形式が正しくありません。", "監視インターフェイス検索");
                            return;
                        }

                        break;

                    //更新者
                    case 15:
                        param_dict["chk_name_id"] = m_selecttext.Text;
                        break;

                    default:
                        break;
                    }
                }
            }

            //回線一覧を取得する
            dset = dg.getSelectKaisenList(param_dict, con, dset);

            this.splitContainer1.SplitterDistance = 218;

            this.m_kaisenList.VirtualMode = true;
            // 1行全体選択
            this.m_kaisenList.FullRowSelect = true;
            this.m_kaisenList.HideSelection = false;
            this.m_kaisenList.HeaderStyle   = ColumnHeaderStyle.Clickable;
            //Hook up handlers for VirtualMode events.
            this.m_kaisenList.RetrieveVirtualItem += new RetrieveVirtualItemEventHandler(Kaisen_RetrieveVirtualItem);
            this.m_kaisenList.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
            this.m_kaisenList.Scrollable = true;


            this.m_kaisenList.Columns.Insert(0, "No", 30, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(1, "ステータス", 50, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(2, "キャリア", 180, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(3, "回線種別", 180, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(4, "回線ID", 150, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(5, "ISP", 180, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(6, "サービス種別", 180, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(7, "サービスID", 180, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(8, "電話番号1", 70, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(9, "電話番号2", 70, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(10, "電話番号3", 70, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(11, "備考", 70, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(12, "カスタマ通番", 50, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(13, "システム通番", 50, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(14, "拠点通番", 50, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(15, "ホスト通番", 50, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(16, "更新日時", 120, HorizontalAlignment.Left);
            this.m_kaisenList.Columns.Insert(17, "更新者", 50, HorizontalAlignment.Left);

            //リストビューを初期化する
            kaisen_list = new DataTable("kaisentable");
            kaisen_list.Columns.Add("No", Type.GetType("System.Int32"));
            kaisen_list.Columns.Add("ステータス", Type.GetType("System.String"));
            kaisen_list.Columns.Add("キャリア", Type.GetType("System.String"));
            kaisen_list.Columns.Add("回線種別", Type.GetType("System.String"));
            kaisen_list.Columns.Add("回線ID", Type.GetType("System.String"));
            kaisen_list.Columns.Add("ISP", Type.GetType("System.String"));
            kaisen_list.Columns.Add("サービス種別", Type.GetType("System.String"));
            kaisen_list.Columns.Add("サービスID", Type.GetType("System.String"));
            kaisen_list.Columns.Add("電話番号1", Type.GetType("System.String"));
            kaisen_list.Columns.Add("電話番号2", Type.GetType("System.String"));
            kaisen_list.Columns.Add("電話番号3", Type.GetType("System.String"));
            kaisen_list.Columns.Add("備考", Type.GetType("System.String"));
            kaisen_list.Columns.Add("カスタマ通番", Type.GetType("System.String"));
            kaisen_list.Columns.Add("システム通番", Type.GetType("System.String"));
            kaisen_list.Columns.Add("拠点通番", Type.GetType("System.String"));
            kaisen_list.Columns.Add("ホスト通番", Type.GetType("System.String"));
            kaisen_list.Columns.Add("更新日時", Type.GetType("System.String"));
            kaisen_list.Columns.Add("更新者", Type.GetType("System.String"));

            //リストに表示
            if (dset.kaisen_L != null)
            {
                m_kaisenList.BeginUpdate();

                foreach (kaisenDS s_ds in dset.kaisen_L)
                {
                    DataRow urow = kaisen_list.NewRow();

                    urow["No"]     = s_ds.kaisenno;
                    urow["ステータス"]  = s_ds.status;
                    urow["キャリア"]   = s_ds.career;
                    urow["回線種別"]   = s_ds.type;
                    urow["回線ID"]   = s_ds.kaisenid;
                    urow["ISP"]    = s_ds.isp;
                    urow["サービス種別"] = s_ds.servicetype;
                    urow["サービスID"] = s_ds.serviceid;
                    urow["電話番号1"]  = s_ds.telno1;
                    urow["電話番号2"]  = s_ds.telno2;
                    urow["電話番号3"]  = s_ds.telno3;
                    urow["備考"]     = s_ds.biko;
                    urow["カスタマ通番"] = s_ds.userno;
                    urow["システム通番"] = s_ds.systemno;
                    urow["拠点通番"]   = s_ds.siteno;
                    urow["ホスト通番"]  = s_ds.host_no;
                    urow["更新日時"]   = s_ds.chk_date;
                    urow["更新者"]    = s_ds.chk_name_id;
                    kaisen_list.Rows.Add(urow);
                }
                this.m_kaisenList.VirtualListSize = kaisen_list.Rows.Count;
                this.m_kaisenList.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);

                m_kaisenList.EndUpdate();
            }
        }
Exemplo n.º 30
0
        //表示前
        private void Form_taskInsert_Load(object sender, EventArgs e)
        {
            DateTime now = System.DateTime.Now;
            //現在から1年後を初期値にする
            DateTime enddayDefault = now.AddYears(1);

            m_endDate1.Value = new DateTime(enddayDefault.Year, enddayDefault.Month, enddayDefault.Day, enddayDefault.Hour, enddayDefault.Minute, 00);
            m_endDate2.Value = new DateTime(enddayDefault.Year, enddayDefault.Month, enddayDefault.Day, enddayDefault.Hour, enddayDefault.Minute, 00);
            m_endDate2.Value = new DateTime(enddayDefault.Year, enddayDefault.Month, enddayDefault.Day, enddayDefault.Hour, enddayDefault.Minute, 00);

            //3年以上の期間は入力できない
            m_endDate1.MaxDate = DateTime.Now.AddYears(3);
            m_endDate2.MaxDate = DateTime.Now.AddYears(3);
            m_endDate3.MaxDate = DateTime.Now.AddYears(3);

            m_statusCombo.Text  = "";
            m_statusCombo1.Text = "";
            m_statusCombo2.Text = "";
            m_statusCombo3.Text = "";
            m_statusCombo4.Text = "";
            m_statusCombo5.Text = "";


            m_idlabel.Text       = loginDS.opeid;
            m_labelinputOpe.Text = loginDS.lastname + loginDS.fastname;

            //1:インシデント
            //2:定期作業
            //3:計画作業
            //4:特別対応
            m_schedule_combo.SelectedIndex = schedule_type;


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

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

            Class_Detaget getuser = new Class_Detaget();

            getuser.con = con;

            //カスタマ名を取得
            userList = getuser.getUserList();

            if (userList == null)
            {
                return;
            }

            //カスタマ情報を取得する
            foreach (userDS v in userList)
            {
                DataRow row = cutomerTable.NewRow();
                row["ID"]   = v.userno;
                row["NAME"] = v.username;
                cutomerTable.Rows.Add(row);
            }

            //データテーブルを割り当てる
            m_usernameCombo.DataSource    = cutomerTable;
            m_usernameCombo.DisplayMember = "NAME";
            m_usernameCombo.ValueMember   = "ID";

            //Read_systemCombo();
            //ラベルに反映
            if (m_usernameCombo.SelectedValue != null)
            {
                m_userno.Text = m_usernameCombo.SelectedValue.ToString();
            }
        }