예제 #1
0
 /// <summary>
 /// deactivates or reactivates an activity
 /// </summary>
 /// <param name="activityID"></param>
 /// <returns></returns>
 public ActionResult DeactivateReactivateActivity(int activityID)
 {
     try
     {
         if (_activityManager.RetrieveActivityByID(activityID).ActivityActive)
         {
             _activityManager.DeactivateActivity(activityID);
             return(RedirectToAction("ActivityList", new { active = true }));
         }
         else
         {
             _activityManager.ActivateActivity(activityID);
             return(RedirectToAction("ActivityList", new { active = false }));
         }
     }
     catch (Exception)
     {
     }
     return(RedirectToAction("ActivityList"));
 }