Ejemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Nombre,Direccion,Localidad,Latitud,Longitud,FechaCreado,FechaBaja,Pozo_Profundidad,Pozo_Diametro,Punzado_Largo,Punzado_Diametro,Temp_Pozo,DensidadRoca,Saturacion,Presion,DensidadFluido")] PuntoEstudio puntoEstudio)
        {
            if (id != puntoEstudio.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(puntoEstudio);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PuntoEstudioExists(puntoEstudio.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(puntoEstudio));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Fecha,Valor,PuntoEstudioId")] DatosPunto datosPunto)
        {
            if (id != datosPunto.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(datosPunto);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DatosPuntoExists(datosPunto.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["PuntoEstudioId"] = new SelectList(_context.PuntoEstudios, "Id", "Id", datosPunto.PuntoEstudioId);
            return(View(datosPunto));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,ContratoId,Nombre,Direccion,Localidad,Provincia,Estudio,FechaCreado,FechaBaja")] Proyecto proyecto)
        {
            if (id != proyecto.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(proyecto);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ProyectoExists(proyecto.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ContratoId"] = new SelectList(_context.Contratos, "Id", "Id", proyecto.ContratoId);
            return(View(proyecto));
        }
Ejemplo n.º 4
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Nombre,EmpresaId,Logo,Desde,Hasta")] Contrato contrato)
        {
            if (id != contrato.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(contrato);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ContratoExists(contrato.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["EmpresaId"] = new SelectList(_context.Empresas, "Id", "Id", contrato.EmpresaId);
            return(View(contrato));
        }
Ejemplo n.º 5
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,CUIT,Direccion,FechaCreacion,RazonSocial,Telefono,Localidad,Provincia,Pais,Logo,Icono")] Empresa empresa)
        {
            if (id != empresa.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(empresa);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EmpresaExists(empresa.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(empresa));
        }