コード例 #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();
        }
コード例 #2
0
        //表示前処理
        private void Form_IncidentInsert_Load(object sender, EventArgs e)
        {
            m_idlabel.Text       = loginDS.opeid;
            m_labelinputOpe.Text = loginDS.lastname + loginDS.fastname;


            dateTime_uketukedate = null;
            dateTime_tehaidate   = null;
            dateTime_fukyudate   = null;
            dateTime_enddate     = null;
            dateTime_Timer       = null;

            //日付コントロールを空白にする
            setDateTimePicker(dateTime_uketukedate, m_uketukedate);
            setDateTimePicker(dateTime_tehaidate, m_tehaidate);
            setDateTimePicker(dateTime_fukyudate, m_fukyudate);
            setDateTimePicker(dateTime_enddate, m_enddate);
            setDateTimePicker(dateTime_Timer, m_timerpicker);

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

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

            if (userList == null)
            {
                return;
            }

            //空行を挿入
            userDS tmp = new userDS();

            tmp.username = "";
            tmp.userno   = "";
            cutomerTable.Rows.Add(tmp);

            //カスタマ情報を取得する
            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";
        }
コード例 #3
0
ファイル: Form_KaisenDetail.cs プロジェクト: satoyoshipc/SMS
        void Read_CustomerCombo()
        {
            m_userno.Text = "";
            m_usernameCombo.DataSource = null;
            m_systemno.Text            = "";
            m_systemCombo.DataSource   = null;
            m_siteno.Text          = "";
            m_siteCombo.DataSource = null;
            m_hostno.Text          = "";
            m_hostCombo.DataSource = null;

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

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

            if (userList == null)
            {
                return;
            }

            //空行を挿入
            userDS tmp = new userDS();

            tmp.username = "";
            tmp.userno   = "";
            cutomerTable.Rows.Add(tmp);

            //カスタマ情報を取得する
            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";
        }
コード例 #4
0
        //カスタマ名をダブルクリックしたとき
        private void m_Customer_List_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ListView.SelectedIndexCollection item = m_Customer_List.SelectedIndices;
            userDS userdt = new userDS();

            userdt.userno        = this.m_Customer_List.Items[item[0]].SubItems[0].Text;
            userdt.customerID    = this.m_Customer_List.Items[item[0]].SubItems[1].Text;
            userdt.username      = this.m_Customer_List.Items[item[0]].SubItems[2].Text;
            userdt.username_kana = this.m_Customer_List.Items[item[0]].SubItems[3].Text;
            userdt.username_sum  = this.m_Customer_List.Items[item[0]].SubItems[4].Text;

            string statustxt = this.m_Customer_List.Items[item[0]].SubItems[5].Text;

            if (statustxt == "有効")
            {
                userdt.status = "1";
            }
            else
            {
                userdt.status = "0";
            }

            string reportststxt = this.m_Customer_List.Items[item[0]].SubItems[6].Text;

            if (reportststxt == "有効")
            {
                userdt.report_status = "1";
            }
            else
            {
                userdt.report_status = "0";
            }

            userdt.biko        = this.m_Customer_List.Items[item[0]].SubItems[7].Text;
            userdt.chk_date    = this.m_Customer_List.Items[item[0]].SubItems[8].Text;
            userdt.chk_name_id = this.m_Customer_List.Items[item[0]].SubItems[9].Text;

            getcustomer(userdt);
        }