示例#1
0
 /// <summary>
 /// OrderView restore
 /// </summary>
 /// <param name="itemView"></param>
 public void Restore(OrderView original)
 {
     this.id              = original.id;
     this.orderDate       = original.orderDate;
     this.status          = original.status;
     this.user            = original.user;
     this.shippingAddress = original.shippingAddress;
     this.billingAddress  = original.billingAddress;
     this.sameAddress     = original.sameAddress;
     this.orderItemSet    = original.orderItemSet;
     this.serialNumber    = original.serialNumber;
     this.amount          = original.amount;
 }
示例#2
0
 /// <summary>
 /// Clone
 /// </summary>
 /// <param name="itemView"></param>
 public OrderView(OrderView orderView)
 {
     this.id              = orderView.id;
     this.orderDate       = orderView.orderDate;
     this.status          = orderView.status;
     this.user            = orderView.user;
     this.shippingAddress = orderView.shippingAddress;
     this.billingAddress  = orderView.billingAddress;
     this.sameAddress     = orderView.sameAddress;
     this.orderItemSet    = orderView.orderItemSet;
     this.serialNumber    = orderView.serialNumber;
     this.amount          = orderView.amount;
 }
示例#3
0
 /// <summary>
 /// 'Cancel' button is clicked
 /// </summary>
 public void CancelEdit()
 {
     Restore(cache);
     cache = null;
 }
示例#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 OrderView(this);
 }