예제 #1
0
 public void ShowFuncInfo()
 {
     Console.WriteLine(LineNum.ToString());
     Console.WriteLine(UsefulStringsNum.ToString());
     Console.WriteLine(KeywordsNum.ToString());
     Console.WriteLine(FuncName);
 }
예제 #2
0
    public bool Load(CCommand Command, string FileName, string BranchCode, string TaskCode)
    {
        int    LineNum;
        bool   Result = true;
        string DebitAcc, CreditAcc, DebitIBAN, CreditIBAN;

        if (AFileReader == null)
        {
            return(false);
        }
        if (AFileReader.Open(FileName, CAbc.CHARSET_DOS))
        {
            string ShortFileName = CCommon.GetFileName(FileName);
            LineNum = 1;
            while (AFileReader.Read())
            {
                DebitAcc   = AFileReader[CSepAFileInfo.L_DEBITACC].Replace("'", "`").Trim();
                DebitAcc   = CCommon.IsDigit(DebitAcc) ? DebitAcc : AFileReader[CSepAFileInfo.L_DEBITACC_EXT].Replace("'", "`").Trim();
                DebitAcc   = CCommon.IsDigit(DebitAcc) ? DebitAcc : "";
                CreditAcc  = AFileReader[CSepAFileInfo.L_CREDITACC].Replace("'", "`").Trim();
                CreditAcc  = CCommon.IsDigit(CreditAcc) ? CreditAcc : AFileReader[CSepAFileInfo.L_CREDITACC_EXT].Replace("'", "`").Trim();
                CreditAcc  = CCommon.IsDigit(CreditAcc) ? CreditAcc : "";
                DebitIBAN  = AFileReader[CSepAFileInfo.L_DEBITIBAN].Replace("'", "`").Trim();
                DebitIBAN  = CCommon.IsLetter(DebitIBAN) ? DebitIBAN : CAbc.EMPTY;
                CreditIBAN = AFileReader[CSepAFileInfo.L_CREDITIBAN].Replace("'", "`").Trim();
                CreditIBAN = CCommon.IsLetter(CreditIBAN) ? CreditIBAN : CAbc.EMPTY;
                CmdText    = "exec  dbo.pMega_OpenGate_AddPalvis "
                             + " @TaskCode     = '" + TaskCode.Trim() + "'"
                             + ",@BranchCode   = '" + BranchCode.Trim() + "'"
                             + ",@FileName     = '" + ShortFileName + "'"
                             + ",@LineNum      =  " + LineNum.ToString()
                             + ",@Code         = '" + AFileReader[CSepAFileInfo.L_NDOC].Replace("'", "`").Trim() + "'"
                             + ",@Ctrls        = '" + AFileReader[CSepAFileInfo.L_SYMBOL].Replace("'", "`").Trim() + "'"
                             + ",@SourceCode   = '" + AFileReader[CSepAFileInfo.L_DEBITMFO].Replace("'", "`").Trim() + "'"
                             + ",@DebitMoniker = '" + DebitAcc + "'"
                             + ",@DebitName    = '" + AFileReader[CSepAFileInfo.L_DEBITNAME].Replace("'", "`").Trim() + "'"
                             + ",@DebitState   = '" + AFileReader[CSepAFileInfo.L_OKPO1].Replace("'", "`").Trim() + "'"
                             + ",@DebitIBAN    = '" + DebitIBAN + "'"
                             + ",@TargetCode   = '" + AFileReader[CSepAFileInfo.L_CREDITMFO].Replace("'", "`").Trim() + "'"
                             + ",@CreditMoniker= '" + CreditAcc + "'"
                             + ",@CreditName   = '" + AFileReader[CSepAFileInfo.L_CREDITNAME].Replace("'", "`").Trim() + "'"
                             + ",@CreditState  = '" + AFileReader[CSepAFileInfo.L_OKPO2].Replace("'", "`").Trim() + "'"
                             + ",@CreditIBAN   = '" + CreditIBAN + "'"
                             + ",@CrncyAmount  =  " + AFileReader[CSepAFileInfo.L_SUMA].Replace("'", "`").Trim()
                             + ",@CurrencyId   =  " + AFileReader[CSepAFileInfo.L_CURRENCY].Replace("'", "`").Trim()
                             + ",@Purpose      = '" + AFileReader[CSepAFileInfo.L_PURPOSE].Replace("'", "`").Trim() + "'"
                             + ",@OrgDate      =  " + CCommon.StrDate_To_IntDate("20" + AFileReader[CSepAFileInfo.L_DATE2].Trim())
                             + ",@UserName		= '******'"
                ;
                if (Command.Execute(CmdText) != true)
                {
                    Result = false;
                }
                LineNum = LineNum + 1;
                CConsole.ShowBox("", " Загружается строка" + CCommon.StrI(LineNum, 5) + " ", "");
            }
        }
        AFileReader.Close();
        return(Result);
    }
예제 #3
0
        public override string ToString()
        {
            string value1 = string.Empty;

            if (TokenType == LexerTokenType.KEYWORD)
            {
                value1 = Keyword.ToString();
            }
            else
            {
                value1 = Value;
            }
            StringBuilder sb = new StringBuilder(128);

            sb.Append("Token value:");
            sb.Append(Value);
            sb.Append(", type:");
            sb.Append(TokenType.ToString());
            if (TokenType == LexerTokenType.KEYWORD)
            {
                sb.Append(", key:" + Keyword.ToString());
            }
            sb.Append(", lineNum:");
            sb.Append(LineNum.ToString());
            sb.Append(", position:");
            sb.Append(Position.ToString());
            return(sb.ToString());
        }
예제 #4
0
 override public String ToString()
 {
     return(Type.ToString() + ":\t" + Message + "\t@" + LineNum.ToString());
 }