protected void Page_Load(object sender, EventArgs e) { this.sitios = new Sitios(); this.empresas = new Empresas(); this.regempresa = this.empresas.getEmpresas(); this.regsitio = this.sitios.getSitios(); }
protected void Page_Load(object sender, EventArgs e) { con = new Conexion(); con.Conectar(); this.sitios = new Sitios(); this.fotoSitio = new Foto_Sitio(); }
public ActionResult DeleteConfirmed(int id) { Sitios sitios = db.SitiosSet.Find(id); db.SitiosSet.Remove(sitios); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id_Sitio,CodigoSitio,X,Y,Altitud,Propiedad,Antecedentes,RelatoAcontecimientos,FechaEvento,FechaInhumacion,NumeroVictimas,ExhumacionAnterior,MaterialesAdicionales")] Sitios sitios) { if (ModelState.IsValid) { db.Entry(sitios).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(sitios)); }
// GET: Sitios/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Sitios sitios = db.SitiosSet.Find(id); if (sitios == null) { return(HttpNotFound()); } return(View(sitios)); }