Esempio n. 1
0
        private void dispCostList(string officeCode)
        {
            string wParam = " ORDER BY CostCode";

            if (labelItemCode.Text != "")
            {
                wParam = " AND ((CostCode LIKE '%999') OR (CostCode BETWEEN 'A' AND 'C'+'1') OR "
                         + "(CostCode LIKE 'D%' AND Item LIKE '" + textBoxItem.Text + "%') OR "
                         + "(CostCode LIKE 'E%') OR (CostCode BETWEEN 'G' AND 'Z'+'1') OR "
                         + "(CostCode = '" + labelItemCode.Text + "')) ORDER BY CostCode";
            }
            //wParam = " AND ((CostCode BETWEEN 'A' AND 'E'+'1') OR (CostCode BETWEEN 'G' AND 'Z'+'1') OR (CostCode = '" + labelItemCode.Text + "')) ORDER BY CostCode";
            ListFormDataOp lo = new ListFormDataOp();

            cmd = lo.SelectCostData(officeCode, wParam);
            if (cmd == null)
            {
                return;
            }
            dataGridView2.Rows.Clear();
            //dataGridView2.Rows.Add( cmd.GetLength( 0 ) - 1 );
            dataGridView2.Rows.Add(cmd.Length - 1);
            //for ( int i = 0; i < cmd.GetLength( 0 ); i++ )
            for (int i = 0; i < cmd.Length; i++)
            {
                dataGridView2.Rows[i].Cells["CItemCode"].Value   = cmd[i].CostCode;
                dataGridView2.Rows[i].Cells["CItem"].Value       = cmd[i].Item;
                dataGridView2.Rows[i].Cells["CItemDetail"].Value = cmd[i].ItemDetail;
                dataGridView2.Rows[i].Cells["CUnit"].Value       = cmd[i].Unit;
            }
            seqNoReNumbering(dataGridView2, "CSeq");

            checkExistingCostData();
        }
Esempio n. 2
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;
            }
        }
Esempio n. 3
0
        // 取引先マスタ外注データをFormSubComList画面から得る
        private void choosePartnersScData(DataGridViewRow dgvRow)
        {
            PartnersScData psds = FormSubComList.ReceiveItems(psd);

            if (psds == null)
            {
                return;
            }
            dgvRow.Cells["CoCompany"].Value = psds.PartnerName;
            ListFormDataOp lo = new ListFormDataOp();

            string editPartnerName = psds.PartnerName;

            cmd = lo.SelectCostData(Conv.OfficeCode, "CostCode", "F", editPartnerName.RemoveCorpForm());
        }
Esempio n. 4
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情報
        }