예제 #1
0
 // Results
 // Business constructor
 public Entry__id(
     Entry entry
     ,IEnumerable<Entry__id> prior
     ,string value
     )
 {
     InitializeResults();
     _entry = new PredecessorObj<Entry>(this, GetRoleEntry(), entry);
     _prior = new PredecessorList<Entry__id>(this, GetRolePrior(), prior);
     _value = value;
 }
예제 #2
0
            public CorrespondenceFact CreateFact(FactMemento memento)
            {
                Entry newFact = new Entry(memento);

                // Create a memory stream from the memento data.
                using (MemoryStream data = new MemoryStream(memento.Data))
                {
                    using (BinaryReader output = new BinaryReader(data))
                    {
                        newFact._entryDate = (DateTime)_fieldSerializerByType[typeof(DateTime)].ReadData(output);
                        newFact._entryDatePadding = (byte)_fieldSerializerByType[typeof(byte)].ReadData(output);
                        newFact._amount = (float)_fieldSerializerByType[typeof(float)].ReadData(output);
                        newFact._created = (DateTime)_fieldSerializerByType[typeof(DateTime)].ReadData(output);
                        newFact._createdPadding = (byte)_fieldSerializerByType[typeof(byte)].ReadData(output);
                    }
                }

                return newFact;
            }
예제 #3
0
 // Results
 // Business constructor
 public EntryVoid(
     Entry entry
     ,DateTime voided
     ,byte voidedPadding
     )
 {
     InitializeResults();
     _entry = new PredecessorObj<Entry>(this, GetRoleEntry(), entry);
     _voided = voided;
     _voidedPadding = voidedPadding;
 }
예제 #4
0
 public EntryViewModel(Entry entry, Book book)
 {
     _entry = entry;
     _book = book;
 }