コード例 #1
0
        private async void executeUtilityAction(string obj)
        {
            IOrderDetailViewModel orderDetail = _main.OrderViewModel.OrderDetailViewModel;

            switch (obj)
            {
            case "convert-quoteToOrder":
                orderDetail.updateOrderStatus(EOrderStatus.Pre_Order);
                break;

            case "valid-order":
                orderDetail.updateOrderStatus(EOrderStatus.Order);
                break;

            case "valid-credit":
                if (await Singleton.getDialogueBox().showAsync("Do you really want to validate this credit?"))
                {
                    orderDetail.updateOrderStatus(EOrderStatus.Credit);
                }
                break;

            case "convert-orderToQuote":
                if (await Singleton.getDialogueBox().showAsync("Do you really want to convert into quote?"))
                {
                    orderDetail.updateOrderStatus(EOrderStatus.Quote);
                }
                break;

            case "convert-quoteToCredit":
                if (await Singleton.getDialogueBox().showAsync("Do you really want to convert into credit?"))
                {
                    orderDetail.updateOrderStatus(EOrderStatus.Pre_Credit);
                }
                break;

            case "close-order":
                if (await Singleton.getDialogueBox().showAsync("Do you really want to close this order?"))
                {
                    orderDetail.updateOrderStatus(EOrderStatus.Order_Close);
                }
                break;

            case "close-credit":
                if (await Singleton.getDialogueBox().showAsync("Do you really want to close this credit?"))
                {
                    orderDetail.updateOrderStatus(EOrderStatus.Credit_CLose);
                }
                break;

            case "order":
                _page(_main.OrderViewModel);
                break;

            case "quote":
                _page(_main.QuoteViewModel);
                break;
            }
        }
コード例 #2
0
 public OrderSideBarViewModel(IMainWindowViewModel mainWindowViewModel, IOrderDetailViewModel orderDetailvieModel) : this()
 {
     _main = mainWindowViewModel;
     _orderDetailViewModel = orderDetailvieModel;
     _page = _main.navigation;
     instances();
     instancesCommand();
     initEvents();
 }
コード例 #3
0
 private void instancesModel(IMainWindowViewModel main)
 {
     _waitValidOrders       = new List <OrderModel>();
     _waitValidClientOrders = new List <OrderModel>();
     _orderModelList        = new List <OrderModel>();
     _inProcessOrders       = new List <OrderModel>();
     _waitPayOrders         = new List <OrderModel>();
     _closedOrders          = new List <OrderModel>();
     _orderDetailViewModel  = (IOrderDetailViewModel)_main.ViewModelCreator.createViewModel(Enums.EViewModel.ORDERDETAIL, main);
     OrderSideBarViewModel  = (ISideBarViewModel)_main.ViewModelCreator.createViewModel(Enums.EViewModel.ORDERMENU, main, _orderDetailViewModel);
     _selectedClient        = (ClientModel)_main.ModelCreator.createModel(QOBDModels.Enums.EModel.CLIENT);
 }
コード例 #4
0
 private void instancesModel()
 {
     _orderModel           = (OrderModel)_main.ModelCreator.createModel(QOBDModels.Enums.EModel.ORDER);
     _quoteDetailViewModel = _main.OrderViewModel.OrderDetailViewModel;
     _selectedClient       = (ClientModel)_main.ModelCreator.createModel(QOBDModels.Enums.EModel.CLIENT);
 }