コード例 #1
0
ファイル: UserController.cs プロジェクト: mariadias143/LI4
 // 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());
     }
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: filipeguimaraes/LI4_1920
 public void deleteUser()
 {
     uDAO.remove(this.user.Email);
     logout();
 }