Beispiel #1
0
        private void updateHanbaiRecord()
        {
            string sData;
            string sCsv;

            DateTime dt        = DateTime.Now;
            string   sCrtymdhm = dt.ToString("yyyy/MM/dd HH:mm");

            sData = getElementText();
            m_libOdbc.updateHanbai(sData);
            if (txtSeikyuSaki.Text != "")
            {
                m_nSeikyusakiId = searchSeikyuusakiId(txtSeikyuSaki.Text, txtSeikyuBusyo.Text);
                sCsv            = m_nSeikyusakiId + "," + sCrtymdhm + "," + txtSeikyuSaki.Text + "," + txtSeikyuBusyo.Text;
                sCsv            = sCsv + "," + cmbSKeisyou.Text + "," + cmbAKeisyou.Text;
                sCsv            = sCsv + "," + txtSeikyuPost.Text;
                sCsv            = sCsv + "," + txtSeikyuAdrs1.Text + "," + txtSeikyuAdrs2.Text;
                sCsv            = sCsv + "," + txtSeikyuTel.Text + "," + txtSeikyuFax.Text;
                sCsv            = sCsv + "," + txtSeikyuPay.Text + ",,";
                if (m_nSeikyusakiId == 0)
                {
                    m_nSeikyusakiId = m_libOdbc.insertSeikyusaki(sCsv);
                }
                else
                {
                    m_libOdbc.updateSeikyusaki(sCsv);
                }
            }
            m_bModify = false;
        }
        private void updateHanbaiData()
        {
            int     max, idx;
            DataRow dataRow;
            int     id, change;
            string  sData;


            DateTime dt = DateTime.Now;

            max = m_dt.Rows.Count;
            for (idx = 0; idx < max; idx++)
            {
                dataRow = m_dt.Rows[idx];
                id      = m_libCmn.StrToInt(dataRow["col_id"].ToString());
                change  = m_libCmn.StrToInt(dataRow["col_change"].ToString());
                dataRow["col_change"] = 0; //
                if (change == 1)
                {
                    dataRow["col_regdate"] = dt.ToString("yyyy/MM/dd hh:mm");
                    sData = getDataRowString(dataRow);
                    if (id == 0)
                    {
                        id = m_libOdbc.insertHanbai(sData);
                        dataRow["col_id"] = id;
                    }
                    else
                    {
                        m_libOdbc.updateHanbai(sData);
                    }
                }
            }
            dgHanbai.DataContext = m_dt;
        }
Beispiel #3
0
        private void saveHanbaiTable()
        {
            int max, idx;

            string[] sAry;

            max = m_aryRecLine.Length;
            for (idx = 0; idx < max; idx++)
            {
                sAry = m_aryRecLine[idx].Split(',');
                if (4 < sAry.Length)
                {
                    sAry[4]           = m_nCrtSougiId.ToString();
                    m_aryRecLine[idx] = m_libCmn.AryToCsvString(sAry);
                    m_libOdbc.updateHanbai(m_aryRecLine[idx]);
                }
            }
        }
        private void saveHanbaiTable()
        {
            string sTmp;

            string[] sSKAry;
            int      max, idx;

            string[] sAry;

            if (m_sSeikyusakiFilds != null && m_sSeikyusakiFilds != "")
            {
                sSKAry = m_sSeikyusakiFilds.Split(',');
            }
            else
            {
                sTmp   = "";
                sSKAry = sTmp.Split(',');
            }
            max = m_aryRecLine.Length;
            for (idx = 0; idx < max; idx++)
            {
                sAry = m_aryRecLine[idx].Split(',');
                if (4 < sAry.Length)
                {
                    sAry[3] = m_nCrtSeikyuId.ToString();
                    sAry[4] = m_nCrtSougiId.ToString();
                    if (12 < sSKAry.Length)
                    {
                        sAry[14] = sSKAry[2];
                        sAry[15] = sSKAry[3];
                        sAry[16] = sSKAry[4];
                        sAry[17] = sSKAry[5];
                        sAry[18] = sSKAry[6];
                        sAry[19] = sSKAry[7];
                        sAry[20] = sSKAry[8];
                        sAry[21] = sSKAry[9];
                        sAry[22] = sSKAry[10];
                        sAry[23] = sSKAry[11];
                    }
                    m_aryRecLine[idx] = m_libCmn.AryToCsvString(sAry);
                    m_libOdbc.updateHanbai(m_aryRecLine[idx]);
                }
            }
        }