Пример #1
0
 public ActionResult DeleteShoppingList(string id)
 {
     try
     {
         AgenteShoppingList agente =
             new AgenteShoppingList();
         string userName = null;
         if (Request.IsAuthenticated)
         {
             userName = User.Identity.Name;
         }
         agente.DeleteShoppingList(id, userName);
         return(new EmptyResult());
     }
     catch (Exception ex)
     {
         return(new HttpStatusCodeResult(System.Net.HttpStatusCode.BadRequest, "The shopping list doesnt exist or you don't have the right to delete it."));
     }
 }