Exemple #1
0
        public async Task <LogBO> UpdateAsync(LogBO model)
        {
            var result = await this._commands
                         .UpdateAsync(MapModelToEntity(model));

            return(result != null?MapEntityToModel(result) : null);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            var logBO       = new LogBO();
            var listMatches = logBO.LoadGameLog();

            PrintScoreBoard(listMatches);
        }
Exemple #3
0
        public void Gravar(string _acao, string _entidade, string _usuario, string _mensagem)
        {
            LogBO _logger = new LogBO();

            Log _log = new Log(_acao, _entidade, _usuario, _mensagem);

            _logger.SalvarLog(_log);
        }
Exemple #4
0
        public ActionResult GetLista(string Fecha)
        {
            string[] f  = Fecha.Split('/');
            string   _f = f[2] + "-" + f[1] + "-" + f[0];

            ViewBag.list  = LogBO.getListLog(_f);
            ViewBag.Fecha = Fecha;
            return(View("Index"));
        }
Exemple #5
0
        private Log MapModelToEntity(LogBO model)
        {
            Log entity = new Log
            {
                Id          = model.Id,
                Information = model.Information,
                Source      = model.Source,
                DateCreated = model.DateCreated
            };

            return(entity);
        }
Exemple #6
0
        private LogBO MapEntityToModel(Log entity)
        {
            LogBO model = new LogBO
            {
                Id          = entity.Id,
                Information = entity.Information,
                DateCreated = entity.DateCreated,
                Source      = entity.Source
            };

            return(model);
        }
Exemple #7
0
        public async Task <ActionResult> AddAsync([FromBody] LogBO model)
        {
            _logger.LogError(model.Information);

            model.DateCreated = DateTime.UtcNow;
            var log = await _logService
                      .AddAsync(model);

            if (log != null)
            {
                return(CreatedAtAction("Get", new { id = log.Id }, log));
            }

            return(BadRequest());
        }
Exemple #8
0
 public ModelView.StatisticsModel GetStatisticsModel(string url)
 {
     try
     {
         var model = new ModelView.StatisticsModel();
         if (string.IsNullOrEmpty(url))
         {
             return(model);
         }
         var logBo = new LogBO();
         return(logBo.GetStatisticsModel(ConnectionHandler, url));
     }
     catch (KnownException ex)
     {
         Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
         throw new KnownException(ex.Message, ex);
     }
     catch (Exception ex)
     {
         Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace);
         throw new KnownException(ex.Message, ex);
     }
 }
Exemple #9
0
 // GET: LogActividad
 public ActionResult Index()
 {
     ViewBag.list  = LogBO.getListLog("");
     ViewBag.Fecha = (DateTime.Now.ToString("dd/MM/yyyy")).Replace("-", "/");
     return(View());
 }
Exemple #10
0
 public void LogBOExists()
 {
     var logBO = new LogBO();
 }
Exemple #11
0
 private void LogBOFactory()
 {
     _logBO = new LogBO();
 }
Exemple #12
0
        public void LoadMatch()
        {
            var logBO = new LogBO();

            logBO.LoadGameLog();
        }