Beispiel #1
0
 /// <summary>
 /// Move the category to other parent category.
 /// </summary>
 /// <param name="parentID">The parent category id.</param>
 /// <remarks>
 /// Set the parentID to move the category to top level.
 /// </remarks>
 public void MoveTo(int parentID)
 {
     parent         = null;
     Model.ParentID = parentID;
     this.ParentID  = parentID;
     DataContext.Update(Model);
     DataContext.SaveChanges();
 }
Beispiel #2
0
 /// <summary>
 /// Move the category to other parent category.
 /// </summary>
 /// <param name="parentID">The parent category id.</param>
 /// <remarks>
 /// Set the parentID to move the category to top level.
 /// </remarks>
 public void MoveTo(int parentID)
 {
     parent = null;
     Model.ParentID = parentID;
     this.ParentID = parentID;
     DataContext.Update(Model);
     DataContext.SaveChanges();
 }