private void PackPickOrderLine(PackStationFromLCViewResult lineToPackFrom, decimal quantityToPack)
        {
            PackStationOverviewPackRowEventArgs args = new PackStationOverviewPackRowEventArgs();

            args.FromLoadCarrier     = lineToPackFrom.LoadCarrierId;
            args.ToLoadCarrier       = ToLoadCarrierId;
            args.PickOrderLineNumber = lineToPackFrom.PickOrderLineNumber;
            args.QuantityToPack      = quantityToPack;

            if (PackRow != null)
            {
                PackRow(this, args);
            }
        }
コード例 #2
0
        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;
                }
            }
        }