Пример #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.");
        }
Пример #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.");
        }
Пример #3
0
 public XmlManager(string expensesImportPath, SupermarketsChainMssqlContext context)
 {
     this.ExpensesImportPath = expensesImportPath;
     this.SqlMarketContext = context;
 }
Пример #4
0
 public XmlManager(string expensesImportPath, SupermarketsChainMssqlContext context)
 {
     this.ExpensesImportPath = expensesImportPath;
     this.SqlMarketContext   = context;
 }
Пример #5
0
 public ZipManager(string archivePath, SupermarketsChainMssqlContext context)
 {
     this.ArchivePath = archivePath;
     this.SqlMarketContext = context;
 }
Пример #6
0
 public ZipManager(string archivePath, SupermarketsChainMssqlContext context)
 {
     this.ArchivePath      = archivePath;
     this.SqlMarketContext = context;
 }