public virtual void OnPackStationOverviewRunPackRowForPackStation(WorkItem context, object caller, object target)
        {
            if (target is Imi.SupplyChain.Warehouse.UX.Views.PickLoadCarrier.PackStationOverviewPackRowEventArgs)
            {
                WorkItem wi = GetModuleWorkItem(context);

                if (wi.Items.FindByType <RunPackRowForPackStationAction>().Count == 0)
                {
                    wi.Items.AddNew <RunPackRowForPackStationAction>();
                }

                Imi.SupplyChain.Warehouse.UX.Views.PickLoadCarrier.PackStationOverviewPackRowEventArgs args = target as Imi.SupplyChain.Warehouse.UX.Views.PickLoadCarrier.PackStationOverviewPackRowEventArgs;

                RunPackRowForPackStationActionParameters actionParameters = new RunPackRowForPackStationActionParameters();
                actionParameters.FromLoadCarrierId   = args.FromLoadCarrier;
                actionParameters.ToLoadCarrierId     = args.ToLoadCarrier;
                actionParameters.PickOrderLineNumber = args.PickOrderLineNumber;
                actionParameters.PickedQuantity      = args.QuantityToPack;
                actionParameters.IsItemSelected      = true;

                IPackStationOverviewView packStationOverviewView = context.SmartParts.FindByType <IPackStationOverviewView>().LastOrDefault();
                IPackStationFromLCView   packStationFromLcView   = context.SmartParts.FindByType <IPackStationFromLCView>().LastOrDefault();
                IPackStationToLCView     packStationToLcView     = context.SmartParts.FindByType <IPackStationToLCView>().LastOrDefault();

                try
                {
                    ActionCatalog.Execute(ActionNames.RunPackRowForPackStation, context, caller, actionParameters);

                    if (context.Items.Contains("RefreshPackStationOverview"))
                    {
                        if (((bool)context.Items["RefreshPackStationOverview"]))
                        {
                            packStationOverviewView.Refresh();
                        }
                        else
                        {
                            if (packStationFromLcView != null)
                            {
                                packStationFromLcView.Refresh();
                            }

                            if (packStationToLcView != null)
                            {
                                packStationToLcView.Refresh();
                            }
                        }
                    }
                    else
                    {
                        if (packStationFromLcView != null)
                        {
                            packStationFromLcView.Refresh();
                        }

                        if (packStationToLcView != null)
                        {
                            packStationToLcView.Refresh();
                        }
                    }
                }
                catch
                {
                    throw;
                }
            }
        }
        public override void OnPackStationToLCRunUnPackAllRowsForPackStation(WorkItem context, object caller, object target)
        {
            WorkItem wi = GetModuleWorkItem(context);

            if (wi.Items.FindByType <RunUnPackAllRowsForPackStationAction>().Count == 0)
            {
                wi.Items.AddNew <RunUnPackAllRowsForPackStationAction>();
            }

            PackStationToLCViewResult viewResult = null;
            RunUnPackAllRowsForPackStationActionParameters actionParameters = null;
            PackStationToLCViewToRunUnPackAllRowsForPackStationActionTranslator translator = null;
            bool isItemSelected = false;

            if (context.Items.FindByType <PackStationToLCViewToRunUnPackAllRowsForPackStationActionTranslator>().Count > 0)
            {
                translator = context.Items.FindByType <PackStationToLCViewToRunUnPackAllRowsForPackStationActionTranslator>().Last();
            }
            else
            {
                translator = context.Items.AddNew <PackStationToLCViewToRunUnPackAllRowsForPackStationActionTranslator>();
            }

            if (context.Items.FindByType <PackStationToLCViewResult>().Count > 0)
            {
                viewResult     = context.Items.FindByType <PackStationToLCViewResult>().Last();
                isItemSelected = true;
            }
            else
            {
                viewResult = new PackStationToLCViewResult();

                if (context.Items.FindByType <PackStationToLCViewParameters>().Count() > 0)
                {
                    PackStationToLCViewParameters viewParameters = context.Items.FindByType <PackStationToLCViewParameters>().Last();
                }
            }

            actionParameters = translator.Translate(viewResult);
            actionParameters.IsItemSelected          = isItemSelected;
            actionParameters.IsMultipleItemsSelected = false;

            IPackStationToLCView     view = context.SmartParts.FindByType <PackStationToLCView>().Last();
            IPackStationOverviewView packStationOverviewView = context.SmartParts.FindByType <IPackStationOverviewView>().LastOrDefault();

            try
            {
                if (!view.Validate())
                {
                    return;
                }

                ActionCatalog.Execute(ActionNames.RunUnPackAllRowsForPackStation, context, caller, actionParameters);

                // Check if view should be closed.
                bool ignoreClosing = ((context.Items.Get("IgnoreClose") != null) &&
                                      ((bool)(context.Items.Get("IgnoreClose"))));

                packStationOverviewView.Refresh();
            }
            catch (Imi.SupplyChain.UX.ValidationException ex)
            {
                view.HandleValidationResult(ValidationHelper.ConvertToResult((Imi.SupplyChain.UX.ValidationException)ex));
            }
        }