コード例 #1
0
 public ActionResult UnSubscribe(int id)
 {
     if (SubscriptionCRUD.UnSubscribe(id, (int)Session["UserID"]))
     {
         return(Content("<script>alert('Unsubscribed Successfully.');window.location.href=document.referrer;</script>"));
     }
     else
     {
         return(Content("<script>alert('Operation Failed.');window.location.href=document.referrer;</script>"));
     }
 }
コード例 #2
0
 public ActionResult Subscribe(int id)
 {
     if (SubscriptionCRUD.AddSubscription(id, (int)Session["UserID"]))
     {
         return(Content("<script>alert('Subscribed Successfully.');window.location.href=document.referrer;</script>"));
     }
     else
     {
         return(Content("<script>alert('You are already Subscribed.');window.location.href=document.referrer;</script>"));
     }
 }
コード例 #3
0
 public ActionResult Subscriptions()
 {
     return(View(SubscriptionCRUD.GetSubscribedItems((int)Session["UserID"])));
 }
コード例 #4
0
 public ActionResult BookSubscriptions(int id)
 {
     return(View(SubscriptionCRUD.GetSubscribers(id)));
 }