Пример #1
0
        private void textBox_KeyDown(object sender, KeyEventArgs e)
        {
            TextBox tbx = ( TextBox )sender;

            if ((e.Modifiers & Keys.Control) != Keys.Control)
            {
                return;                                                     // Ctrlキーが押下された時のみ以下処理
            }
            switch (e.KeyCode)
            {
            case Keys.A:
                if (etcd == null)
                {
                    MessageBox.Show("Dataがありません。");
                    return;
                }
                TaskCodeNameData tcds = FormTaskCodeNameList.ReceiveItems(etcd);
                if (tcds == null)
                {
                    return;
                }
                textBoxTaskName.Text  = tcds.TaskName;
                labelTaskEntryID.Text = Convert.ToString(tcds.TaskID);            // TaskEntryIDはTaskIDに格納されている
                if (!displayTaskData(tcds))
                {
                    return;
                }
                buttonTask.Enabled = string.IsNullOrEmpty(labelTaskCode.Text.Trim()) ? true : false;
                buttonTask.Visible = string.IsNullOrEmpty(labelTaskCode.Text.Trim()) ? true : false;
                break;

            default:
                break;
            }
        }
Пример #2
0
        private void chooseTaskCodeNameData(TaskCodeNameData[] tca, TextBox tBox, Label tLbl)
        {
            TaskCodeNameData tcnd = FormTaskCodeNameList.ReceiveItems(tca);

            if (tcnd == null)
            {
                return;
            }
            tBox.Text = tcnd.TaskCode;
            tLbl.Text = tcnd.TaskName;
        }
Пример #3
0
        private void chooseTaskCodeNameData()
        {
            TaskCodeNameData tcds = FormTaskCodeNameList.ReceiveItems(tcd);

            if (tcds == null)
            {
                return;
            }

            textBoxTaskCode.Text = tcds.TaskCode;
            textBoxTaskName.Text = tcds.TaskName;
            dispTaskInformation(textBoxTaskCode.Text);
        }
Пример #4
0
        //----------------------------------------------------------------------------//
        //     SubRoutine                                                             //
        //----------------------------------------------------------------------------//

        // 業務名を業務名一覧画面から得る
        //private void chooseTaskName( TaskCodeNameData[] tcd )
        private void chooseTaskName( )
        {
            comboBoxCostType.Visible      = false;
            this.textBoxTaskName.Location = new Point(101, 61);

            tcds = FormTaskCodeNameList.ReceiveItems(tcd);

            if (tcds == null)
            {
                return;
            }

            ted.TaskEntryID = 0;

            ted.EditTaskEntryData(ted, tcds, 0);

            textBoxTaskName.Text  = ted.TaskName;
            comboBoxPartner.Text  = ted.PartnerName;
            textBoxTaskPlace.Text = ted.TaskPlace;
            labelTaskCode.Text    = ted.TaskCode;
        }
Пример #5
0
        // 業務番号と業務名をFormTaskCodeNameList画面から得る
        private void chooseTaskCodeNameData(DataGridViewRow dgvRow)
        {
            if (tcd == null)
            {
                return;
            }

            TaskCodeNameData tcds = FormTaskCodeNameList.ReceiveItems(tcd);

            if (tcds == null)
            {
                return;
            }
            dgvRow.Cells["TaskCode"].Value = tcds.TaskCode;
            dgvRow.Cells["TaskName"].Value = tcds.TaskName;
            TaskIndData tid = new TaskIndData();

            tid = tid.SelectTaskIndData(tcds.TaskCode);
            if (tid == null)
            {
                return;
            }
            dgvRow.Cells["LeaderMCode"].Value = "0" + tid.LeaderMCode;
        }
Пример #6
0
        private void button_Click(object sender, EventArgs e)
        {
            Button btn = ( Button )sender;

            if (btn.Name == "buttonClose")
            {
                this.Close();
                return;
            }

            if (btn.Name == "buttonStoreMWorkItems")
            {
                if (formImpMWorkItems == null || formImpMWorkItems.IsDisposed)
                {
                    formImpMWorkItems = new FormImpMWorkItems(hp);
                    formImpMWorkItems.Show();
                }
                else
                {
                    MessageBox.Show(msgAlready);
                }
                return;
            }

            TaskEntryData itd = new TaskEntryData();

            if (btn.Name == "buttonAdd")
            {
                //itd.OfficeCode = Convert.ToString( comboBoxOffice.SelectedValue );
                //itd.Department = Convert.ToString( comboBoxDepartment.SelectedValue );
                //itd.OfficeName = comboBoxOffice.Text;
                //itd.DepartName = comboBoxDepartment.Text;

                //labelTaskEntryID.Text = "";
            }
            else
            {
                if (labelTaskEntryID.Text == "" || labelTaskEntryID.Text == "0")
                {
                    DMessage.DataNotEnough();
                    return;
                }

                itd = itd.SelectTaskEntryData(Convert.ToInt32(labelTaskEntryID.Text));

                itd.MemberCode     = hp.MemberCode;
                itd.TaxRate        = hp.TaxRate;
                itd.AdminCostRate  = hp.AdminCostRate;
                itd.OthersCostRate = hp.OthersCostRate;
                itd.Expenses       = hp.Expenses;

                itd.OfficeCode = Conv.OfficeCode;
                itd.Department = Conv.DepartCode;

                itd.PartnerName = labelPartner.Text;
            }

            switch (btn.Name)
            {
            case "buttonEstimate":
                formEstimate = new FormEstimate(itd);
                formEstimate.Show();
                break;

            case "buttonPlanning":
                formPlanning = new FormPlanning(itd);
                formPlanning.Show();
                break;

            case "buttonOsDetail":
                formOutsource = new FormOutsource(itd);
                formOutsource.Show();
                break;

            case "buttonContract":
                formContract = new FormContract(itd);
                formContract.Show();
                break;

            case "buttonRegular":
                formRegular = new FormRegular(itd);
                formRegular.Show();
                break;

            case "buttonVolumeInvoice":
                formVolumeInvoice = new FormVolumeInvoice(itd);
                formVolumeInvoice.Show();
                break;

            case "buttonInvoice":
                formInvoice = new FormInvoice(itd);
                formInvoice.Show();
                break;

            //case "buttonDetail":
            //    displayDetailLabel(ted);
            //    break;

            case "buttonAdd":
                itd.OfficeCode = Conv.OfficeCode;
                itd.Department = Conv.DepartCode;
                itd.OfficeName = Conv.Office;
                itd.DepartName = Conv.Depart;

                labelTaskEntryID.Text = "";



                itd = FormTaskEntry.DispData(itd);
                displayDetailLabel(itd);

                comboBoxCostType.Text = itd.CostType;
                textBoxTaskName.Text  = itd.TaskName;
                labelPartner.Text     = itd.PartnerName;
                labelTaskPlace.Text   = itd.TaskPlace;
                labelTaskCode.Text    = itd.TaskCode;
                labelTaskEntryID.Text = Convert.ToString(itd.TaskEntryID);
                // ? 仮版 : 正式版
                labelTaskName.Text = (labelTaskCode.Text.Trim() == "") ? "": itd.TaskName;

                ListFormDataOp lo = new ListFormDataOp();
                etcd = lo.SelectTaskEntryNameData(itd.OfficeCode, itd.Department, null);

                buttonTask.Enabled = string.IsNullOrEmpty(labelTaskCode.Text.Trim()) ? true : false;
                buttonTask.Visible = string.IsNullOrEmpty(labelTaskCode.Text.Trim()) ? true : false;

                break;

            case "buttonTask":
                if (String.IsNullOrEmpty(textBoxTaskName.Text))
                {
                    MessageBox.Show("対応する見積・計画用業務名がありません");
                    return;
                }
                tcds = FormTaskCodeNameList.ReceiveItems(tcd);
                if (!writeTaskCodeToTaskEntryData())
                {
                    return;
                }
                if (!displayTaskData(tcds))
                {
                    return;
                }
                break;

            default:
                break;
            }
        }