public CMenu FindByName(string sName, Guid Parent_id) { List <CBaseObject> lstObj = GetList(); foreach (CBaseObject obj in lstObj) { CMenu menu = (CMenu)obj; if (menu.Name.Equals(sName, StringComparison.OrdinalIgnoreCase) && menu.Parent_id == Parent_id) { return(menu); } } return(null); }
public override bool Delete(CBaseObject obj, bool bSave) { //и╬ЁЩвсд©б╪ List <CBaseObject> lstObj2 = GetList(); foreach (CBaseObject obj2 in lstObj2) { CMenu menu = (CMenu)obj2; if (menu.Parent_id == obj.Id) { Delete(obj2, bSave); } } return(base.Delete(obj, bSave)); }