public AddSellOrderWindowViewModel(CargoCollection cargoCollection)
 {
     CargoCollection = cargoCollection;
     SellOrder       = new SellOrder();
     CancelCommand   = new DelegateCommand()
     {
         ExecuteAction = new Action <object>(CancelExecute)
     };
     ConfirmCommand = new DelegateCommand()
     {
         ExecuteAction = new Action <object>(ConfirmExecute)
     };
 }
Beispiel #2
0
 public CargoCollectionViewModel(CargoManagementContext cmContext, PurchaseOrderViewModel purchaseOrderViewModel)
 {
     CMContext                = cmContext;
     CargoCollection          = new CargoCollection(purchaseOrderViewModel.PurchaseOrder);
     SelectedPurchasePrizeDic = new PurchasePrizeDic();
     ShowDetailCommand        = new DelegateCommand()
     {
         ExecuteAction = new Action <object>(ShowDetailExecute)
     };
     SellCommand = new DelegateCommand()
     {
         ExecuteAction = new Action <object>(AddSellOrderExecute), CanExecuteFunc = new Func <object, bool>(AddSellOrderCanExecute)
     };
 }
 public CargoCollectionDetailWindowViewModel(CargoManagementContext cmContext, CargoCollection cc)
 {
     CMContext                = cmContext;
     CargoCollection          = cc;
     SelectedPurchasePrizeDic = CargoCollection.PurchasePrizeDics[0];
     AddImageCommand          = new DelegateCommand()
     {
         ExecuteAction = new Action <object>(AddImageExecute)
     };
     DeleteImageCommand = new DelegateCommand()
     {
         ExecuteAction = new Action <object>(DeleteImageExecute)
     };
 }
 public CargoCollectionDetailWindow(CargoManagementContext cmContext, CargoCollection cc)
 {
     InitializeComponent();
     this.DataContext = new CargoCollectionDetailWindowViewModel(cmContext, cc);
 }
Beispiel #5
0
 public AddSellOrderWindow(CargoCollection cargoCollection)
 {
     InitializeComponent();
     this.DataContext = new AddSellOrderWindowViewModel(cargoCollection);
 }