Example #1
0
 public DataImportExecutor(string ConnectionString)
 {
     ImportLock            = new Semaphore(5, 5);
     tasks                 = new List <Task>();
     this.ConnectionString = ConnectionString;
     repo = new LandingRepository(ConnectionString);
 }
        public OracleDataImport(Landing_Table Table, int ExecutionId, LandingRepository Repository)
        {
            String password = RijndaelSimple.Decrypt(Table.Source_Pass, "passPhrase", "saltValue", "SHA1", 1, "initVector", 128);

            repo = Repository;

            this.Table             = Table;
            sourceConnectionString = "Provider=OraOLEDB.Oracle; Data Source=" + Table.Source_DB + ".world; User Id=" + Table.Source_User + "; Password="******";";

            tableName        = TableName;
            this.ExecutionId = ExecutionId;
        }
Example #3
0
        static void Main(string[] args)
        {
            LandingRepository repo = new LandingRepository();

            logger.Info("~~~~ Program Started ~~~~");

            List <Landing_Table> import_tables = repo.GetLandingTables();

            foreach (Landing_Table table in import_tables)
            {
                logger.Info("Importing {0}", table.Table_Name);
                Landing_Table_Log TableLog = repo.New_Log_Record(table.id);

                try
                {
                    String password = RijndaelSimple.Decrypt(table.Source_Pass, "PLanning and Audit", "Diplomatic Persistance", "SHA1", 1, "AGHYEFIVOPJNSFRU", 128);

                    if (repo.TableExists(table.Dest_Schema, table.Table_Name))
                    {
                        logger.Debug("Table {0}.{1} exists", table.Dest_Schema, table.Table_Name);
                    }
                    else
                    {
                        logger.Debug("Table {0}.{1} does not exist", table.Dest_Schema, table.Table_Name);
                    }


                    TableLog.Start_Time = DateTime.Now;
                    TableLog.Success    = 0;
                    repo.Update_Log(TableLog);
                } catch (Exception ex)
                {
                    TableLog.Notes = "Exception: " + ex.Message;
                    logger.Error(ex, "Error loading table " + table.Table_Name);
                } finally
                {
                    logger.Info("Finished {0}", table.Table_Name);
                    TableLog.End_Time = DateTime.Now;
                    repo.Update_Log(TableLog);
                }
            }


            logger.Info("~~~~ Program Finished ~~~~");


            //System.Console.ReadKey();
            LogManager.Flush();
            LogManager.Shutdown();
        }
Example #4
0
    protected override void OnInit(EventArgs e)
    {
        LandingRepository landingRepository = new LandingRepository();
        landingPage = landingRepository.GetLandingPage(GeneralExtensions.GetQueryStringId());

        CommonRepository commonRepository = new CommonRepository();
        UserExtensions userExtensions = new UserExtensions();

        if (userExtensions.IsUserLoggedIn() && System.Web.HttpContext.Current.Request.RawUrl.Contains("resources"))
        {
            ltlServices.Text = commonRepository.GetServices("MemberResourcesCollectionId".GetAppKeyLong());
        }
        else
        {
            ltlServices.Text = commonRepository.GetServices(landingPage.ServicesCollectioId.ConvertToLong());

        }
    }
Example #5
0
 public LandingUseCase(LandingRepository repo) : base()
 {
     this.repo = repo;
 }