Ejemplo n.º 1
0
        private void comboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (iniPro)
            {
                return;
            }

            ComboBox       cb = ( ComboBox )sender;
            ListFormDataOp lo = new ListFormDataOp();

            Conv.OfficeAndDepartZ(comboBoxOffice, comboBoxDepartment);
            switch (cb.Name)
            {
            case "comboBoxOffice":
                initializeTaskCostData();
                create_cbDepart();
                tcd = lo.SelectTaskCodeNameData(Conv.OfficeCode, Conv.DepartCode, null);
                break;

            case "comboBoxDepartment":
                tcd = lo.SelectTaskCodeNameData(Conv.OfficeCode, Conv.DepartCode, null);        // Task情報
                break;

            default:
                break;
            }

            dataGridView1.Rows.Clear();
            dataGridView1.Rows.Add(iniRCnt);
        }
Ejemplo n.º 2
0
        private void comboBox_TextChanged(object sender, EventArgs e)
        {
            if (iniPro)
            {
                return;
            }

            ComboBox cbx = ( ComboBox )sender;

            Conv.OfficeAndDepartZ(comboBoxOffice, comboBoxDepart);
            switch (cbx.Name)
            {
            case "comboBoxOffice":
                create_cbDepart();
                ListFormDataOp lo = new ListFormDataOp();
                cmd = lo.SelectCostDataInitialF(Conv.OfficeCode);
                tcd = lo.SelectTaskCodeNameData(Conv.OfficeCode);
                break;

            case "comboBoxDepart":
                break;

            default:
                break;
            }
            selectPaymentData(dataGridView1, dateTimePickerEx1.Value.EndOfMonth(), Conv.OfficeCode, Conv.DepartCode);
        }
Ejemplo n.º 3
0
        //----------------------------------------------------------------------------//
        //     Property                                                               //
        //----------------------------------------------------------------------------//

        //----------------------------------------------------------------------------//
        //     Method                                                                 //
        //----------------------------------------------------------------------------//
        private void FormMenuEstPlan_Load(object sender, EventArgs e)
        {
            create_cbOffice();              // ComboBox 「事業所」作成
            create_cbDepart();              // ComboBox 「部門」作成
            create_cbCostType();            // ComboBox 「原価目標」作成
            clearLabel();

            // 各ボタンに現在の最新版数表示
            //setButtonLabel(Convert.ToString(comboBoxTaskName.SelectedValue), publisher);

            //ted = new TaskEntryData();
            //ted.OfficeCode = hp.OfficeCode;
            //ted.Department = hp.Department;
            //ted.OfficeName = hp.OfficeName;
            //ted.DepartName = hp.DepartName;
            //ted.MemberCode = hp.MemberCode;
            //ted.TaxRate = hp.TaxRate;
            //ted.AdminCostRate = hp.AdminCostRate;
            //ted.OthersCostRate = hp.OthersCostRate;
            //ted.Expenses = hp.Expenses;
            Conv.OfficeAndDepartZ(comboBoxOffice, comboBoxDepartment);
            ListFormDataOp lo = new ListFormDataOp();

            //etcd = lo.SelectTaskEntryNameData( hp.OfficeCode, Convert.ToString( comboBoxDepartment.SelectedValue ), null );
            etcd = lo.SelectTaskEntryNameData(Conv.OfficeCode, Conv.DepartCode, null);
            //tcd = lo.SelectTaskCodeNameData( hp.OfficeCode, Convert.ToString( comboBoxDepartment.SelectedValue ), null );
            tcd = lo.SelectTaskCodeNameData(Conv.OfficeCode, Conv.DepartCode, null);
        }
Ejemplo n.º 4
0
        private void comboBox_TextChanged(object sender, EventArgs e)
        {
            if (iniPro)
            {
                return;
            }

            ComboBox cb = (ComboBox)sender;

            switch (cb.Name)
            {
            case "comboBoxOffice":
                ListFormDataOp lo = new ListFormDataOp();
                tcd = lo.SelectTaskCodeNameData(Convert.ToString(comboBoxOffice.SelectedValue));      // Task情報
                cmd = lo.SelectCostData(Convert.ToString(comboBoxOffice.SelectedValue));              // Cost情報
                create_cbDepart();
                break;

            case "comboBoxDepart":
                break;

            default:
                break;
            }
        }
Ejemplo n.º 5
0
        private void comboBox_TextChanged(object sender, EventArgs e)
        {
            if (iniPro)
            {
                return;
            }

            ComboBox cb = ( ComboBox )sender;

            ted = new TaskEntryData();
            Conv.OfficeAndDepartZ(comboBoxOffice, comboBoxDepartment);
            ListFormDataOp lo = new ListFormDataOp();

            switch (cb.Name)
            {
            case "comboBoxOffice":
                ted.OfficeName = cb.Text;
                create_cbDepart();

                etcd = lo.SelectTaskEntryNameData(Conv.OfficeCode, Conv.DepartCode, null);
                tcd  = lo.SelectTaskCodeNameData(Conv.OfficeCode, Conv.DepartCode, "DESC");
                this.textBoxTaskName.Text = "";
                clearLabel();
                break;

            case "comboBoxDepartment":
                ted.DepartName            = cb.Text;
                etcd                      = lo.SelectTaskEntryNameData(Conv.OfficeCode, Conv.DepartCode, null);
                tcd                       = lo.SelectTaskCodeNameData(Conv.OfficeCode, Conv.DepartCode, "DESC");
                this.textBoxTaskName.Text = "";
                clearLabel();
                break;

            case "comboBoxCostType":
                ted.CostType = cb.Text;
                clearLabel();
                break;

            default:
                break;
            }
        }
Ejemplo n.º 6
0
        private void comboBox_TextChanged(object sender, EventArgs e)
        {
            labelMes.Text = "";
            if (iniPro)
            {
                return;
            }

            ComboBox       cbx = (ComboBox)sender;
            ListFormDataOp lo  = new ListFormDataOp();

            // Debug
            dateTimePickerTo.Value = dateTimePickerFr.Value;
            switch (cbx.Name)
            {
            case "comboBoxOffice":
                create_cbDepart();
                tcad = lo.SelectTaskCodeNameData(Convert.ToString(comboBoxOffice.SelectedValue),
                                                 Convert.ToString(comboBoxDepart.SelectedValue), "DESC");

                cost = setupCostDataArray(dateTimePickerFr.Value, dateTimePickerTo.Value,
                                          Convert.ToString(comboBoxOffice.SelectedValue), Convert.ToString(comboBoxDepart.SelectedValue), 0);
                break;

            case "comboBoxDepart":
                tcad = lo.SelectTaskCodeNameData(Convert.ToString(comboBoxOffice.SelectedValue),
                                                 Convert.ToString(comboBoxDepart.SelectedValue), "DESC");

                cost = setupCostDataArray(dateTimePickerFr.Value, dateTimePickerTo.Value,
                                          Convert.ToString(comboBoxOffice.SelectedValue), Convert.ToString(comboBoxDepart.SelectedValue), 0);
                break;

            default:
                break;
            }
            // Wakamatsu 20170322
            ControlClear(1);
            // Wakamatsu 20170322
        }
Ejemplo n.º 7
0
        //--------------------------------------------------------------------------//
        //     SubRoutine                                                           //
        //--------------------------------------------------------------------------//

        private void initializeScreen()
        {
            textBoxTaskCode.Text = "";
            initializeTaskCostData();

            create_cbOffice();
            create_cbDepart();

            dateTimePickerFR.Value = DateTime.Now;
            dateTimePickerTO.Value = DateTime.Now;

            ListFormDataOp lo = new ListFormDataOp();

            tcd = lo.SelectTaskCodeNameData(string.IsNullOrEmpty(TaskSummary.Default.Office) ? "H" : TaskSummary.Default.Office,
                                            string.IsNullOrEmpty(TaskSummary.Default.Department) ? "2" : TaskSummary.Default.Department, null);      // Task情報
        }
Ejemplo n.º 8
0
        //--------------------------------------------------------------------------//
        //     SubRoutine                                                           //
        //--------------------------------------------------------------------------//

        private void initializeScreen()
        {
            labelMessage.Text = "";

            textBoxSlipNo.Text     = "";
            textBoxSlipNo.ReadOnly = false;

            textBoxTaskCode.Text  = "";
            textBoxTaskName.Text  = "";
            labelPartnerName.Text = "";
            labelTaskPlace.Text   = "";

            labelStartDate.Text = "";
            labelEndDate.Text   = "";

            labelLeaderMName.Text = "";
            labelLeaderMCode.Text = "";

            labelSalesMName.Text = "";
            labelSalesMCode.Text = "";

            labelSum.Text    = "0";
            labelAmount.Text = "0";
            labelTax.Text    = "0";

            labelPartnerCode.Text = "";

            dataGridView1.Rows.Clear();
            dataGridView1.Rows.Add(iniRCnt);
            //buttonNumbering();

            create_cbOffice();
            //comboBoxOffice.Text = hp.OfficeCode;        // 初期値
            //comboBoxOffice.SelectedIndex = oList.IndexOf(hp.OfficeCode);
            comboBoxOffice.SelectedIndex = Conv.oList.IndexOf(hp.OfficeCode);
            create_cbDepart();
            comboBoxDepart.Text = hp.Department;        // 初期値

            dateTimePickerEntryDate.Value = DateTime.Now;


            ListFormDataOp lo = new ListFormDataOp();

            tcd = lo.SelectTaskCodeNameData(hp.OfficeCode);  // Task情報
            cmd = lo.SelectCostData(hp.OfficeCode);          // Cost情報
        }
Ejemplo n.º 9
0
        //----------------------------------------------------------------------------//
        //     Property                                                               //
        //----------------------------------------------------------------------------//

        //----------------------------------------------------------------------------//
        //     Method                                                                 //
        //----------------------------------------------------------------------------//
        private void FormTaskChange_Load(object sender, EventArgs e)
        {
            create_cbOffice();
            comboBoxOffice.Text = hp.OfficeCode;        // 初期値
            create_cbDepart();
            comboBoxDepart.Text = hp.Department;        // 初期値
            labelItem.Text      = "";
            labelSTaskName.Text = "";
            labelDTaskName.Text = "";
            labelMes.Text       = "";

            ListFormDataOp lo = new ListFormDataOp();

            tcad = lo.SelectTaskCodeNameData(hp.OfficeCode, hp.Department, "DESC");
            DateTime dtToday = DateTime.Today;

            cost = setupCostDataArray(dtToday, dtToday, hp.OfficeCode, hp.Department, 0);
        }
Ejemplo n.º 10
0
        private bool dispTaskInformation(string taskCode)
        {
            ListFormDataOp   lo   = new ListFormDataOp();
            TaskCodeNameData tcnd = lo.SelectTaskCodeNameData(taskCode, Convert.ToString(comboBoxOffice.SelectedValue));
            TaskData         td   = lo.SelectTaskData(taskCode);

            if (td == null)
            {
                return(false);
            }
            labelTaskName.Text = td.TaskName;
            labelTerm.Text     = "工期:";
            labelTerm.Text    += (td.StartDate.StripTime()).ToString("yyyy年MM月dd日") + " ~ ";
            labelTerm.Text    += (td.EndDate.StripTime()).ToString("yyyy年MM月dd日");

            if (td.PartnerCode != null)
            {
                PartnersData pd = new PartnersData();
                labelPartnerName.Text = pd.SelectPartnerName(td.PartnerCode);
            }

            return(true);
        }
Ejemplo n.º 11
0
        private void FormTaskEntry_Load(object sender, EventArgs e)
        {
            labelPublisher.Text = ted.OfficeName + " " + ted.DepartName;
            labelTaskCode.Text  = "";

            /***** ComboBox 「原価目標」作成 *****/
            ComboBoxEdit cb = new ComboBoxEdit(comboBoxCostType);

            cb.ComDataList("COST", ted.OfficeCode);
            comboBoxCostType.Text = "選択してください";         // 初期値

            /***** ComboBox 「事業所」作成 *****/
            //cb = new ComboBoxEdit( comboBoxPartner );
            //cb.TableData( "M_Partners", "PartnerCode", "PartnerName", " WHERE RelCusto = 1 ORDER BY PartnerCode" );
            //comboBoxPartner.Text = "選択してください";          // 初期値

            ListFormDataOp lo = new ListFormDataOp();

            tcd = lo.SelectTaskCodeNameData(ted.OfficeCode, (ted.OfficeCode == Sign.HQOfficeCode ? ted.Department : "8"), null);
            psd = lo.SelectPartnersCuData();
            td  = new TaskData();
            tid = new TaskIndData();
        }
Ejemplo n.º 12
0
        //----------------------------------------------------------------------------//
        //     Property                                                               //
        //----------------------------------------------------------------------------//

        //----------------------------------------------------------------------------//
        //     Method                                                                 //
        //----------------------------------------------------------------------------//
        private void FormOsPayment_Load(object sender, EventArgs e)
        {
            create_cbOffice();
            comboBoxOffice.Text = hp.OfficeCode;                                                                 // 初期値
            create_cbDepart();
            comboBoxDepart.Text = hp.Department;                                                                 // 初期値
            this.clsArray       = new DateTime[] { hp.CloseHDate, hp.CloseKDate, hp.CloseSDate, hp.CloseTDate }; // 現在の締日リスト

            dataGridView1.Rows.Add(iniRCnt);
            UiHandling ui = new UiHandling(dataGridView1);

            ui.DgvReadyNoRHeader();

            readyDateTimePicker();
            dateTimePickerEx1.Value = clsArray[Conv.oList.IndexOf(hp.OfficeCode)].AddMonths(1);         // 初期表示開始月(締月の翌月)
            preReportDate           = dateTimePickerEx1.Value.EndOfMonth();

            labelACheckDate.Text = "";
            labelDCheckDate.Text = "";
            labelPCheckDate.Text = "";
            labelMsg.Text        = "";

            readyCheckBox();
            buttonEnabled();
            buttonCost.Enabled = false;

            // 取引先マスタより外注先一覧作成
            Conv.OfficeAndDepartZ(comboBoxOffice, comboBoxDepart);
            ListFormDataOp lo = new ListFormDataOp();

            psd = lo.SelectPartnersScData();
            tcd = lo.SelectTaskCodeNameData(Conv.OfficeCode);
            cmd = lo.SelectCostDataInitialF(Conv.OfficeCode);

            selectPaymentData(dataGridView1, dateTimePickerEx1.Value.EndOfMonth(), Conv.OfficeCode, Conv.DepartCode);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 現在保存している外注出来高データをDBから読取り表示する
        /// </summary>
        /// <param name="reportDate"></param>
        /// <param name="costCode"></param>
        /// <param name="officeCode"></param>
        /// <param name="department"></param>
        private void selectPaymentData(DataGridView dgv, DateTime reportDate, string officeCode, string department)
        {
            readyPro    = true;
            dgv.Enabled = true;
            dgv.Rows.Clear();
            dgv.Rows.Add(iniRCnt);

            opd = new OsPaymentData();

            DataTable dt = opd.SelectPayment(reportDate.EndOfMonth(), officeCode, department);

            if (dt == null || dt.Rows.Count < 1)
            {
                labelMsg.Text = "表示できるデータはありません。";
                seqNoReNumbering(dgv);
                this.dataGridView1.CurrentCell = null;
                readyPro = false;
                return;
            }
            labelMsg.Text = "";
            if (dt.Rows.Count > iniRCnt)
            {
                dgv.Rows.Add(dt.Rows.Count - iniRCnt + 5);
            }

            TaskData       tdp = new TaskData();
            ListFormDataOp lo  = new ListFormDataOp();
            DataRow        dr;
            string         taskCode;

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                dr = dt.Rows[i];
                if (i == 0)
                {
                    string[] ckItems = new string[] { "AdminCheck", "DirectorCheck", "PresidentCheck" };
                    string[] dtItems = new string[] { "ACheckDate", "DCheckDate", "PCheckDate" };
                    for (int j = 0; j < ckItems.Length; j++)
                    {
                        int checkStat = Convert.ToInt32(dr[ckItems[j]]);
                        ckArray[j].Checked = (checkStat == 1) ? true : false;
                        dtArray[j]         = (checkStat == 1) ? Convert.ToDateTime(dr[dtItems[j]]) : DateTime.MinValue;
                        lbArray[j].Text    = (checkStat == 1) ? dtArray[j].ToLongDateString() : "";
                    }

                    if (ckArray[2].Checked)
                    {
                        buttonDisEnabled();
                    }
                    else if (ckArray[1].Checked)
                    {
                        buttonDisEnabled();
                        buttonCost.Enabled = true;
                    }
                    else if (ckArray[0].Checked)
                    {
                        buttonEnabled();
                        buttonCost.Enabled = false;
                    }
                }

                dgv.Rows[i].Cells["ItemCode"].Value = Convert.ToString(dr["ItemCode"]);
                dgv.Rows[i].Cells["Item"].Value     = Convert.ToString(dr["Item"]);
                dgv.Rows[i].Cells["OrderNo"].Value  = Convert.ToString(dr["OrderNo"]);
                taskCode = Convert.ToString(dr["TaskCode"]);
                dgv.Rows[i].Cells["TaskCode"].Value = taskCode;
                if (Convert.ToString(dr["OrderAmount"]) == "" || Convert.ToString(dr["OrderAmount"]) == "0.00")
                {
                    dgv.Rows[i].Cells["OAmount"].Value =
                        opd.SelectOAmountPayment(Convert.ToString(dr["ItemCode"]), taskCode, Conv.OfficeCode, Conv.DepartCode, dateTimePickerEx1.Value);
                }
                else
                {
                    dgv.Rows[i].Cells["OAmount"].Value = Convert.ToDecimal(dr["OrderAmount"]);
                }
                dgv.Rows[i].Cells["SAmount"].Value =
                    opd.SelectSumAmountPayment(Convert.ToString(dr["ItemCode"]), taskCode, Conv.OfficeCode, Conv.DepartCode, dateTimePickerEx1.Value);
                dgv.Rows[i].Cells["Amount"].Value = Convert.ToDecimal(dr["Amount"]);
                calculateInvolvedItems(dgv.Rows[i]);

                dgv.Rows[i].Cells["LeaderMCode"].Value  = Convert.ToString(dr["LeaderMCode"]);
                dgv.Rows[i].Cells["SlipNo"].Value       = Convert.ToInt32(dr["SlipNo"]) == 0 ? "" : Convert.ToString(dr["SlipNo"]);
                dgv.Rows[i].Cells["CostReportID"].Value = Convert.ToInt32(dr["CostReportID"]) == 0 ? "" : Convert.ToString(dr["CostReportID"]);

                dgv.Rows[i].Cells["PaymentID"].Value = Convert.ToString(dr["OsPaymentID"]);
                dgv.Rows[i].Cells["Check"].Value     = false;


                TaskCodeNameData tcnd = lo.SelectTaskCodeNameData(taskCode, Conv.OfficeCode);
                if (tcnd != null)
                {
                    dgv.Rows[i].Cells["TaskName"].Value = tcnd.TaskName;

                    tdp = tdp.SelectTaskData(taskCode);
                    dgv.Rows[i].Cells["SalesMCode"].Value  = "0" + tdp.SalesMCode;
                    dgv.Rows[i].Cells["PartnerCode"].Value = tdp.PartnerCode;
                }
            }
            seqNoReNumbering(dgv);
            this.dataGridView1.CurrentCell = null;

            readyPro = false;
        }
Ejemplo n.º 14
0
        private void dispTaskCodeNameList(string officeCode, string department)
        {
            //string wParam = "";
            //if (officeCode == "H")
            //{
            //    switch (department)
            //    {
            //        case "1":     // 設計
            //            wParam = " AND (LEFT(TaskCode, 1) = 'B' OR LEFT(TaskCode, 1) = 'C' OR LEFT(TaskCode, 1) = 'F')";
            //            break;
            //        case "2":     // 測量
            //            wParam = " AND (LEFT(TaskCode, 1) = 'A' OR LEFT(TaskCode, 1) = 'E' OR LEFT(TaskCode, 1) = 'F')";
            //            break;
            //        default:
            //            wParam = " AND (LEFT(TaskCode, 1) = 'D' OR LEFT(TaskCode, 1) = 'F' OR LEFT(TaskCode, 1) = 'G' OR LEFT(TaskCode, 1) = 'Z')";
            //            break;
            //    }
            //}

            ListFormDataOp lo = new ListFormDataOp();

            ////tcd = lo.SelectTaskCodeNameData(officeCode);
            //tcd = lo.SelectTaskCodeNameData(officeCode, wParam, 1);
            tcd = lo.SelectTaskCodeNameData(officeCode, department, null);
            if (tcd == null)
            {
                return;
            }
            dataGridView1.Rows.Clear();
            //dataGridView1.Rows.Add(tcd.GetLength(0) - 1);
            //if (tcd.GetLength(0) <= 1)
            if (tcd.Length <= 1)
            {
                dataGridView1.Rows.Add(1);
            }
            else
            {
                //dataGridView1.Rows.Add(tcd.GetLength(0) - 1);
                dataGridView1.Rows.Add(tcd.Length - 1);
            }
            TaskData     td = new TaskData();
            PartnersData pd = new PartnersData();

            //for ( int i = 0; i < tcd.GetLength( 0 ); i++ )
            for (int i = 0; i < tcd.Length; i++)
            {
                dataGridView1.Rows[i].Cells["TaskNo"].Value = tcd[i].TaskCode;
                dataGridView1.Rows[i].Cells["Task"].Value   = tcd[i].TaskName;

                td = td.SelectTaskData(tcd[i].TaskID);    //taskIDからtaskを読みPartnerとStartDate,EndDateを得る
                if (td.TaskName == null)
                {
                    return;
                }
                dataGridView1.Rows[i].Cells["Partner"].Value   = pd.SelectPartnerName(td.PartnerCode);
                dataGridView1.Rows[i].Cells["StartDate"].Value = (td.StartDate.StripTime()).ToString("yyyy年MM月dd日");
                dataGridView1.Rows[i].Cells["EndDate"].Value   = (td.EndDate.StripTime()).ToString("yyyy年MM月dd日");
            }
            seqNoReNumbering(dataGridView1, "TSeq");

            checkExistingTaskData();
        }
Ejemplo n.º 15
0
        private bool dispTaskInformation(string taskCode)
        {
            ListFormDataOp   lo   = new ListFormDataOp();
            TaskCodeNameData tcnd = lo.SelectTaskCodeNameData(taskCode, Convert.ToString(comboBoxOffice.SelectedValue));
            TaskData         td   = lo.SelectTaskData(taskCode);

            if (td == null)
            {
                return(false);
            }
            textBoxTaskName.Text = td.TaskName;
            labelTaskPlace.Text  = td.TaskPlace;
            labelStartDate.Text  = (td.StartDate.StripTime()).ToString("yyyy年MM月dd日");
            labelEndDate.Text    = (td.EndDate.StripTime()).ToString("yyyy年MM月dd日");
            labelSalesMCode.Text = td.SalesMCode;

            DataTable   dt;
            DataRow     dr;
            SqlHandling sql;

            if (td.PartnerCode != null)
            {
                sql = new SqlHandling("M_Partners");
                if ((dt = sql.SelectAllData("WHERE PartnerCode = '" + td.PartnerCode + "'")) != null)
                {
                    dr = dt.Rows[0];
                    labelPartnerName.Text = Convert.ToString(dr["PartnerName"]);
                    labelPartnerCode.Text = Convert.ToString(dr["PartnerCode"]);
                }
            }


            // 20190302 asakawa
            // add start
            labelLeaderMName.Text = "";
            labelSalesMName.Text  = "";
            // add end


            //if (tcnd.LeaderMCode != null && tcnd.LeaderMCode != " ")
            if (tcnd != null && tcnd.LeaderMCode != null && tcnd.LeaderMCode != " ")
            {
                sql = new SqlHandling("M_Members");
                if ((dt = sql.SelectAllData("WHERE MemberCode = '" + tcnd.LeaderMCode + "'")) != null)
                {
                    dr = dt.Rows[0];
                    labelLeaderMName.Text = Convert.ToString(dr["Name"]);
                    labelLeaderMCode.Text = tcnd.LeaderMCode;
                }
            }

            if (td.SalesMCode != " ")
            {
                sql = new SqlHandling("M_Members");
                if ((dt = sql.SelectAllData("WHERE MemberCode = '" + td.SalesMCode + "'")) != null)
                {
                    dr = dt.Rows[0];
                    labelSalesMName.Text = Convert.ToString(dr["Name"]);
                }
            }


            return(true);
        }
Ejemplo n.º 16
0
        private void textBox_KeyDown(object sender, KeyEventArgs e)
        {
            labelMes.Text = "";
            if (iniPro)
            {
                return;
            }

            TextBox          tb = (TextBox)sender;
            ListFormDataOp   lo = new ListFormDataOp();
            TaskCodeNameData tcd;

            if (e.KeyCode == Keys.Enter)
            {
                switch (tb.Name)
                {
                case "textBoxItem":
                    if (!selectCostMaster(textBoxItem.Text))
                    {
                        MessageBox.Show("指定された原価コードのデータはありません");
                        return;
                    }
                    tcas = setupSourceTaskCodeNameArray(dateTimePickerFr.Value, dateTimePickerTo.Value,
                                                        textBoxItem.Text, Convert.ToString(comboBoxOffice.SelectedValue), 0);
                    break;

                case "textBoxSTask":
                    tcd = lo.SelectTaskCodeNameData(textBoxSTask.Text, Convert.ToString(comboBoxOffice.SelectedValue));
                    if (tcd != null)
                    {
                        labelSTaskName.Text = tcd.TaskName;
                    }
                    break;

                case "textBoxDTask":
                    tcd = lo.SelectTaskCodeNameData(textBoxDTask.Text, Convert.ToString(comboBoxOffice.SelectedValue));
                    if (tcd != null)
                    {
                        labelDTaskName.Text = tcd.TaskName;
                    }
                    break;

                default:
                    break;
                }
            }

            if ((e.Modifiers & Keys.Control) != Keys.Control)
            {
                return;                                                 // Ctrlキーが押下された時のみ以下処理
            }
            if (e.KeyCode == Keys.A)
            {
                switch (tb.Name)
                {
                case "textBoxItem":
                    chooseCostData();
                    if (String.IsNullOrEmpty(textBoxItem.Text))
                    {
                        labelItem.Text = "";
                        return;
                    }
                    tcas = setupSourceTaskCodeNameArray(dateTimePickerFr.Value, dateTimePickerTo.Value,
                                                        textBoxItem.Text, Convert.ToString(comboBoxOffice.SelectedValue), 0);
                    break;

                case "textBoxSTask":
                    chooseTaskCodeNameData(((tcas == null) ? tcad : tcas), textBoxSTask, labelSTaskName);
                    //if ( tcas == null )
                    //{
                    //    chooseTaskCodeNameData( tcad, textBoxSTask, labelSTaskName );
                    //}
                    //else
                    //{
                    //    chooseTaskCodeNameData( tcas, textBoxSTask, labelSTaskName );
                    //}
                    break;

                case "textBoxDTask":
                    chooseTaskCodeNameData(tcad, textBoxDTask, labelDTaskName);
                    break;

                default:
                    break;
                }
            }
        }