Esempio n. 1
0
        public static LoadProcess Read(long?loadProcessId)
        {
            var sql = new ReadLoadProcessTableTask(loadProcessId);

            sql.Execute();
            return(sql.LoadProcess);
        }
Esempio n. 2
0
        public static LoadProcess ReadWithOption(ReadOptions option)
        {
            var sql = new ReadLoadProcessTableTask()
            {
                ReadOption = option
            };

            sql.Execute();
            return(sql.LoadProcess);
        }
Esempio n. 3
0
        public static List <LoadProcess> ReadAll()
        {
            var sql = new ReadLoadProcessTableTask()
            {
                ReadOption = ReadOptions.ReadAllProcesses
            };

            sql.Execute();
            return(sql.AllLoadProcesses);
        }
        public void Execute()
        {
            var read = new ReadLoadProcessTableTask()
            {
                ReadOption        = ReadOptions.ReadAllProcesses,
                ConnectionManager = this.ConnectionManager
            };

            read.Execute();
            List <LoadProcess> logEntries = read.AllLoadProcesses;

            JSON = JsonConvert.SerializeObject(logEntries, new JsonSerializerSettings
            {
                Formatting        = Formatting.Indented,
                ContractResolver  = new CamelCasePropertyNamesContractResolver(),
                NullValueHandling = NullValueHandling.Ignore
            });
        }
Esempio n. 5
0
        public void Execute()
        {
            QueryParameter cd = new QueryParameter("CurrentDate", "DATETIME", DateTime.Now);
            QueryParameter pn = new QueryParameter("ProcessName", "VARCHAR(100)", ProcessName);
            QueryParameter sm = new QueryParameter("StartMessage", "VARCHAR(4000)", StartMessage);
            QueryParameter so = new QueryParameter("Source", "VARCHAR(20)", Source);

            if (ConnectionType == ConnectionManagerType.Postgres ||
                ConnectionType == ConnectionManagerType.SqlServer ||
                ConnectionType == ConnectionManagerType.MySql)
            {
                LoadProcessId = new SqlTask(this, Sql)
                {
                    Parameter = new List <QueryParameter>()
                    {
                        cd, pn, sm, so
                    },
                    DisableLogging = true,
                }.ExecuteScalar <long>();
            }
            else
            {
                new SqlTask(this, Sql)
                {
                    Parameter = new List <QueryParameter>()
                    {
                        cd, pn, sm, so
                    },
                    DisableLogging = true,
                }.ExecuteNonQuery();
                LoadProcessId = new SqlTask(this, MaxIdSql)
                {
                    DisableLogging = true,
                }.ExecuteScalar <long>();
            }
            var rlp = new ReadLoadProcessTableTask(this, LoadProcessId)
            {
                DisableLogging = true
            };

            rlp.Execute();
            Logging.CurrentLoadProcess = rlp.LoadProcess;
        }
Esempio n. 6
0
        public void Execute()
        {
            QueryParameter cd  = new QueryParameter("CurrentDate", "DATETIME", DateTime.Now);
            QueryParameter em  = new QueryParameter("AbortMessage", "VARCHAR(100)", AbortMessage);
            QueryParameter lpk = new QueryParameter("LoadProcessId", "BIGINT", LoadProcessId);

            new SqlTask(this, Sql)
            {
                DisableLogging = true,
                Parameter      = new List <QueryParameter>()
                {
                    cd, em, lpk
                },
            }.ExecuteNonQuery();
            var rlp = new ReadLoadProcessTableTask(this, LoadProcessId)
            {
                DisableLogging = true,
            };

            rlp.Execute();
            Logging.CurrentLoadProcess = rlp.LoadProcess;
        }
Esempio n. 7
0
        public void Execute()
        {
            QueryParameter cd = new QueryParameter("CurrentDate", "DATETIME", DateTime.Now);
            QueryParameter pn = new QueryParameter("ProcessName", "VARCHAR(100)", ProcessName);
            QueryParameter sm = new QueryParameter("StartMessage", "VARCHAR(4000)", StartMessage);
            QueryParameter so = new QueryParameter("Source", "VARCHAR(20)", Source);

            LoadProcessId = new SqlTask(this, Sql)
            {
                Parameter = new List <QueryParameter>()
                {
                    cd, pn, sm, so
                },
                DisableLogging = true,
            }.ExecuteScalar <long>();
            var rlp = new ReadLoadProcessTableTask(this, LoadProcessId)
            {
                DisableLogging = true
            };

            rlp.Execute();
            ControlFlow.ControlFlow.CurrentLoadProcess = rlp.LoadProcess;
        }