示例#1
0
        public List <Sys_ModuleModel> GetMenuList(string roleId)
        {
            Sys_ModuleBLL        mbll  = new Sys_ModuleBLL();
            Sys_RoleAuthorizeBLL rhbll = new Sys_RoleAuthorizeBLL();
            var data = new List <Sys_ModuleModel>();

            if (OperatorProvider.Provider.GetCurrent().IsSystem)
            {
                data = mbll.GetModelList("");
            }
            else
            {
                var moduledata    = mbll.GetModelList("");
                var authorizedata = rhbll.GetModelList("F_ObjectId = '" + roleId + "'  and F_ItemType = 1");

                foreach (var item in authorizedata)
                {
                    Sys_ModuleModel moduleEntity = mbll.GetModel(item.F_ItemId);
                    if (moduleEntity != null)
                    {
                        data.Add(moduleEntity);
                    }
                }
            }
            return(data.OrderBy(t => t.F_SortCode).ToList());
        }
示例#2
0
        public ActionResult GetFormJson(string keyValue)
        {
            var data = mbll.GetModel(keyValue);

            return(Content(data.ToJson()));
        }