Ejemplo n.º 1
0
        //
        // GET: /RoleRights/
        public ActionResult RoleRights()
        {
            BL_RolesRights BLobj = new BL_RolesRights();
            RolesRights    obj   = new RolesRights();

            ModelState.Clear();
            obj.GetRoleAndRights = BLobj.GetRoleAndRights();
            obj.GetRoles         = RolesRights.GetAllRols();

            return(View(obj));
        }
        //
        // GET: /RoleRightstwo/
        public ActionResult RoleRightstwo(int RoleID)
        {
            BL_RolesRights BLobj = new BL_RolesRights();
            RolesRights    obj   = new RolesRights();

            ModelState.Clear();
            obj.GetRoleAndRights = BLobj.GetRoleAndRights();
            obj.GetRoles         = RolesRights.GetAllRols();
            if (RoleID > 0)
            {
                obj.GetRights = RolesRights.GetRoleAndRightsByRoleID(RoleID);
                obj.RoleID    = obj.GetRights.Tables[0].Rows[0]["RoleID"].ToString();
                obj.RoleName  = obj.GetRights.Tables[0].Rows[0]["RoleName"].ToString();
            }
            else
            {
                //  obj.RoleName = "";
                //  obj.RoleID = "0";
            }
            return(View(obj));
        }
        public ActionResult UserRights()
        {
            //HospitalLocation Location = new HospitalLocation();
            //collection
            //return View();
            UserRights location = new UserRights();


            BL_RolesRights BLobj = new BL_RolesRights();
            RolesRights    obj   = new RolesRights();

            ModelState.Clear();
            obj.GetRoleAndRights = BLobj.GetRoleAndRights();
            obj.GetRoles         = BLobj.GetAllRols();

            return(View(obj));
        }