public ActionResult DeleteConfirmed(int id)
        {
            Estudantes estudantes = db.Estudantes.Find(id);

            db.Estudantes.Remove(estudantes);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Nome,Senha,Endereço,Instituição,Curso,Semestre,EstáProcurandoVagas")] Estudantes estudantes)
 {
     if (ModelState.IsValid)
     {
         db.Entry(estudantes).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(estudantes));
 }
        // GET: Estudantes/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Estudantes estudantes = db.Estudantes.Find(id);

            if (estudantes == null)
            {
                return(HttpNotFound());
            }
            return(View(estudantes));
        }
示例#4
0
        async void CarregarDiretotio()
        {
            if (!Ocupado)
            {
                Ocupado = true;

                // simular um delay de 3 segundos
                await Task.Delay(3000);

                var diretorioCarragdo = DiretorioEstudanteServicos.CarregarDiretorioEstudante();

                foreach (var estudante in diretorioCarragdo.Estudantes)
                {
                    Estudantes.Add(estudante);
                }

                Ocupado = false;
            }
        }