Esempio n. 1
0
        public void step_03()
        {
            Logger.PrintStepName("Step 3");
            Logger.PrintAction("Выбрать период и нажать кнопку Составить отчет.", "");
            string startDD, startMM, startYYYY, endDD, endMM, endYYYY;


            //   var t = "select logical_date from logical_date@" + db_Ans + @" where rownum<2";
            var tm = Executor.ExecuteSelect("select logical_date from logical_date@" + db_Ans + @" where rownum<2");

            string dateB = Convert.ToDateTime(tm[0, 0]).ToShortDateString();
            var    d     = dateB.Split('.');

            if (Convert.ToInt32(d[0]) < 10)
            {
                startDD = d[0].Substring(1);
            }
            else
            {
                startDD = d[0];
            }
            startMM   = MonthArr[Convert.ToInt32(d[1])];
            startYYYY = (Convert.ToInt32(d[2]) - 1).ToString();
            endDD     = startDD;
            endMM     = startMM;
            endYYYY   = d[2];

            finansAndDetalizationPage.SetPeriod(Convert.ToInt32(startDD), startMM, startYYYY, Convert.ToInt32(endDD), endMM, endYYYY);

            string rezult = finansAndDetalizationPage.CheckBillTable();

            if (rezult != "success")
            {
                Logger.PrintRezult(false, rezult);
                globalR = false;
            }
            else
            {
                Logger.PrintRezult(true, "Таблица счетов корретная");
            }

            rezult = "";
        }