Exemplo n.º 1
0
        public static void ExecuteTransferFromZipToMssql()
        {
            var sqlContext = new SupermarketsChainMssqlContext();

            Console.WriteLine();
            Console.WriteLine("Extracting data from reports...\n");
            var zipManager = new ZipManager(Constants.SalesImportPath, sqlContext);

            using (TransactionScope tran = new TransactionScope())
            {
                Console.WriteLine("\nSending data to SQL Server...");
                zipManager.TransferData();
                tran.Complete();
            }

            Console.WriteLine("Sales reports imported.");
        }
Exemplo n.º 2
0
        public static void ExecuteTransferFromXmlToMssql()
        {
            var sqlContext = new SupermarketsChainMssqlContext();

            Console.WriteLine();
            Console.WriteLine("Extracting data from reports...\n");
            var xmlManager = new XmlManager(Constants.XmlExpensesPath, sqlContext);

            using (TransactionScope tran = new TransactionScope())
            {
                Console.WriteLine("\nSending data to SQL Server...");
                xmlManager.TransferData();
                tran.Complete();
            }

            Console.WriteLine("Sales reports imported.");
        }
Exemplo n.º 3
0
 public XmlManager(string expensesImportPath, SupermarketsChainMssqlContext context)
 {
     this.ExpensesImportPath = expensesImportPath;
     this.SqlMarketContext = context;
 }
Exemplo n.º 4
0
 public XmlManager(string expensesImportPath, SupermarketsChainMssqlContext context)
 {
     this.ExpensesImportPath = expensesImportPath;
     this.SqlMarketContext   = context;
 }
Exemplo n.º 5
0
 public ZipManager(string archivePath, SupermarketsChainMssqlContext context)
 {
     this.ArchivePath = archivePath;
     this.SqlMarketContext = context;
 }
Exemplo n.º 6
0
 public ZipManager(string archivePath, SupermarketsChainMssqlContext context)
 {
     this.ArchivePath      = archivePath;
     this.SqlMarketContext = context;
 }