Exemplo n.º 1
0
 private DatasViewModel Data(DataImportante collection)
 {
     return(new DatasViewModel
     {
         Finalidade = collection.Finalidade,
         DataFim = collection.DataFim,
         DataInicio = collection.DataInicio,
         Descricao = collection.Descricao,
         EventoId = collection.EventoId,
         DataImportanteId = collection.DataImportanteId,
     });
 }
Exemplo n.º 2
0
        public ActionResult Delete(int id, DataImportante collection)
        {
            try
            {
                // TODO: Add delete logic here

                var result = _datasImportanteRepository.ObterPorId(collection.DataImportanteId);
                _datasImportanteRepository.Remover(result);
                return(RedirectToAction("Index", new { id = result.EventoId, msg = "Configuração removida." }));
            }
            catch
            {
                return(PartialView("_Remover", _eventoRepository.ObterPorId(id)));
            }
        }
Exemplo n.º 3
0
 public void Remover(DataImportante entity)
 {
     _dataImportanteRepository.Remover(entity);
 }
Exemplo n.º 4
0
 public DataImportante Adicionar(DataImportante entity)
 {
     return(_dataImportanteRepository.Adicionar(entity));
 }
Exemplo n.º 5
0
 public void Actualizar(DataImportante entity)
 {
     _dataImportanteRepository.Actualizar(entity);
 }