示例#1
0
        public ActionResult AddContacterDialog()
        {
            IAppSettingService appSetService = IocMvcFactoryHelper.GetInterface <IAppSettingService>();

            ViewData["ParentNode"] = appSetService.SelectNodeItemByParentCode("LianXiRenLeiXingGuanLi");
            return(View());
        }
示例#2
0
        public List <CategoryItems> QueryAppSettingList(string parentCode)
        {
            IAppSettingService   appSetService = IocMvcFactoryHelper.GetInterface <IAppSettingService>();
            List <CategoryItems> items         = appSetService.SelectNodeItemByParentCode(parentCode);

            return(items);
        }
示例#3
0
        public List <UinMenuObjcet> QueryAllMenuData()
        {
            IMenuService         ms    = IocMvcFactoryHelper.GetInterface <IMenuService>();
            List <UinMenuObjcet> menus = ms.QueryMenusByAuthor(string.Empty)
                                         .Select(s => s.MapObject <Menu, UinMenuObjcet>()).ToList();//这个参数后期修改为当前操作用户
            Menu uin = menus.Where(s => s.Code == "UinImageGroupService")
                       .Select(s => s.MapObject <UinMenuObjcet, Menu>())
                       .FirstOrDefault();

            for (int i = 0; i < menus.Count; i++)
            {
                if (menus[i].ParentId == -1)
                {
                    continue;
                }
                UinMenuObjcet p = menus.Where(s => s.Id == menus[i].ParentId).FirstOrDefault();
                if (p == null)
                {
                    menus[i].Tip = string.Format("Lose isEnable of parent[id={0}]", menus[i].ParentId);
                }
                else
                {
                    menus[i].ParentName = p.Name;
                    menus[i].ParentCode = p.Code;
                }
            }
            //对于查询出的菜单列表进行用户查询限定组装
            if (uin != null)
            { //是否查询举报列表
                UinMenuObjcet ui = menus.Where(s => s.Code == "UinImageGroupService").FirstOrDefault();
                ui.Childerns = new List <Menu>();
                IAppSettingService   appSettingService = IocMvcFactoryHelper.GetInterface <IAppSettingService>();
                List <CategoryItems> reports           = appSettingService.SelectNodeItemByParentCode(EAppSetting.ReportEnum.ToString());//查询举报分类集合
                //将该菜单变为子节点菜单
                if (reports.Count > 0)
                {
                    UinMenuObjcet first = uin.MapObject <Menu, UinMenuObjcet>();
                    first.ParentCode = first.Code;
                    ui.Childerns.Add(first);
                    foreach (CategoryItems item in reports)
                    {
                        UinMenuObjcet copy = uin.MapObject <Menu, UinMenuObjcet>();//进行一个实体Copy,避免引用类型更改集合中数据项
                        copy.Url        = copy.Url + "?" + EAppSetting.ReportEnum.ToString() + "=" + item.ItemValue;
                        copy.Name      += " - " + item.Name;
                        copy.IsChild    = true;
                        copy.ParentCode = uin.Code;
                        copy.Code       = uin.Code + "." + item.Code.ToString();
                        copy.ParentId   = copy.Id;
                        // ui.Childerns.Add(copy);
                        menus.Add(copy);
                    }
                }
            }
            return(menus);
        }
示例#4
0
        public ActionResult FlagReportDialog(bool usingParentWinSelfTool, Guid?optionId, string table)
        {
            IAppSettingService service = IocMvcFactoryHelper.GetInterface <IAppSettingService>();
            string             item    = EAppSetting.ReportEnum.ToString();

            ViewData[item] = service.SelectNodeItemByParentCode(item);
            ViewData["usingParentWinSelfTool"] = usingParentWinSelfTool;
            ViewData["optionId"]    = optionId;
            ViewData["optionTable"] = table;
            return(View());
        }