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>")); } }
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>")); } }
public ActionResult Subscriptions() { return(View(SubscriptionCRUD.GetSubscribedItems((int)Session["UserID"]))); }
public ActionResult BookSubscriptions(int id) { return(View(SubscriptionCRUD.GetSubscribers(id))); }