Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            solicitante solicitante = db.solicitante.Find(id);

            db.solicitante.Remove(solicitante);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
        public async Task <ActionResult> DeleteConfirmed(int id)
        {
            solicitante solicitante = await db.solicitantes.FindAsync(id);

            db.solicitantes.Remove(solicitante);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
Exemple #3
0
 public ActionResult Edit([Bind(Include = "id,Nombre,AspNetUsers_Id,Supervisor_Id")] solicitante solicitante)
 {
     if (ModelState.IsValid)
     {
         db.Entry(solicitante).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.AspNetUsers_Id = new SelectList(db.AspNetUsers, "Id", "Email", solicitante.AspNetUsers_Id);
     ViewBag.Supervisor_Id  = new SelectList(db.supervisor, "id", "Nombre", solicitante.Supervisor_Id);
     return(View(solicitante));
 }
Exemple #4
0
        public async Task <ActionResult> Edit([Bind(Include = "uid,num_solicitante,id_persona,numero_socio,dependientes,sueldo,sueldo_diario,departamento")] solicitante solicitante)
        {
            if (ModelState.IsValid)
            {
                db.Entry(solicitante).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewBag.id_persona = new SelectList(db.personas, "uid", "nombre", solicitante.id_persona);
            return(View(solicitante));
        }
Exemple #5
0
        // GET: solicitantes/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            solicitante solicitante = db.solicitante.Find(id);

            if (solicitante == null)
            {
                return(HttpNotFound());
            }
            return(View(solicitante));
        }
Exemple #6
0
        // GET: solicitantes/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            solicitante solicitante = await db.solicitantes.FindAsync(id);

            if (solicitante == null)
            {
                return(HttpNotFound());
            }
            return(View(solicitante));
        }
Exemple #7
0
        // GET: solicitantes/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            solicitante solicitante = await db.solicitantes.FindAsync(id);

            if (solicitante == null)
            {
                return(HttpNotFound());
            }
            ViewBag.id_persona = new SelectList(db.personas, "uid", "nombre", solicitante.id_persona);
            return(View(solicitante));
        }
Exemple #8
0
        // GET: solicitantes/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            solicitante solicitante = db.solicitante.Find(id);

            if (solicitante == null)
            {
                return(HttpNotFound());
            }
            ViewBag.AspNetUsers_Id = new SelectList(db.AspNetUsers, "Id", "Email", solicitante.AspNetUsers_Id);
            ViewBag.Supervisor_Id  = new SelectList(db.supervisor, "id", "Nombre", solicitante.Supervisor_Id);
            return(View(solicitante));
        }