Ejemplo n.º 1
0
 public BrandView(BrandView original)
 {
     this.id      = original.id;
     this.name    = original.name;
     this.image   = original.image;
     this.webSite = original.webSite;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Copy values back to this object from a cached object
 /// </summary>
 /// <param name="origianl"></param>
 public void Restore(BrandView cachedObject)
 {
     this.id      = cachedObject.id;
     this.name    = cachedObject.name;
     this.image   = cachedObject.image;
     this.webSite = cachedObject.webSite;
 }
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 BrandView(this);
 }