Exemple #1
0
 public ActionResult DeleteConfirmed(int id)
 {
     try
     {
         ManagerSeance manager = new ManagerSeance();
         seance        seance  = manager.GetSeance(id);
         if (manager.DeleteSeance(id))
         {
             return(RedirectToAction("Index", new { id = seance.salle.cinema_id }));
         }
     }
     catch (Exception e)
     {
         //MessageBox.Show(e.Message);
     }
     return(RedirectToAction("Index", "Home"));
 }
Exemple #2
0
 public ActionResult DeleteConfirmed(int id)
 {
     try
     {
         ManagerSeance manager = new ManagerSeance();
         seance        seance  = manager.GetSeance(id);
         if (manager.DeleteSeance(id))
         {
             return(RedirectToAction("DetailsSalle", "cinemas", new { id = int.Parse(Session[SessionKeys.salleId].ToString()), start = DateTime.Now }));
         }
         else
         {
             throw new Exception();
         }
     }
     catch (Exception e)
     {
         TempData.Add("Alert", e.Message);
         Session[SessionKeys.seanceId]  = id;
         Session[SessionKeys.seanceTab] = "Delete";
         return(RedirectToAction("DetailsSalle", "cinemas", new { id = int.Parse(Session[SessionKeys.salleId].ToString()), start = DateTime.Now }));
     }
 }