2021-07-23 14:55:31 +05:00
|
|
|
|
//using AsbCloudApp.Data;
|
|
|
|
|
//using AsbCloudDb.Model;
|
|
|
|
|
//using AsbCloudInfrastructure.Services;
|
|
|
|
|
//using AsbCloudInfrastructure.Services.Cache;
|
|
|
|
|
//using AsbSaubReport;
|
|
|
|
|
//using AutoMapper;
|
|
|
|
|
//using Microsoft.EntityFrameworkCore;
|
2021-04-02 17:28:07 +05:00
|
|
|
|
using System;
|
2021-07-16 09:15:10 +05:00
|
|
|
|
using System.Collections.Generic;
|
2021-07-23 14:55:31 +05:00
|
|
|
|
using System.IO;
|
2021-04-02 17:28:07 +05:00
|
|
|
|
|
|
|
|
|
namespace ConsoleApp1
|
|
|
|
|
{
|
2021-04-07 18:01:56 +05:00
|
|
|
|
|
2021-04-02 17:28:07 +05:00
|
|
|
|
class Program
|
|
|
|
|
{
|
|
|
|
|
static void Main(string[] args)
|
|
|
|
|
{
|
2021-07-23 14:55:31 +05:00
|
|
|
|
//var options = new DbContextOptionsBuilder<AsbCloudDbContext>()
|
|
|
|
|
// .UseNpgsql("Host=localhost;Database=postgres;Username=postgres;Password=q;Persist Security Info=True")
|
|
|
|
|
// .Options;
|
|
|
|
|
//var context = new AsbCloudDbContext(options);
|
|
|
|
|
|
2021-07-27 14:43:30 +05:00
|
|
|
|
//var idWell = 1;
|
|
|
|
|
//var dataSource = new ReportDataSourcePgCloud(context, idWell);
|
2021-07-23 14:55:31 +05:00
|
|
|
|
//var generator = new PdfGenerator(dataSource)
|
2021-06-04 09:59:20 +05:00
|
|
|
|
//{
|
2021-07-27 14:43:30 +05:00
|
|
|
|
// ReportDirectory = $"{idWell}",
|
2021-07-23 14:55:31 +05:00
|
|
|
|
// Begin = DateTime.Now.AddYears(-30),
|
|
|
|
|
// End = DateTime.Now.AddYears(30),
|
|
|
|
|
// Step = TimeSpan.FromDays(1),
|
|
|
|
|
// WithCharts = true,
|
|
|
|
|
// WithEvents = true
|
2021-06-04 09:59:20 +05:00
|
|
|
|
//};
|
2021-04-23 10:21:25 +05:00
|
|
|
|
|
2021-07-23 14:55:31 +05:00
|
|
|
|
//generator.OnProgress += Generator_OnProgress;
|
|
|
|
|
//var s = generator.GetPagesCount();
|
|
|
|
|
//var fileName = generator.Make();
|
2021-04-23 10:21:25 +05:00
|
|
|
|
|
2021-04-08 17:54:02 +05:00
|
|
|
|
|
|
|
|
|
Console.WriteLine("Done. Press any key to quit.");
|
|
|
|
|
Console.ReadKey();
|
2021-04-02 17:28:07 +05:00
|
|
|
|
}
|
2021-04-07 18:01:56 +05:00
|
|
|
|
|
2021-07-23 14:55:31 +05:00
|
|
|
|
private static void Generator_OnProgress(object sender, (float progress, string operation) e)
|
|
|
|
|
{
|
|
|
|
|
//throw new NotImplementedException();
|
|
|
|
|
}
|
2021-04-02 17:28:07 +05:00
|
|
|
|
}
|
|
|
|
|
}
|