Ejemplo n.º 1
0
        public Run RunTask(long tntId, long runId, RunParams param)
        {
            string           exMsg = String.Empty;
            List <Hashtable> data  = new List <Hashtable>();

            Models.Run runModel = new Models.Run();
            RunResult  rs       = new RunResult()
            {
                result = new Hashtable()
            };
            // New Run Entity
            var run = new Data.Entities.Run();

            _addRunQueryProcessor.AddRun(run);

            // Chg: Preparation for Run
            var chgStateGrp = _chgStateGrpQueryProcessor.Get(Constants.ChgStateGrpNames.RunTask);

            rs.result.Add(Constants.RunScriptNames.RunScriptResult, Constants.PSReturnCodes.notrunned);
            rs.result.Add(Constants.RunScriptNames.RunScriptResultMessage, Constants.ChgStateNames.PrepareForRun);
            rs.result.Add(Constants.RunScriptNames.RunScriptData, null);

            // Get Tenant
            var tnt = _tntQueryProcessor.Get(tntId);

            // tenant present?
            if (tnt != null)
            {
                // ...
            }
            return(runModel);
        }
Ejemplo n.º 2
0
        public List <Tnt> Get()
        {
            var        entities = _queryProcessor.Get();
            List <Tnt> ju       = new List <Tnt>();

            if (entities != null)
            {
                entities.ForEach(x => ju.Add(_autoMapper.Map <Tnt>(x)));
                return(ju);
            }
            return(null);
        }