Esempio n. 1
0
        public async Task <ActionResult> DeleteConfirmed(string id)
        {
            profesore profesore = await db.profesores.FindAsync(id);

            db.profesores.Remove(profesore);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        public async Task <ActionResult> Edit([Bind(Include = "inss,cedula,nombre,apellido,telefono,direccion,foto_ruta,cod_dpto")] profesore profesore)
        {
            if (ModelState.IsValid)
            {
                db.Entry(profesore).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.cod_dpto = new SelectList(db.dptoes, "cod_dpto", "nombre", profesore.cod_dpto);
            return(PartialView(profesore));
        }
Esempio n. 3
0
        // GET: profesores/Details/5
        public async Task <ActionResult> Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            profesore profesore = await db.profesores.FindAsync(id);

            if (profesore == null)
            {
                return(HttpNotFound());
            }
            return(PartialView(profesore));
        }
Esempio n. 4
0
        // GET: profesores/Edit/5
        public async Task <ActionResult> Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            profesore profesore = await db.profesores.FindAsync(id);

            if (profesore == null)
            {
                return(HttpNotFound());
            }
            ViewBag.cod_dpto = new SelectList(db.dptoes, "cod_dpto", "nombre", profesore.cod_dpto);
            return(PartialView(profesore));
        }