Inheritance: 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 };
 }