public void Copyto(Category t) { t.Key = this.Key; t.Label = this.Label; t.Display = this.Display; t.Count = this.Count; t.Rollup = this.Rollup; t.MinOccurs = this.MinOccurs; t.MaxOccurs = this.MaxOccurs; t.Editable = this.Editable; foreach (Category c in categorys) { t.categorys.Add(c.Copy()); } foreach (Property p in propertys) { t.propertys.Add(p.Copy()); } }
public Category AddSubCategory() { Category c= new Category(); categorys.Add(c); return c; }
public virtual Category Copy() { Category t = new Category(); Copyto(t); return t; }