Beispiel #1
0
 public bool Apagar(int id, string acesso)
 {
     if (acesso != Conexao.SenhaAcesso)
     {
         throw new Exception();
     }
     return(controle.Apagar(id));
 }
 public ActionResult Delete(int id, moradores collection)
 {
     try
     {
         // TODO: Add delete logic here
         controle.Apagar(id);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }