Ejemplo n.º 1
0
        /// <summary>
        /// 更新所有菜单使用人员
        /// </summary>
        public void UpdateAllUseUser(List <Model.MenuUser> menuUsers = null)
        {
            if (null == menuUsers)
            {
                menuUsers = menuUserData.GetAll(out bool isCache);
            }
            Organize organize = new Organize();

            foreach (var menuUser in menuUsers)
            {
                menuUser.Users = organize.GetAllUsersId(menuUser.Organizes);
            }
            Cache.IO.Insert(Data.MenuUser.CACHEKEY, menuUsers);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 得到所有设置
        /// </summary>
        /// <returns></returns>
        public List <Model.HomeSet> GetAll()
        {
            object obj = Cache.IO.Get("roadflow_cache_homeset");

            if (null == obj)
            {
                Organize organize = new Organize();
                var      homeSets = homeSetData.GetAll();
                foreach (var model in homeSets)
                {
                    if (!model.UseOrganizes.IsNullOrWhiteSpace())
                    {
                        model.UseUsers = organize.GetAllUsersId(model.UseOrganizes);
                    }
                }
                Cache.IO.Insert("roadflow_cache_homeset", homeSets);
                return(homeSets);
            }
            else
            {
                return((List <Model.HomeSet>)obj);
            }
        }