Ejemplo n.º 1
0
        private void CalcTaxPriceText()
        {
            string sKubun;
            int    nTanka;
            int    nCount;
            double dTaxPar;

            string[] ary;
            string   sStr;

            sKubun        = cmbTaxKubun.Text;
            nTanka        = m_libCmn.StrToInt(txtTanka.Text);
            nCount        = m_libCmn.StrToInt(txtKosu.Text);
            dTaxPar       = m_libCmn.StrToDouble(txtSrcTaxPar.Text);
            sStr          = m_libCmn.CalcTaxPrice(sKubun, nTanka, nCount, dTaxPar);
            ary           = sStr.Split(',');
            txtTax.Text   = ary[0];
            txtPrice.Text = ary[1];
        }
Ejemplo n.º 2
0
        private void btnSetElement_Click(object sender, RoutedEventArgs e)
        {
            int         max, idx, no, lineidx;
            DataRowView dataRowView;
            DataRow     dataRow;

            string[] ary;
            int      nSelectidx;
            string   sStr;
            int      nTanka, nTax, nCount, nPrice;

            SetModify(true);
            max = dgHanbai.SelectedItems.Count;
            for (idx = 0; idx < max; idx++)
            {
                dataRowView           = (DataRowView)dgHanbai.SelectedItems[idx];
                no                    = (int)dataRowView.Row[0];
                lineidx               = no - 1;
                dataRow               = m_dt.Rows[lineidx];
                dataRow["col_change"] = 1;
                if (chkSetSouke.IsChecked == true)
                {
                    dataRow["col_souke"] = txtSetSouke.Text;
                }
                if (chkSetKokubetu.IsChecked == true)
                {
                    dataRow["col_kokubetu"] = txtSetKokubetu.Text;
                }
                if (chkSetSyouhin.IsChecked == true)
                {
                    ary    = m_sSyouhinElement.Split(',');
                    nTanka = m_libCmn.StrToInt(ary[1]);
                    dataRow["col_name"]  = ary[0];
                    dataRow["col_tanka"] = nTanka;
                    dataRow["col_tani"]  = ary[2];
                    nCount = m_libCmn.StrToInt(dataRow["col_kosu"].ToString());
                    // dataRow["col_kosu"] = m_libCmn.StrToInt(ary[3]);
                    dataRow["col_taxkind"] = ary[3];
                    sStr = m_libCmn.CalcTaxPrice(ary[3], nTanka, nCount, m_dTaxPar);
                    ary  = sStr.Split(',');
                    dataRow["col_tax"]   = ary[0];
                    dataRow["col_price"] = ary[1];
                }
                if (chkSetSeikyuSaki.IsChecked == true)
                {
                    ary = m_sSeikyuusakiElement.Split(',');
                    dataRow["col_seikyu"]      = ary[0];
                    dataRow["col_busho"]       = ary[1];
                    dataRow["col_skskeisyou"]  = ary[2];
                    dataRow["col_skakeisyou"]  = ary[3];
                    dataRow["col_seikyupost"]  = ary[4];
                    dataRow["col_seikyuadrs1"] = ary[5];
                    dataRow["col_seikyuadrs2"] = ary[6];
                    dataRow["col_seikyutel"]   = ary[7];
                    dataRow["col_seikyufax"]   = ary[8];
                    dataRow["col_seikyupay"]   = ary[9];
                }
                if (chkSetSeikyuKubun.IsChecked == true)
                {
                    nSelectidx = cmbSetSeikyuKubun.SelectedIndex;
                    ary        = m_lstSeikyuKubun[nSelectidx].Split(',');
                    dataRow["col_seikyukubun"] = ary[1];
                }
            }
            dgHanbai.DataContext = m_dt;
            updateHanbaiData();
            SetModify(false);
        }