public ReplayBase SetCatInfoParent(CatInfoModel Info) { PublicResourceService prs = new PublicResourceService(); prs.GetCatInfoById(Info.id); prs.CatInfo._parentId = string.IsNullOrEmpty(Info._parentId) ? null : Info._parentId; return(SaveCatInfo(prs.CatInfo)); }
public ReplayBase DelCatInfo(CatInfoModel row) { PublicResourceService prs = new PublicResourceService(); prs.GetCatInfoById(row.id); ReplayBase result = prs.DelCatInfoAndChilds(); if (result.ReturnCode == EnumErrorCode.Success) { SysManagerService.CreateSysUserLog(new SysUserLogModel() { SysUserId = User.Identity.Name, Describe = string.Format("删除分类树节【{0}】点及其子节点," + result.ReturnMessage, prs.CatInfo.caption), FkId = prs.CatInfo.id }); } return(result); }
public ReplayBase SaveCatInfo(CatInfoModel info) { PublicResourceService prs = new PublicResourceService(); prs.CatInfo = info; ReplayBase result = prs.SaveCatInfo(); if (result.ReturnCode == EnumErrorCode.Success) { //记录到用户日志 SysManagerService.CreateSysUserLog(new SysUserLogModel() { Describe = "用户新增/编辑分类树信息:" + JsonConvert.SerializeObject(info), FkId = result.ReturnMessage, SysUserId = User.Identity.Name }); } return(result); }
/// <summary> /// 获取子集信息 /// </summary> /// <param name="row"></param> private void GetCatChildInfo(CatInfoModel row) { if (Dep <= SearchCatInfoCondtion.Dep || SearchCatInfoCondtion.Dep == null) { if (Dep >= 10) { row.state = "closed"; } SearchCatInfoListReplay.Add(row); Dep++; List <CatInfoModel> childs = BaseSysTemDataBaseManager.RsSearchCatInfoList(new SearchCatInfoRequest() { _parentId = row.id }); if (childs.Count > 0) { foreach (CatInfoModel child in childs) { GetCatChildInfo(child); } } } }