Пример #1
0
        static void Main(string[] args)
        {
            LogConfiguration.ConfigureSerilog();
            Log.Logger.Information("Start Processing Ticking Report!");

            System.Data.DataTable table = QueryOnBase();

            if (table.Rows.Count > 0)
            {
                var tempFile = System.IO.Path.Combine(System.IO.Path.GetTempPath(), Guid.NewGuid().ToString());

                WriteExcelSpreadsheet(table, tempFile);
                StoreInOnBase(tempFile);

                File.Delete(tempFile);
            }

            Log.Logger.Information("Finished Processing Ticking Report! Transaction Count: {transactionCount}", table.Rows.Count);

            LogConfiguration.FlushSerilog();
        }
Пример #2
0
        static void Main(string[] args)
        {
            LogConfiguration.ConfigureSerilog();

            Log.Logger.Information("Extract Started! {0}", System.Configuration.ConfigurationManager.AppSettings["Application.Name"]);

            System.Data.DataTable table = QueryOnBase();

            Log.Logger.Information("Extract Ended! Unity Forms Extracted: {formsExtracted}", table.Rows.Count);

            if (table.Rows.Count > 0)
            {
                var tempFile = System.IO.Path.Combine(System.IO.Path.GetTempPath(), Guid.NewGuid().ToString());

                WriteExcelSpreadsheet(table, tempFile);
                StoreInOnBase(tempFile);

                File.Delete(tempFile);
            }

            Log.Logger.Information("Extract Stored in OnBase");

            LogConfiguration.FlushSerilog();
        }