Example #1
0
        // GET: Reclamation/Create
        public ActionResult Create()
        {
            string role = null;

            ViewData["Role"] = "";
            IEnumerable <string> roles = new List <string>();

            roles = ((ClaimsIdentity)User.Identity).Claims
                    .Where(c => c.Type == ClaimTypes.Role)
                    .Select(c => c.Value);
            foreach (var x in roles)
            {
                role = x;
            }

            if (role != null)
            {
                ViewData["Role"] = role;
            }
            ViewBag.Category = new SelectList(userAccount.GetAll(), "Id", "Name");

            return(View());
        }