public ActionResult ViewRoles(FormCollection form)
        {
            List <Manage> RoleValue = new List <Manage>();

            if (ModelState.IsValid)
            {
                var isReporting = (bool)Session["IsRerportingPerson"];
                int userId      = int.Parse(Session["UserID"].ToString());
                DSRCManagementSystemEntities1 db = new DSRCManagementSystemEntities1();
                bool status = form["Inactive"].Contains("true");
                DSRCManagementSystem.Models.Manage obj = new DSRCManagementSystem.Models.Manage();
                if (Convert.ToInt32(Session["RoleID"]) == 59)
                {
                    RoleValue = (from p in db.Master_Roles
                                 select new Manage()
                    {
                        RoleID = p.RoleID,
                        RoleName = p.RoleName
                    }).ToList();
                }
                RoleValue = RoleValue.Distinct().ToList();
                return(View(RoleValue));
            }
            else
            {
                DSRCManagementSystem.Models.Manage obj = new DSRCManagementSystem.Models.Manage();
                return(View(RoleValue));
            }
        }
        public ActionResult ViewRoles()
        {
            var isReporting = (bool)Session["IsRerportingPerson"];

            ModelState.Clear();
            int userId = int.Parse(Session["UserID"].ToString());
            DSRCManagementSystemEntities1 db = new DSRCManagementSystemEntities1();

            DSRCManagementSystem.Models.Manage obj = new DSRCManagementSystem.Models.Manage();
            List <Manage> RoleValue = new List <Manage>();

            var RoleName = MasterEnum.NewuserRole.NewEmployeeRole;

            ViewBag.RoleName = RoleName;

            var RoleID = db.Master_Roles.FirstOrDefault(o => o.RoleName == RoleName).RoleID;

            RoleValue = (from p in db.Master_Roles
                         where (p.IsActive == true)
                         select new Manage()
            {
                RoleID = p.RoleID,
                RoleName = p.RoleName
            }).ToList();
            return(View(RoleValue));
        }