public MainOrderVm(IBackPreviousVm backPreviousVm, ISearchNewPhoneVm searchNewPhone, IFranchiseContainerVm franchiseContainer, IClientsListVm clientsList, IAddressListVm addressList, IOrderSummaryVm orderSummary, IOrderPosVm orderPosVm, ISendOrderVm sendOrder, IMainOrderService orderService, IPosService posService, IStoreAddressService storeAddressService, ILastOrderFoVm lastOrderFo) { BackPrevious = backPreviousVm; SearchNewPhone = searchNewPhone; Franchises = franchiseContainer; ClientsList = clientsList; AddressList = addressList; OrderPos = orderPosVm; SendOrder = sendOrder; clientsList.ValidateModel = orderService.ValidateModel; addressList.ValidateModel = orderService.ValidateModel; orderPosVm.ValidateModel = orderService.ValidateModel; sendOrder.ValidateModel = orderService.ValidateModel; _orderService = orderService; _posService = posService; _storeAddressService = storeAddressService; _storeAddressService.OrderService = orderService; _lastOrderFo = lastOrderFo; orderSummary.OrderService = orderService; OrderSummary = orderSummary; sendOrder.OrderService = orderService; clientsList.SetOrderModel(() => orderService.OrderModel); addressList.SetOrderModel(() => orderService.OrderModel); _dicTabItems = new Dictionary <int, IUcViewModel> { { SharedConstants.Client.ORDER_TAB_PHONE, _searchNewPhone }, { SharedConstants.Client.ORDER_TAB_FRANCHISE, _franchises }, { SharedConstants.Client.ORDER_TAB_CLIENTS, _clientsList }, { SharedConstants.Client.ORDER_TAB_ORDER, _orderPos }, { SharedConstants.Client.ORDER_TAB_DELIVERY, _sendOrder } }; LstChildren.AddRange(_dicTabItems.Values); foreach (var wizard in LstChildren) { wizard.NextStep += GoNextStep; } LstChildren.Add(_backPrevious); LstChildren.Add(_addressList); LstChildren.Add(_orderSummary); RxApp.MainThreadScheduler.Schedule(_ => SelectedTab = SharedConstants.Client.ORDER_TAB_PHONE); InitializeServices(); }
public ClientsListVm(IUpsertClientFoVm upsertClientFo, IReactiveDeliveryClient client) { _upsertClient = upsertClientFo; _client = client; LstChildren.Add(_upsertClient); AddClient = ReactiveCommand.CreateAsyncTask(Observable.Return(true), _ => OnAddClient()); EditClient = ReactiveCommand.CreateAsyncTask(Observable.Return(true), OnEditClient); RemoveClient = ReactiveCommand.CreateAsyncTask(Observable.Return(true), OnRemoveClient); RetrySaveClient = ReactiveCommand.CreateAsyncTask(Observable.Return(true), OnRetrySaveClient); MessageBus.Current.Listen <PropagateOrderModel>(SharedMessageConstants.PROPAGATE_LASTORDER_CLIENT).Subscribe(OnPropagate); }
public AddressListVm(IUpsertAddressFoVm upsertAddressFo, IReactiveDeliveryClient client) { _upsertAddress = upsertAddressFo; _client = client; LstChildren.Add(_upsertAddress); Add = ReactiveCommand.CreateAsyncTask(Observable.Return(true), _ => OnAdd()); Edit = ReactiveCommand.CreateAsyncTask(Observable.Return(true), OnEdit); Remove = ReactiveCommand.CreateAsyncTask(Observable.Return(true), OnRemove); RetrySaveItem = ReactiveCommand.CreateAsyncTask(Observable.Return(true), OnRetrySave); Setting = SettingsData.Constants.AddressGridSetting; LstStores = new ReactiveList <ItemCatalog>(); HasAdditionalLstStore = Visibility.Collapsed; MessageBus.Current.Listen <PropagateOrderModel>(SharedMessageConstants.PROPAGATE_LASTORDER_ADDRESS).Subscribe(OnPropagate); }
//private readonly IDictionary<int, IUcViewModel> _dicTabItems; public DailyOrderStatusVm(IBackPreviousVm backPreviousVm, ISearchDailyOrderVm searchDaily, IOrdersListVm ordersListTrack, IOrderDetailVm orderDetail) { BackPrevious = backPreviousVm; SearchDaily = searchDaily; OrdersListTrack = ordersListTrack; OrderDetail = orderDetail; //_dicTabItems = new Dictionary<int, IUcViewModel> //{ // {SharedConstants.Client.ORDER_TAB_PHONE, _searchTrack}, //}; //LstChildren.AddRange(_dicTabItems.Values); LstChildren.Add(_searchDaily); LstChildren.Add(_backPrevious); LstChildren.Add(_ordersListTrack); LstChildren.Add(_orderDetail); InitializeServices(searchDaily, ordersListTrack, orderDetail); }
public void AddChildren(TreeNode node) { LstChildren.Add(node); node.ParrentNode = this; }
public BrowserVm(IBackPreviousVm backPreviousVm) { BackPrevious = backPreviousVm; LstChildren.Add(_backPrevious); }