Ejemplo n.º 1
0
        //[ValidateAntiForgeryToken]
        public ActionResult MyProfile()
        {
            TempData["ReviewerUpdated"] = "";
            Users        users  = new Users();
            ActionResult result = this.ValidateReviewerToken();

            if (result != null)
            {
                return(result);
            }
            if (Session["UserId"] == null)
            {
                return(RedirectToAction("AuthorLogin", "Login"));
            }

            CommonCode commonCode = new CommonCode();
            List <Tuple <int, string> > lstSpecialization = _review.GetSpecialization(commonCode);
            List <SelectListItem>       lstSpec           = new List <SelectListItem>();

            foreach (var specialization in lstSpecialization)
            {
                lstSpec.Add(new SelectListItem {
                    Value = specialization.Item1.ToString(), Text = specialization.Item2
                });
            }
            ViewBag.Specialization = new SelectList(lstSpec, "Value", "Text");

            users = _review.GetMyProfileDetails(Convert.ToInt64(Session["UserId"].ToString()));
            return(View("MyProfile", users));
        }