public JsonResult remove(int id)
 {
     try
     {
         if ((UserProfile.isCurrentUserAdmin) || UserProfile.CurrentUser.HasPermission(AccessPermissions.PAGE_DELETION))
         {
             var tabs = new PagesDB();
             // tabs.DeletePage(id);
             // Add to recycle
             tabs.DeletePageToRecycler(id);
             return(Json(new { error = false }));
         }
         else
         {
             string errorMessage = General.GetString("ACCESS_DENIED", "You don't have permissin to delete page", this);
             return(Json(new { error = true, errorMess = errorMessage }));
         }
     }
     catch (SqlException)
     {
         string errorMessage = General.GetString("TAB_DELETE_FAILED", "Failed to delete Page", this);
         return(Json(new { error = true, errorMess = errorMessage }));
     }
 }