Exemplo n.º 1
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;
        }
Exemplo n.º 2
0
        private bool writeTaskCodeToTaskEntryData()
        {
            if (tcds == null)
            {
                return(false);
            }
            TaskEntryData tentd = new TaskEntryData();

            if (tentd.ExistenceTaskEntryData("TaskCode", "@tCod", tcds.TaskCode, "Char"))
            {
                return(false);                                                                                 // 既存
            }
            ted             = new TaskEntryData();
            tcds.OfficeCode = Convert.ToString(comboBoxOffice.SelectedValue);
            tcds.Department = Convert.ToString(comboBoxDepartment.SelectedValue);
            ted.EditTaskEntryData(ted, tcds, Convert.ToInt32(labelTaskEntryID.Text));

            if (!ted.UpdateTaskEntryData(ted))
            {
                return(false);
            }
            return(true);
        }