示例#1
0
        public Transaction(string importId, AccountInfo accountInfo, ImportedValues importedValues)
        {
            importedValues.Validate();

            this.AuditInfo = new AuditInfo();

            this.ImportId  = importId;
            this.AccountId = accountInfo.Id;

            this.RequiresParent         = importedValues.RequiresParent ?? accountInfo.RequiresParent;
            this.Amount                 = importedValues.Amount.Value;
            this.EntityName             = importedValues.EntityName;
            this.EntityId               = importedValues.EntityId;
            this.EntityNameNormalized   = importedValues.EntityNameNormalized ?? GetEntityNameNormalized(this.EntityName);
            this.PostedDate             = importedValues.PostedDate;
            this.TransactionDate        = importedValues.TransactionDate.Value;
            this.TransactionReason      = importedValues.TransactionReason.Value;
            this.InstituteReference     = importedValues.InstituteReference;
            this.ProviderCategoryName   = importedValues.ProviderCategoryName;
            this.PhoneNumber            = importedValues.PhoneNumber;
            this.Address                = importedValues.Address;
            this.SubAccountName         = importedValues.SubAccountName;
            this.AccountNumber          = importedValues.AccountNumber;
            this.CheckReference         = importedValues.CheckReference;
            this.ProviderAttributes     = importedValues.ProviderAttributes;
            this.LineItemType           = importedValues.LineItemType;
            this.ParentChildMatchFilter = importedValues.ParentChildMatchFilter;

            this.LineNumber  = importedValues.LineNumber;
            this.ContentHash = importedValues.ContentHash ?? GetContentHash(this.GetContent());
            this.Id          = Utils.GetMD5HashString(string.Join("\t", this.GetContent().Concat(importedValues.LineNumber.ToStringInvariant(string.Empty)
                                                                                                 , this.InstituteReference)), true);

            this.Validate();
        }
示例#2
0
 private void SplitStrings() //splits all the values into seperate values
 {
     AllImportedValues = new ImportedValues[AllImportedStrings.Count];
     for (int i = 0; i < AllImportedStrings.Count; i++)
     {
         AllImportedValues[i]        = new ImportedValues();
         AllImportedValues[i].Values = AllImportedStrings[i].Split(';');
     }
     LoadAIImages();
 }