public async Task CreateConAutores(IdeaInnovadora model, List <AutoresIdea> listaAutores)
        {
            try
            {
                dbGI.DbSetIdeaInnovadora.Add(model);
                await dbGI.SaveChangesAsync();

                try
                {
                    if (listaAutores != null && listaAutores.Count > 0)
                    {
                        await autores.CreateAllSetIdeaInnovadoraId(listaAutores, model.IdeaInnovadoraId);
                    }
                }
                catch (Exception err)
                {
                    dbGI = new GI_Context();
                    var _model = await dbGI.DbSetIdeaInnovadora.FirstOrDefaultAsync(e => e.IdeaInnovadoraId == model.IdeaInnovadoraId);

                    dbGI.DbSetIdeaInnovadora.Remove(_model);
                    await dbGI.SaveChangesAsync();

                    throw err;
                }
            }
            catch (Exception e)
            {
                throw new Exception(e.Message, e);
            }
        }
Exemplo n.º 2
0
 public TecnologiaLicenciadaRepository()
 {
     dbGI = new GI_Context();
     dbGI.Database.Log = Escribe.Write;
     dbPI  = new PI_Context();
     dbGEN = new GEN_Context();
 }
 public IdeaInnovadoraRepository()
 {
     dbGI = new GI_Context();
     //dbGI.Database.Log = Escribe.Write;
     autores      = new AutoresIdeaRepository();
     _adjuntoRepo = new AdjuntoRepository();
     _personaRepo = new PersonasRepository();
 }
Exemplo n.º 4
0
 public NotificacionRepository()
 {
     _ctx                 = new SIGCOCHContext();
     _personaRepo         = new PersonasRepository();
     _SolicitudRepository = new SolicitudRepository();
     _db            = new MT_Context();
     _dbGen         = new GEN_Context();
     _ctxGI         = new GI_Context();
     _evaluadorRepo = new EvaluadorIdeaRepository();
     _dbCR          = new CR_Context();
 }
 public PeriodoReplicaRepository()
 {
     dbGI = new GI_Context();
 }
Exemplo n.º 6
0
 public PeriodoRecepcionRepository()
 {
     dbGI = new GI_Context();
 }
Exemplo n.º 7
0
 public ProductoGIEvaluadoresRepository()
 {
     dbGI = new GI_Context();
 }
 public ProductoGISolicitudRepository()
 {
     dbGI = new GI_Context();
     dbGI.Database.Log = Escribe.Write;
 }
 public PlanNegocioEvolGerenciasRepository(GI_Context db)
 {
     dbGI = db;
 }
 public TecnologiaLicenciadaPIDARepository()
 {
     dbGI = new GI_Context();
 }
Exemplo n.º 11
0
 public ComiteRepository()
 {
     dbGI = new GI_Context();
 }
Exemplo n.º 12
0
 public PlanNegocioEvolAutoresRepository(GI_Context db)
 {
     dbGI = db;
 }
Exemplo n.º 13
0
 public MiembrosGERepository()
 {
     dbGI     = new GI_Context();
     evalRepo = new EvaluadorIdeaRepository();
     _db      = new GEN_Context();
 }
Exemplo n.º 14
0
 public PlanNegocioEvolAutoresRepository()
 {
     dbGI = new GI_Context();
 }
Exemplo n.º 15
0
 public TipoAccesoRepository()
 {
     dbGI = new GI_Context();
 }
 public PlanNegocioEvolutivoRepository()
 {
     dbGI = new GI_Context();
 }
 public BitacoraMovimientosGIRepository()
 {
     dbGI = new GI_Context();
 }
Exemplo n.º 18
0
 public BitacoraSolicitudesGIRepository()
 {
     _ctx = new GI_Context();
 }
Exemplo n.º 19
0
 public FactorInnovacionRepository()
 {
     dbGI = new GI_Context();
 }
Exemplo n.º 20
0
 public EvaluadorIdeaRepository()
 {
     dbGI = new GI_Context();
 }
Exemplo n.º 21
0
 public SolicitudGIRepository()
 {
     _ctx = new GI_Context();
     //_ctx.Database.Log = Escribe.Write;
 }
Exemplo n.º 22
0
 public ProductoAutoresRepository()
 {
     dbGI = new GI_Context();
 }
Exemplo n.º 23
0
 public MiembrosGIRepository()
 {
     _db             = new GI_Context();
     _GENContext     = new GEN_Context();
     _RolPersonaRepo = new RolPersonaRepository();
 }
Exemplo n.º 24
0
 public ProductoAutoresRepository(GI_Context db)
 {
     dbGI = db;
 }
 public PlanNegocioEvolGerenciasRepository()
 {
     dbGI = new GI_Context();
 }
 public ProductoHistorialFIRepository()
 {
     context = new GI_Context();
 }
Exemplo n.º 27
0
 public ContribucionAutorRepository()
 {
     dbGI = new GI_Context();
 }
Exemplo n.º 28
0
 public PropuestaRepository()
 {
     dbGI         = new GI_Context();
     _adjuntoRepo = new AdjuntoRepository();
 }
 public ProductoGISolicitudRepository(GI_Context db)
 {
     dbGI = db;
     dbGI.Database.Log = Escribe.Write;
 }
 public ProductoGISolicitudArchivosFaseRepository(GI_Context db)
 {
     dbGI = db;
 }