Exemplo n.º 1
0
        public CancelBlockVM()
        {
            IndividualBlock      = new IndividualBlock();
            Block                = new ObservableCollection <Block>(db.Blocks.Where(o => o.BlockStatusID == 5).ToList());
            CancelBlockCommand   = new DelegateCommand(CancleBlockPredicate, CancelBlockAction);
            DashBoardPageCommand = new DelegateCommand((obj) => true, TradersDashBoardAction);
            var statusIdValue = db.Block_status.Where(o => o.StatusName == "New").Select(s => s.BlockStatusId).FirstOrDefault();

            BlockCheckedList = new ObservableCollection <CheckedBlock>(BlockToCheckedBlockMapper.ToCheckedBlockList(db.Blocks.Where(o => o.BlockStatusID == statusIdValue).ToList()));
        }
 public TraderEditVM()
 {
     IndividualOrder     = new IndividualOrder();
     IndividualBlock     = new IndividualBlock();
     OrderInBlock        = new ObservableCollection <Order>();
     SaveDelegateCommand = new DelegateCommand(o => true, SaveData);
     Order = db.Orders.ToList();
     Block = db.Blocks.ToList();
     DashBoardPageCommand = new DelegateCommand((obj) => true, TradersDashBoardAction);
 }
Exemplo n.º 3
0
 public TraderDashboardVM()
 {
     IndividualOrder = new IndividualOrder();
     IndividualBlock = new IndividualBlock();
     OrderInBlock    = new ObservableCollection <Order>();
     Order           = new ObservableCollection <CheckedOpenOrder>(CheckedOpenOrderToOrderMapper.ToCheckedOrderList(db.Orders.Where(o => o.BlockID == null && o.OrderStatusID == 2).ToList()));
     // OrderInBlock = db.Orders.ToList().Where(o => o.BlockID == 8);
     Block = new ObservableCollection <CheckedBlock>(BlockToCheckedBlockMapper.ToCheckedBlockList(db.Blocks.ToList()));
     ViewBlockOrdersCommand   = new DelegateCommand(ViewBlockOrdersPredicate, ViewBlockOrdersAction);
     CreateNewBlockCommand    = new DelegateCommand(CreaetNewBlockPredicte, CreateNewBlockAction);
     AddToExistingCommand     = new DelegateCommand(AddToExistingPredicate, AddToExistingAction);
     EditBlockOrdersCommand   = new DelegateCommand((obj) => true, EditBlockOrdersAction);
     CancelBlockOrdersCommand = new DelegateCommand((obj) => true, CancelBlockOrdersAction);
     ViewBlockCommand         = new DelegateCommand((obj) => true, ViewBlockAction);
     SendToExchangeCommand    = new DelegateCommand(SendToExchangePredicate, SendToExchangeAction);
 }