public virtual ActionResult ManageSubscription(SubscriptionModel subscription) { _objuser = new UserPresenter(); if (ModelState.IsValid) { _objuser = new UserPresenter(); var ioutput = _objuser.AddSubscriprion(subscription); return(RedirectToAction(MVC.Admin.SubscribedMembers())); } else { const string message = "Inavlid data"; ModelState.AddModelError("", message); } return(View()); }
public virtual ActionResult Subscription(SubscriptionModel model) { _objuser = new UserPresenter(); if (ModelState.IsValid) { _objuser = new UserPresenter(); var ioutput = _objuser.AddSubscriprion(model); if (ioutput) { TempData["Message"] = "Your have subscribed for event updates successfully."; } else { TempData["Message"] = "Please try again!!."; } return(RedirectToAction("Subscription")); } return(View()); }