Ejemplo n.º 1
0
 /// <summary>
 /// ItemView merge
 /// </summary>
 /// <param name="itemView"></param>
 public void Restore(CategoryView original)
 {
     this.id          = original.id;
     this.name        = original.name;
     this.isShown     = original.isShown;
     this.pageTitle   = original.pageTitle;
     this.url         = original.url;
     this.keywords    = original.keywords;
     this.description = original.description;
     this.metaTag     = original.metaTag;
     this.updated     = original.updated;
     this.theTemplate = original.theTemplate;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Clone
 /// </summary>
 /// <param name="categoryView"></param>
 public CategoryView(CategoryView categoryView)
 {
     this.id          = categoryView.id;
     this.name        = categoryView.name;
     this.isShown     = categoryView.isShown;
     this.updated     = categoryView.updated;
     this.pageTitle   = categoryView.pageTitle;
     this.keywords    = categoryView.keywords;
     this.description = categoryView.description;
     this.metaTag     = categoryView.metaTag;
     this.url         = categoryView.url;
     this.theTemplate = categoryView.theTemplate;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 'Cancel' button is clicked
 /// </summary>
 public void CancelEdit()
 {
     Restore(cache);
     cache = null;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 'Edit' button is clicked
 /// Due to binding, all UI changed will be mapped to the object, so we need make a copy of object before edit in case user wants to cancel the editing
 /// </summary>
 public void BeginEdit()
 {
     cache = new CategoryView(this);
 }