예제 #1
0
    //----------------------------------------------------------
    //	получить значение колонки для записи в А-файл
    static string  GetColValue(int ColNumber)
    {
        if (ColNumber < 0)
        {
            return("");
        }
        string Result;

        if (AModel.ColOfCsv(ColNumber) < 0)
        {
            Result = AModel[ColNumber];
        }
        else
        {
            Result = TsvFile[AModel.ColOfCsv(ColNumber)];
        }
        if ((ColNumber == CSepAFileInfo.L_PURPOSE) ||
            (ColNumber == CSepAFileInfo.L_DEBITNAME) ||
            (ColNumber == CSepAFileInfo.L_CREDITNAME)
            )
        {
            Result = Result.Trim().Replace(CAbc.BIG_UKR_I, "I").Replace(CAbc.SMALL_UKR_I, "i");
        }
        if (ColNumber == CSepAFileInfo.L_SUMA)
        {
            Result = Result.Trim().Replace(",", ".");
            money Crncy = CCommon.CCur(Result) * 100;
            long  Val   = ( long )Crncy;
            Result = CCommon.Right(Val.ToString(), CSepAFileInfo.Record_Field_Size[CSepAFileInfo.L_SUMA]);
        }
        return(Result);
    }