public bool DeleteMenuTransaction(string menuInfoId, string newParentId) { SystemBusiness _SysInfoBusiness = new SystemBusiness(); MenuInfo deleteMenu = _SysInfoBusiness.GetSingleEntityByField <MenuInfo>("MenuInfoId", menuInfoId); if (deleteMenu != null) { List <MenuInfo> updataList = _SysInfoBusiness.GetSubMenus(deleteMenu.MenuInfoId); if (updataList != null) { foreach (var item in updataList) { item.ParentId = newParentId;//子菜单升一级 } } return(_SysInfoBusiness.DeleteMenuTransaction(deleteMenu, updataList)); } return(false); }
public ActionResult <IEnumerable <MenuInfo> > GetSubMenus(string parentId, string languageCode) { SystemBusiness _SysInfoBusiness = new SystemBusiness(); List <MenuInfo> itemList = _SysInfoBusiness.GetSubMenus(parentId); if (!string.IsNullOrWhiteSpace(languageCode)) { //返回指定语言 itemList = _SysInfoBusiness.UpdateLanguageMenus(itemList, languageCode); } return(itemList); }