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

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

            PrintScoreBoard(listMatches);
        }
コード例 #3
0
ファイル: Logger.cs プロジェクト: daniellxc/Ged
        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);
        }
コード例 #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"));
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #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());
        }
コード例 #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);
     }
 }
コード例 #9
0
 // GET: LogActividad
 public ActionResult Index()
 {
     ViewBag.list  = LogBO.getListLog("");
     ViewBag.Fecha = (DateTime.Now.ToString("dd/MM/yyyy")).Replace("-", "/");
     return(View());
 }
コード例 #10
0
ファイル: LogBOTest.cs プロジェクト: mantov/JogoMataMorre
 public void LogBOExists()
 {
     var logBO = new LogBO();
 }
コード例 #11
0
ファイル: LogBOTest.cs プロジェクト: mantov/JogoMataMorre
 private void LogBOFactory()
 {
     _logBO = new LogBO();
 }
コード例 #12
0
        public void LoadMatch()
        {
            var logBO = new LogBO();

            logBO.LoadGameLog();
        }