Beispiel #1
0
        public virtual void ProcessFile(bool lastYear, bool allAsset, string assetName)
        {
            if (results != null)
            {
                resultsMemento = SaveMemento(results);
            }

            try
            {
                OperationBase.Instance.LastYear  = lastYear;
                OperationBase.Instance.AllAssets = allAsset;
                if (assetName.Trim() == "")
                {
                    OperationBase.Instance.AllAssets = true;
                }
                if (!OperationBase.Instance.AllAssets)
                {
                    OperationBase.Instance.assetName = assetName.ToUpper();
                }
                results = OperationBase.Instance.ProcessFile(stringArquivoOperacoes);
            }
            catch
            {
                throw new Exception();
            }
        }
 public void RestoreMemento(ResultsMemento memento)
 {
     AssetTotalQuantity = memento.AssetTotalQuantity;
     AssetTotalValue    = memento.AssetTotalValue;
     AssetUnitValue     = memento.AssetUnitValue;
 }