예제 #1
0
 private void LoadChild(Modules.Control control)
 {
     foreach (MControl item in (MControl.parentID == control.ID).List<MControl>(MControl.level.Asc))
     {
         Modules.Control c = new Modules.Control();
         item.MemberCopyTo(c);
         control.Controls.Add(c);
         LoadChild(c);
     }
 }
예제 #2
0
        public Modules.Control Load(string id)
        {
            Modules.Control result = null;
            MControl control = DBContext.Load<MControl>(id);

            if (control != null)
            {
                result = new Modules.Control();
                control.MemberCopyTo(result);
                LoadChild(result);
            }
            return result;
        }