예제 #1
0
 public ActionResult DeleteConfirmed(string day)
 {
     try
     {
         var _weatherInfo = maintainer.SearchByDay((string)day);
         if (_weatherInfo == null)
         {
             throw new Exception("The day you want to delete does not exist!");
         }
         maintainer.Delete(_weatherInfo);
         return(RedirectToAction("Index"));
     }
     catch (Exception e)
     {
         return(View("Error", new HandleErrorInfo(e, "Maintainer", "DeleteConfirmed")));
     }
 }