상속: System.Item
예제 #1
0
 public PurchaseOrderObject(PurchaseOrder order)
 {
    this.Id = order.Id;
    this.IsActive = order.IsActive;
    this.Number = order.Number;
    this.Date = order.Date;
 }
예제 #2
0
        public PurchaseOrderViewModel(IPurchaseOrderRepository repo, string number, IUserNotify notify)
        {
            this.repo = repo;
            this.notify = notify;
            saveCommand = ViewModelSource.Create(() => new SaveOrderCommand(repo, this, notify));

            if (string.IsNullOrWhiteSpace(number))
            {
                NewOrder(number);
            }
            else 
            {
                var ord = LoadOrder(number);
                if(ord != null)
                {
                    order = ord;
                }
                else
                {
                    NewOrder(number);
                }
            }
        }
예제 #3
0
 private void NewOrder(string number)
 {
     order = new PurchaseOrder() { Number = number, Date = DateTime.Now, IsActive = true };
 }