Exemple #1
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();
        }
Exemple #2
0
        //検索ボタン
        private void m_select_btn_Click(object sender, EventArgs e)
        {
            m_customertantouList.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["user_tantou_no"] = m_selecttext.Text;
                        break;

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

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

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

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

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

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

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

                        break;

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

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

                    //更新日時
                    case 10:

                        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 <tantouDS> tantouList = dg.get_tantouName(param_dict, con);

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

            this.m_customertantouList.Columns.Insert(0, "No", 30, HorizontalAlignment.Left);
            this.m_customertantouList.Columns.Insert(1, "担当者名", 120, HorizontalAlignment.Left);
            this.m_customertantouList.Columns.Insert(2, "担当者名カナ", 120, HorizontalAlignment.Left);
            this.m_customertantouList.Columns.Insert(3, "部署名", 90, HorizontalAlignment.Left);
            this.m_customertantouList.Columns.Insert(4, "電話番号1", 80, HorizontalAlignment.Left);
            this.m_customertantouList.Columns.Insert(5, "電話番号2", 80, HorizontalAlignment.Left);
            this.m_customertantouList.Columns.Insert(6, "役職", 50, HorizontalAlignment.Left);
            this.m_customertantouList.Columns.Insert(7, "ステータス", 50, HorizontalAlignment.Left);
            this.m_customertantouList.Columns.Insert(8, "備考", 50, HorizontalAlignment.Left);
            this.m_customertantouList.Columns.Insert(9, "カスタマID", 50, HorizontalAlignment.Left);
            this.m_customertantouList.Columns.Insert(10, "カスタマ名", 50, HorizontalAlignment.Left);

            this.m_customertantouList.Columns.Insert(11, "更新日時", 50, HorizontalAlignment.Left);
            this.m_customertantouList.Columns.Insert(12, "更新者", 50, HorizontalAlignment.Left);

            //リストに表示
            if (tantouList != null)
            {
                foreach (tantouDS t_ds in tantouList)
                {
                    ListViewItem itemx1 = new ListViewItem();
                    itemx1.Text = t_ds.user_tantou_no;

                    itemx1.SubItems.Add(t_ds.user_tantou_name);
                    itemx1.SubItems.Add(t_ds.user_tantou_name_kana);
                    itemx1.SubItems.Add(t_ds.busho_name);
                    itemx1.SubItems.Add(t_ds.telno1);
                    itemx1.SubItems.Add(t_ds.telno2);
                    itemx1.SubItems.Add(t_ds.yakusyoku);
                    itemx1.SubItems.Add(t_ds.status);
                    itemx1.SubItems.Add(t_ds.biko);
                    itemx1.SubItems.Add(t_ds.userno);
                    itemx1.SubItems.Add(t_ds.username);

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

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