Beispiel #1
0
        //public async Task<Iaction> ActionResult About()
        //{
        //    ViewBag.Message = "Your application description page.";

        //    return View();
        //}
        public ActionResult AccessConfig()
        {
            HrContext    db         = new HrContext();
            FeatureRoles Fr         = new FeatureRoles();
            var          RolesModel = db.role.ToList();// RolRep.GetAll();

            Fr.Role = Mapper.Map <IEnumerable <RolesVM> >(RolesModel);
            var FeatModel = db.feature.ToList();//FeaRep.GetAll();

            Fr.Feature = Mapper.Map <IEnumerable <FeaturesVM> >(FeatModel);
            return(View());
        }
Beispiel #2
0
        public ActionResult AccessConfigJson()
        {
            HrContext    db         = new HrContext();
            FeatureRoles Fr         = new FeatureRoles();
            var          RolesModel = db.role.ToList();// RolRep.GetAll();

            Fr.Role = Mapper.Map <IEnumerable <RolesVM> >(RolesModel);
            var FeatModel = db.feature.ToList();//FeaRep.GetAll();

            Fr.Feature = Mapper.Map <IEnumerable <FeaturesVM> >(FeatModel);
            return(Json(Fr, JsonRequestBehavior.AllowGet));
        }
Beispiel #3
0
        public ActionResult AccessConfigJson()
        {
            FeatureRoles Fr        = new FeatureRoles();
            var          MenuModel = MenuRep.GetAll();

            Fr.Menu = Mapper.Map <IEnumerable <MenuVM> >(MenuModel);
            var RolesModel = RolRep.GetAll();

            Fr.Role = Mapper.Map <IEnumerable <RolesVM> >(RolesModel);
            var FeatModel = FeaRep.GetAll();

            Fr.Feature = Mapper.Map <IEnumerable <FeaturesVM> >(FeatModel);
            return(Json(Fr, JsonRequestBehavior.AllowGet));
        }