public ToteContentsSelectorCommand(params object[] input) : base(input) { if (input[0] is Tote) { Args[0] = new ToteContentsTransferCommandArguments(input[0] as Tote); } }
public override void Execute() { ToteContentsTransferCommandArguments contentsTransferArguments = Args[0] as ToteContentsTransferCommandArguments; if (contentsTransferArguments == null) { throw new NotSupportedException(); } // Load the tote contents selection form ViewLoader.Instance() .CreateFormWithArgs <ToteContentsSelectorForm>( false, contentsTransferArguments); // If inventory items have been selected to transfer // then load the transfer form if (contentsTransferArguments.ItemsToMove.Count > 0) { ViewLoader.Instance() .CreateFormWithArgs <ToteContentsTransferForm>( false, contentsTransferArguments); } }
public ToteContentsPutAwayCommand(params object[] input) : base(input) { m_tote = input[0] as Tote; if (m_tote != null) { Args[0] = new ToteContentsTransferCommandArguments(input[0] as Tote); } }
public ToteRemoveItemDomainCommand(params object[] input) : base(input) { Tote tote = input[0] as Tote; if (tote != null) { Args[0] = new ToteContentsTransferCommandArguments(tote); } m_session = tote.Session; }
public override void Execute() { ToteContentsTransferCommandArguments contentsTransferArguments = Args[0] as ToteContentsTransferCommandArguments; if (contentsTransferArguments == null) { throw new NotSupportedException(); } // Load the tote contents selection form ViewLoader.Instance() .CreateFormWithArgs <ToteContentsSelectorForm>( false, contentsTransferArguments); }
public override void Execute() { ToteContentsTransferCommandArguments arguments = Args[0] as ToteContentsTransferCommandArguments; if (arguments == null) { throw new NotSupportedException(); } //Load the tote contents selection form ViewLoader.Instance() .CreateFormWithArgs <ToteContentsSelectorForm>( false, arguments); if (arguments.ItemsToMove.Count > 0) { foreach (InventoryItem item in arguments.ItemsToMove) { Scout.Core.Service <IInventoryService>() .RemoveItemFromTote(item); } try { Scout.Core.Data.Save(m_session); Scout.Core.UserInteraction.Dialog.ShowMessage ("Items removed", UserMessageType.Information); } catch (Exception ex) { Scout.Core.UserInteraction.Dialog.ShowMessage (ex.Message, UserMessageType.Error); } } }