Exemplo n.º 1
0
 public Transaction CreateTransactionFromSpecification(TransactionSpecification spec)
 {
     return(CreateTransaction(spec.TransactionType.TransCode,
                              spec.Item,
                              spec.SourceArea.FullLocation,
                              spec.DestinationArea.FullLocation,
                              spec.Comments,
                              spec.TransactionReference));
 }
Exemplo n.º 2
0
        public bool SaveTransaction(TransactionSpecification specification)
        {
            // Ask the spec to update the inventory with its changes.
            // TODO: SMELLS FUNNY!
            specification.UpdateItem();

            // Create the transaction to be persisted
            Transaction trans = CreateTransactionFromSpecification(specification);

            try
            {
                Scout.Core.Data.Save(specification.Item.Session);
                return(true);
            }
            catch (Exception ex)
            {
                Scout.Core.UserInteraction.Dialog.ShowMessage(ex.Message, UserMessageType.Exception);
                return(false);
            }
        }