Exemplo n.º 1
0
 // 4. ************* DELETE User DETAILS ******************
 // GET: User/Delete/5
 public ActionResult Delete(int id)
 {
     try
     {
         IConnection connection = new Connection();
         connection.Fetch();
         IDAO <Utilizador> uDAO = new UtilizadorDAO(connection);
         if (uDAO.remove(Convert.ToString(id)))
         {
             ViewBag.AlertMsg = "User Deleted Successfully";
         }
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Exemplo n.º 2
0
 public void deleteUser()
 {
     uDAO.remove(this.user.Email);
     logout();
 }