public ActionResult Subscriptions(vmAccountSubscriptions model)
        {
            int UserIDX = db_Accounts.GetUserIDX();

            //update profile
            int SuccID = db_Accounts.UpdateT_OE_USERS(UserIDX, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, model.NOTIFY_DISCUSSION_IND, model.NOTIFY_BADGE_IND, model.NOTIFY_NEWSLETTER);

            //update user expertise
            db_EECIP.DeleteT_OE_USER_EXPERTISE(UserIDX);
            foreach (string expertise in model.SelectedExpertise ?? new List <string>())
            {
                db_EECIP.InsertT_OE_USER_EXPERTISE(UserIDX, expertise);
            }

            if (SuccID == 1)
            {
                TempData["Success"] = "Update successful.";
            }
            else
            {
                TempData["Error"] = "Error updating data.";
            }


            //return
            return(RedirectToAction("Subscriptions"));
        }
        public ActionResult Subscriptions()
        {
            // notifications
            // Upvote posts you are following
            // Posts made to topic you are following (email too)
            // new badge earned (email too)


            int        id    = db_Accounts.GetUserIDX();
            T_OE_USERS u     = db_Accounts.GetT_OE_USERSByIDX(id);
            var        model = new vmAccountSubscriptions
            {
                SelectedExpertise = db_EECIP.GetT_OE_USER_EXPERTISE_ByUserIDX(id),
                AllExpertise      = db_EECIP.GetT_OE_USER_EXPERTISE_ByUserIDX_All(id).Select(x => new SelectListItem {
                    Value = x, Text = x
                }),
                CommunitiesOfInterest = db_EECIP.GetCommunityOfInterest_AndSubscription_ByUserIDX(id),
                NOTIFY_DISCUSSION_IND = u.NOTIFY_DISCUSSION_IND,
                NOTIFY_BADGE_IND      = u.NOTIFY_BADGE_IND,
                NOTIFY_NEWSLETTER     = u.NOTIFY_NEWSLETTER
            };

            return(View(model));
        }