private void ActionButton_Click(object sender, RoutedEventArgs e)
 {
     _vm = DataContext as DistributrMessageBoxViewModel;
     _vm.Command = DistributrMessageBoxViewModel.CommandToExcecute.Action1ButtonClickedCommand;
     _vm.DialogResult = true;
     this.DialogResult = true;
 }
        public DistributrMessageBox(bool showNewButton = true, bool showHomeButton = true, bool showOKButton = true, bool showCancelButton = true, bool showActin1Button = true, string newButtonText = "New", string homeButtonText = "Home", string OKButtonText = "OK", string cancelButtonText = "Cancel", string action1ButtonText = "View List")
        {
            InitializeComponent();
            _vm = this.DataContext as DistributrMessageBoxViewModel;
            _vm.ShowCancelButton = showCancelButton;
            _vm.ShowHomeButton = showHomeButton;
            _vm.ShowNewButton = showNewButton;
            _vm.ShowOKButton = showOKButton;
            _vm.ShowAction1Button = showActin1Button;

            _vm.NewButtonText = newButtonText;
            _vm.HomeButtonText = homeButtonText;
            _vm.OKButtonText = OKButtonText;
            _vm.CancelButtonText = cancelButtonText;
            _vm.Action1ButtonText = action1ButtonText;
        }
        void _distributrMessageBoxRevisedPostDispatch_Closed(object sender, EventArgs e)
        {

            //new, home, ok, cancel, action1
            _distributrMessageBoxViewModel = _distributrMessageBox.DataContext as DistributrMessageBoxViewModel;
            switch (_distributrMessageBoxViewModel.Command)
            {
                case DistributrMessageBoxViewModel.CommandToExcecute.NewButtonClickedCommand: //Continue Dispatching Orders
                    return;
                    break;
                case DistributrMessageBoxViewModel.CommandToExcecute.HomeButtonClickedCommand: //Approve Orders
                    string uri = "views/salesmanorders/listsalesmanorders.xaml?PendingApprovals";
                    NavigationService.Navigate(new Uri(uri, UriKind.Relative));
                    break;
                case DistributrMessageBoxViewModel.CommandToExcecute.OKButtonClickedCommand: //View Dispatched Orders
                    string uri2 = "views/salesmanorders/listsalesmanorders.xaml?DispatchedOrders";
                    NavigationService.Navigate(new Uri(uri2, UriKind.Relative));
                    break;
            }
            if (!_distributrMessageBoxViewModel.DialogResult) //close box??
                return; //do a lot of nothing
        }
        void PostDispatchMessageBox()
        {
            string msg = "";
            string ordersThatCntBeDispatched = "";
            string post_dispatch_msg = "";
            //new, home, ok, cancel, action1
            if (_vm != null)
                _vm = this.DataContext as ListSalesmanOrdersViewModel;

            post_dispatch_msg = _vm.dispatchCount + " "
                + _messageResolver.GetText("sl.dispatchOrders.dispatch.sucess.messagebox.text")/*"order(s) were dispatched successfully."*/
                + "\n\n";
            if (_vm.OrdersThatCannotBeDispatched != null)
            {
                if (_vm.OrdersThatCannotBeDispatched.Count > 0)
                {
                    msg +=
                        _messageResolver.GetText("sl.dispatchOrders.dispatch.fail.messagebox.text1")/*"The following"*/
                        + " " + ordersThatCntBeDispatched.Count() + " " +
                        _messageResolver.GetText("sl.dispatchOrders.dispatch.fail.messagebox.text2")
                        /*"orders could not be dispatched because insuficient inventory on all of the order items."*/
                        + "\n";
                    ordersThatCntBeDispatched = _vm.OrdersThatCannotBeDispatched.Aggregate(ordersThatCntBeDispatched,
                                                                                           (current, order) =>
                                                                                           current +
                                                                                           ("\t" +
                                                                                            order.DocumentReference +
                                                                                            "\n"));

                    msg += ordersThatCntBeDispatched;
                }
            }

            bool showDispatchOption = _vm.Orders.Count() > 0;

            string btnCont = _messageResolver.GetText("sl.dispatchOrders.dispatch.sucess.messagebox.option.continue")/*"Continue Dispatching Orders"*/;
            string btnApprove = _messageResolver.GetText("sl.dispatchOrders.dispatch.sucess.messagebox.option.approve")/*"Approve Orders"*/;
            string btnView = _messageResolver.GetText("sl.dispatchOrders.dispatch.sucess.messagebox.option.view")/*"View Dispatched Orders"*/;
            _distributrMessageBox = new DistributrMessageBox(showDispatchOption, true, true, false, false, btnCont,
                                                             btnApprove, btnView);
            _distributrMessageBoxViewModel = _distributrMessageBox.DataContext as DistributrMessageBoxViewModel;
            _distributrMessageBox.Closed += new EventHandler(_distributrMessageBoxRevisedPostDispatch_Closed);
            _distributrMessageBoxViewModel.MessageBoxTitle = _messageResolver.GetText("sl.dispatchOrders.dispatch.messagebox.caption")/* "Distributr: Dispatch Orders"*/;
            _distributrMessageBoxViewModel.NewButtonToolTip =
                "Continue dispatching orders";
            _distributrMessageBoxViewModel.HomeButtonTooTip =
                "Go to orders pending approval list and approve orders";
            _distributrMessageBoxViewModel.OKButtonToolTip =
                "Go to list of dispatched orders.";

            post_dispatch_msg += msg;
            _distributrMessageBoxViewModel.MessageBoxContent = post_dispatch_msg;
            _distributrMessageBox.ShowDialog();
        }
        void CompletedActionOptions(string msg1)
        {
            string newOrder = _messageResolver.GetText("sl.createOrder.postconfirm.messagebox.options.newOrder");/*"New Order";*/
            string approveOrders = _messageResolver.GetText("sl.createOrder.save.messagebox.options.approveOrders"); /*"Approve Orders";*/
            string summary = _messageResolver.GetText("sl.createOrder.save.messagebox.options.ordersSummary");/*"Orders Summary"*/
            _distMsgBxVm = new DistributrMessageBoxViewModel();
            _distMsgBx = new DistributrMessageBox(true, true, false, false, true, newOrder,
                                                             approveOrders, null, null, summary);

            _distMsgBx.Closed += new EventHandler(_distMsgBx_Closed);
            _distMsgBxVm = _distMsgBx.DataContext as DistributrMessageBoxViewModel;
            if (OtherUtilities.StrBackUrl.Trim() == "")
                OtherUtilities.StrBackUrl = "/views/salesmanorders/listsalesmanorders.xaml?PendingApprovals";
            _distMsgBxVm.MyListUri = OtherUtilities.StrBackUrl;
            _distMsgBxVm.NewUriString = "/views/salesmanorders/listsalesmanorders.xaml?orderid=" + Guid.Empty;
            _distMsgBxVm.MessageBoxContent = msg1;
            _distMsgBxVm.MessageBoxTitle = "Distributr: Create Order On Behalf of Salesman";
            _distMsgBxVm.Action1ButtonToolTip = "Go to list of orders";
            _distMsgBxVm.HomeButtonTooTip = "Approve orders";
            _distMsgBxVm.NewButtonToolTip = "Create a new order";
            _distMsgBx.ShowDialog();
        }
 //used in confirm and approve which is not is use currently
 void _distMsgBx_PreApproval_Closed(object sender, EventArgs e)
 {
     this.Cursor = Cursors.Wait;
     _distMsgBxVm = _distMsgBx.DataContext as DistributrMessageBoxViewModel;
     _vm = this.DataContext as EditSalesmanOrderViewModel;
     _distMsgBxVm.DialogResult = true;
     switch (_distMsgBxVm.Command)
     {
         case DistributrMessageBoxViewModel.CommandToExcecute.NewButtonClickedCommand://create back orders and approve them
             this.Cursor = Cursors.Wait;
             _vm.CreateBackOrderAndApproveCommand.Execute(null);
             this.Cursor = Cursors.Arrow;
             CompletedActionOptions("Order " + _vm.OrderId + " on behalf of " +
                                              _vm.SelectedSalesman.Username +
                                              "\nwas successfully confirmed after creation of backorder.");
             break;
         case DistributrMessageBoxViewModel.CommandToExcecute.HomeButtonClickedCommand://go back to page
             _distMsgBxVm.DialogResult = false;
             this.Cursor = Cursors.Arrow;
             break;
         case DistributrMessageBoxViewModel.CommandToExcecute.CancelButtonClickedCommand://go back to page
             _distMsgBxVm.DialogResult = false;
             this.Cursor = Cursors.Arrow;
             break;
     }
     if (!_distMsgBxVm.DialogResult) return;
     this.Cursor = Cursors.Arrow;
 }
        //cn: not in use currently
        private void btnConfirmAndApprove_Click(object sender, RoutedEventArgs e)
        {
            if (_vm.LineItems.Count < 1)
            {
                MessageBox.Show("The order must have at least 1 line item.", "Distributr: Order Line Items.", MessageBoxButton.OK);
                return;
            }
            if (MessageBox.Show("Confirm and Approve order " + _vm.OrderId + "?", "Distributr: Confirm Action.", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
            {
                if (_vm.IsValid())
                {
                    this.Cursor = Cursors.Wait;
                    //_vm.ConfirmAndApproveCommand.Execute(null);
                    //confirm
                    _vm.showConfirmMsg = false;
                    _vm.ConfirmCommand.Execute(null);
                    //validate for approval
                    _vm.ValidateOrderForApprovalCommand.Execute(null);
                    //if valid approve
                    if (_vm.OrderIsValidForApproval)
                    {
                        _vm.ApproveOrderCommand.Execute(null);
                    }
                    else
                    {//cn: mambo mbiad
                        this.Cursor = Cursors.Wait;
                        _vm.CreateInvalidOrdersMessageCommand.Execute(null);

                        this.Cursor = Cursors.Arrow;
                        _distMsgBxVm = new DistributrMessageBoxViewModel();
                        _distMsgBx = new DistributrMessageBox(true, true, false, true, false, "Create Back Order",
                                                              "Edit Order", null, "Cancel");
                        //_distMsgBx.Width = _distMsgBx.MinWidth;
                        //_distMsgBx.Height = _distMsgBx.MinHeight;

                        _distMsgBx.Closed += new EventHandler(_distMsgBx_PreApproval_Closed);
                        _distMsgBxVm = _distMsgBx.DataContext as DistributrMessageBoxViewModel;
                        _distMsgBxVm.MyListUri = "";//"/views/salesmanorders/listsalesmanorders.xaml?PendingApprovals"
                        _distMsgBxVm.NewUriString = ""; //"/views/salesmanorders/listsalesmanorders.xaml?orderid=" + Guid.Empty
                        _distMsgBxVm.MessageBoxContent =
                            "Order cannot be fulfilled.\nThe available inventory cannot satisfy the following order item(s):\n" +
                            _vm.Message +
                            "\nSelect an option to proceed.";

                        _distMsgBxVm.MessageBoxTitle = "Distributr: Approve Order " + _vm.OrderId + " on behalf of " +
                                                       _vm.SelectedSalesman.Username;
                        _distMsgBx.ShowDialog();
                    }
                    this.Cursor = Cursors.Arrow;
                }
            }
        }
        private void btnConfirmOrder_Click(object sender, RoutedEventArgs e)
        {
            if (_vm.LineItems.Count < 1)
            {
                MessageBox.Show(
                    _messageResolver.GetText("sl.createOrder.confirm.messagebox.nolineItems")/*"The order must have at least 1 line item."*/
                    , "!" + _messageResolver.GetText("sl.createOrder.confirm.messagebox.nolineItems.caption")/*Distributr: Confirm Order*/
                    , MessageBoxButton.OK);
                return;
            }
            if (
                MessageBox.Show(_messageResolver.GetText("sl.createOrder.confirm.messagebox") /*"Confirm order" */
                + " " + _vm.OrderId + "?"
                , _messageResolver.GetText("sl.createOrder.confirm.messagebox.nolineItems.caption")/*Distributr: Confirm Order*/
                , MessageBoxButton.OKCancel) == MessageBoxResult.OK)
            {
                this.Cursor = Cursors.Wait;
                if (_vm.IsValid())
                {
                    this.Cursor = Cursors.Wait;
                    _vm.showConfirmMsg = false;
                    _vm.ConfirmCommand.Execute(null);
                    _vm.showConfirmMsg = true;
                    this.Cursor = Cursors.Arrow;

                    string newOrder = _messageResolver.GetText("sl.createOrder.postconfirm.messagebox.options.newOrder");/* "New Order";*/
                    string home = _messageResolver.GetText("sl.createOrder.postconfirm.messagebox.options.home");/*"Home Page";*/
                    string viewList = _messageResolver.GetText("sl.createOrder.postconfirm.messagebox.options.viewList");/*"View List";*/

                    _distMsgBxVm = new DistributrMessageBoxViewModel();
                    _distMsgBx = new DistributrMessageBox(true, true, false, false, true, newOrder,
                                                                     home, null, viewList);

                    CompletedActionOptions(
                        _messageResolver.GetText("sl.createOrder.postconfirm.messagebox.text1") /*"Order"*/
                        + " " + _vm.OrderId + " "
                        + _messageResolver.GetText("sl.createOrder.postconfirm.messagebox.text2") /*"on behalf of"*/
                        + " " + _vm.SelectedSalesman.Username + " "
                        + _messageResolver.GetText("sl.createOrder.postconfirm.messagebox.text3")/*"was successfully confirmed."*/
                        );
                    this.Cursor = Cursors.Arrow;
                }
            }
        }
        private void _distMsgBx_PreApproval_Closed(object sender, EventArgs e)
        {
            _distMsgBxVm = _distMsgBx.DataContext as DistributrMessageBoxViewModel;
            _vm = this.DataContext as ApproveSalesmanOrderViewModel;
            string msg = /*"Order "*/
                _messageResolver.GetText("sl.approveOrder.approve.messageBox.approved.message.part1") + " "
                + _vm.OrderId +
                /*" on behalf of "*/
                " " + _messageResolver.GetText("sl.approveOrder.approve.messageBox.approved.message.part2") + " "
                + _vm.SalesmanUsername +
                /*" was successfully approved.";*/
                " " + _messageResolver.GetText("sl.approveOrder.approve.messageBox.approved.message.part3") + " ";
            string caption = _messageResolver.GetText("sl.approveOrder.approve.messageBox.approved.caption");
            /*"Distributr: Approve Order On Behalf of Salesman";*/

            if (_distMsgBxVm.DialogResult)
            {
                switch (_distMsgBxVm.Command)
                {
                    case DistributrMessageBoxViewModel.CommandToExcecute.NewButtonClickedCommand:
                        if (_vm.ProcessingBackOrder)
                        {
                            caption = _messageResolver.GetText("sl.approveOrder.rejected.messageBox.message.title");
                            /* "Distributr: Reject Order On Behalf of Salesman";*/
                            msg = /*"Back order of order " */
                                _messageResolver.GetText("sl.approveOrder.bo.rejected.messageBox.message.part1") + " "
                                + _vm.OrderId +
                                /*" on behalf of " +*/
                                " " + _messageResolver.GetText("sl.approveOrder.bo.rejected.messageBox.message.part2") +
                                " "
                                + _vm.SalesmanUsername +
                                /*" was rejected and a lost sale created.";*/
                                _messageResolver.GetText("sl.approveOrder.rejected.messageBox.message.part3");
                            this.Cursor = Cursors.Wait;
                            _vm.RejectCommand.Execute(null);
                            this.Cursor = Cursors.Arrow;
                        }
                        else
                        {
                            this.Cursor = Cursors.Wait;
                            _vm.RunCreateBackOrderAndApprove();
                            this.Cursor = Cursors.Arrow;
                        }
                        ShowCompletedApprovalOptions(msg, caption);
                        break;
                    case DistributrMessageBoxViewModel.CommandToExcecute.Action1ButtonClickedCommand:
                        return;
                }
            } //default action
            if (!_distMsgBxVm.DialogResult) return;
        }
        private void _distMsgBx_PostApproval_Closed(object sender, EventArgs e)
        {
            _distMsgBxVm = _distMsgBx.DataContext as DistributrMessageBoxViewModel;
            if (_distMsgBxVm.DialogResult)
            {
                switch (_distMsgBxVm.Command)
                {
                    case DistributrMessageBoxViewModel.CommandToExcecute.NewButtonClickedCommand: //dispatch list
                        string urlDisp = "/views/DispatchPendingOrdersToPhone/DispatchPendingOrdersToPhone.xaml";
                        _vm.ConfirmNavigatingAway = false;
                        NavigationService.Navigate(new Uri(urlDisp, UriKind.Relative));
                        break;
                    case DistributrMessageBoxViewModel.CommandToExcecute.HomeButtonClickedCommand: //Process BO
                        string urlBO = "/views/salesmanorders/listsalesmanorders.xaml?BackOrders";
                        _vm.ConfirmNavigatingAway = false;
                        NavigationService.Navigate(new Uri(urlBO, UriKind.Relative));
                        break;
                    case DistributrMessageBoxViewModel.CommandToExcecute.Action1ButtonClickedCommand:
                        //pending approval list
                        _vm.ConfirmNavigatingAway = false;
                        NavigationService.Navigate(new Uri(OtherUtilities.StrBackUrl, UriKind.Relative));
                        break;
                }
            }
            else //default action
            {
                _vm.ConfirmNavigatingAway = false;
                NavigationService.Navigate(new Uri(OtherUtilities.StrBackUrl, UriKind.Relative));
            }

        }
        private void ShowCompletedApprovalOptions(string message, string caption)
        {
            _vm.ConfirmNavigatingAway = false;
            string goDispatch = _messageResolver.GetText("sl.approveOrder.approve.completed.messageBox.gotoDispatch");
            /*"Go To Dispatch";*/
            string processBO = _messageResolver.GetText("sl.approveOrder.approve.completed.messageBox.processBO");
            /*"Process Back Orders";*/
            string pendingList = _messageResolver.GetText("sl.approveOrder.approve.completed.messageBox.pendingList");
            /*"Pending Approval List";*/
            _distMsgBx = new DistributrMessageBox(true, true, false, false, true, goDispatch,
                                                  processBO, null, null, pendingList);
            //_distMsgBx = null;
            _distMsgBxVm = _distMsgBx.DataContext as DistributrMessageBoxViewModel;
            _distMsgBx.Closed += new EventHandler(_distMsgBx_PostApproval_Closed);

            _distMsgBxVm.ClearToolTips();

            _distMsgBxVm.NewButtonToolTip = "Dispatch orders pending dispatch.";
            _distMsgBxVm.HomeButtonTooTip = "Go to list of back orders and process back order.";
            _distMsgBxVm.Action1ButtonToolTip = "View List of orders pending approval";
            _distMsgBx.Width = _distMsgBx.MinWidth;
            _distMsgBx.Height = _distMsgBx.MinHeight;


            _distMsgBxVm = _distMsgBx.DataContext as DistributrMessageBoxViewModel;
            _distMsgBxVm.MyListUri = "/views/salesmanorders/listsalesmanorder.xaml?PendingApprovals";
            _distMsgBxVm.NewUriString = "/views/salesmanorders/listsalesmanorder.xaml?BackOrders";
            _distMsgBxVm.MessageBoxContent = message;
            _distMsgBxVm.MessageBoxTitle = caption;
            _distMsgBx.ShowDialog();
        }
        private void btnApprove_Click(object sender, RoutedEventArgs e)
        {
            bool showCompletedApprovalOptions = true;
            string btnApproveCaption =
                _messageResolver.GetText("sl.approveOrder.approve.messagebox.createBackOrderAndApprove_btn");
            /*"Create Back Order And Approve";*/
            string btnBackCaption = _messageResolver.GetText("sl.approveOrder.approve.messagebox.back_btn");
            string confirmationMsg = _messageResolver.GetText("sl.approveOrder.approve.messageBox.propmt") + " ";
            /*"Do you want to approve order ";*/
            string confirmationMsg2 = "";
            string newButtonToolTip =
                "Create back order of the uncovered quantities for each of the listed items then approve the whole order.";

            if (processingBackOrder)
            {
                btnApproveCaption = _messageResolver.GetText("sl.approveOrder.bo.messageBox.rejectBackOrder_btn");
                /*"Reject Back Order";*/
                newButtonToolTip = "Reject the whole back order and create a lost sale from back order items";
                confirmationMsg = _messageResolver.GetText("sl.approveOrder.bo.approve.messageBox.propmt") + " ";
                /*"Do you want to approve the back order for order ";*/

                if (_vm.Status == "OrderDispatchedToPhone")
                {
                    confirmationMsg2 = _messageResolver.GetText("sl.approveOrder.bo.approve.messageBox.propmt2");
                    /*"\nNOTE: To dispatch the back order go to dispatch orders module.";*/
                }

            }

            if (!processingBackOrder)
            {
                if (_vm.LineItems.Count < 1)
                {
                    MessageBox.Show(
                        _messageResolver.GetText("sl.approveOrder.approve.messageBox.nolineItemMessage")
                        /*"The order must have at least 1 line item."*/, "Order Line Items.",
                        MessageBoxButton.OK);
                    return;
                }
            }
            if (
                MessageBox.Show(confirmationMsg + _vm.OrderId + " ?" + confirmationMsg2,
                                _messageResolver.GetText("sl.approveOrder.approve.messageBox.caption")
                /*"Distributr: Confirm Action."*/,
                                MessageBoxButton.OKCancel) == MessageBoxResult.OK)
            {
                this.Cursor = Cursors.Wait;

                //CN:  
                //first validate
                _vm.ValidateOrderForApprovalCommand.Execute(null);
                //if is valid then approve it
                if (_vm.Validated)
                {
                    _vm.ApproveCommand.Execute(null);
                }
                else
                {
                    //show invalid n give options here !
                    _vm.CreateInvalidOrdersMessageCommand.Execute(null);
                    _distMsgBxVm = new DistributrMessageBoxViewModel();

                    _distMsgBx = new DistributrMessageBox(true, false, false, false, true, btnApproveCaption,
                                                          null, null, null, btnBackCaption);

                    showCompletedApprovalOptions = false;
                    _distMsgBx.Closed += new EventHandler(_distMsgBx_PreApproval_Closed);
                    _distMsgBxVm = _distMsgBx.DataContext as DistributrMessageBoxViewModel;
                    _distMsgBxVm.MessageBoxContent =
                        /*"Order cannot be fulfilled.\nThe available inventory cannot satisfy the following order item(s):\n"*/
                        _messageResolver.GetText("sl.approveOrder.approve.messageBox.unsatiableOrder.message.part1") +
                        "\n" +
                        _messageResolver.GetText("sl.approveOrder.approve.messageBox.unsatiableOrder.message.part2") +
                        "\n" + _vm.Message +
                        /*"\nSelect an option to proceed."*/
                        "\n" +
                        _messageResolver.GetText("sl.approveOrder.approve.messageBox.unsatiableOrder.message.part3");
                    _distMsgBxVm.NewButtonToolTip = newButtonToolTip;
                    _distMsgBxVm.Action1ButtonToolTip = "Cancel the order processing and go back to order processing.";
                    _distMsgBxVm.MessageBoxTitle =
                        /*"Distributr: Approve Order*/
                        _messageResolver.GetText("sl.approveOrder.approve.messageBox.unsatiableOrder.title.part1") + " " +
                        _vm.OrderId +
                        /*" on behalf of "*/
                        " " + _messageResolver.GetText("sl.approveOrder.approve.messageBox.unsatiableOrder.title.part2") +
                        " " + _vm.SalesmanUsername;
                    _distMsgBx.ShowDialog();
                }

                this.Cursor = Cursors.Arrow;

                if (_vm.IsApproved)
                {
                    string msg = /*"Order "*/
                        _messageResolver.GetText("sl.approveOrder.approve.messageBox.approved.message.part1") + " " +
                        _vm.OrderId
                        + " " /*" on behalf of "*/
                        + _messageResolver.GetText("sl.approveOrder.approve.messageBox.approved.message.part2")
                        + " "
                        + _vm.SalesmanUsername
                        + " "
                        + /*" was successfully approved."*/
                        _messageResolver.GetText("sl.approveOrder.approve.messageBox.approved.message.part3");

                    string caption = _messageResolver.GetText("sl.approveOrder.approve.messageBox.approved.caption");
                    /*"Distributr: Approve Order On Behalf of Salesman";*/

                    if (processingBackOrder)
                    {
                        msg = /*"Back Order for order "*/
                            _messageResolver.GetText("sl.approveOrder.bo.approve.messageBox.approved.message.part1") +
                            " "
                            + _vm.OrderId
                            + " " /*" on behalf of "*/
                            + _messageResolver.GetText("sl.approveOrder.bo.approve.messageBox.approved.message.part2") +
                            " "
                            + _vm.SalesmanUsername +
                            /* " was successfully approved."*/
                            _messageResolver.GetText("sl.approveOrder.bo.approve.messageBox.approved.message.part3");
                        caption = _messageResolver.GetText("sl.approveOrder.bo.approve.messageBox.approved.caption");
                        /*"Distributr: Approve Back Order";*/
                    }
                    if (showCompletedApprovalOptions)
                        ShowCompletedApprovalOptions(msg, caption);
                }
            }
            processingBackOrder = false;
        }
Example #13
0
 /// <summary>
 /// Provides a deterministic way to create the DistributrMessageBoxViewModel property.
 /// </summary>
 public static void CreateDistributrMessageBoxViewModel()
 {
     if (_distributrMessageBoxViewModelPropertyName == null)
     {
         _distributrMessageBoxViewModelPropertyName = new DistributrMessageBoxViewModel();
     }
 }
Example #14
0
 /// <summary>
 /// Provides a deterministic way to delete the DistributrMessageBoxViewModel property.
 /// </summary>
 public static void ClearDistributrMessageBoxViewModel()
 {
     _distributrMessageBoxViewModelPropertyName.Cleanup();
     _distributrMessageBoxViewModelPropertyName = null;
 }