Exemple #1
0
 public void AddCredit(DateTime entryDate, string id, string description, Account debit, float amount)
 {
     Entry entry = Community.AddFact(new Entry(this, debit.GetBook(Year.CalendarYear), entryDate, 0, amount, DateTime.Now, 0));
     if (!String.IsNullOrEmpty(id))
         entry.Id = id;
     if (!String.IsNullOrEmpty(description))
         entry.Description = description;
 }
 public AccountHeaderViewModel(Account account)
 {
     _account = account;
 }
 // Business constructor
 public Book(
     Account account
     ,Year year
     )
 {
     InitializeResults();
     _account = new PredecessorObj<Account>(this, GetRoleAccount(), account);
     _year = new PredecessorObj<Year>(this, GetRoleYear(), year);
 }
 // Results
 // Business constructor
 public Account__name(
     Account account
     ,IEnumerable<Account__name> prior
     ,string value
     )
 {
     InitializeResults();
     _account = new PredecessorObj<Account>(this, GetRoleAccount(), account);
     _prior = new PredecessorList<Account__name>(this, GetRolePrior(), prior);
     _value = value;
 }
 // Fields
 // Results
 // Business constructor
 public AccountDelete(
     Account account
     )
 {
     InitializeResults();
     _account = new PredecessorObj<Account>(this, GetRoleAccount(), account);
 }
            public CorrespondenceFact CreateFact(FactMemento memento)
            {
                Account newFact = new Account(memento);

                // Create a memory stream from the memento data.
                using (MemoryStream data = new MemoryStream(memento.Data))
                {
                    using (BinaryReader output = new BinaryReader(data))
                    {
                        newFact._unique = (Guid)_fieldSerializerByType[typeof(Guid)].ReadData(output);
                        newFact._type = (int)_fieldSerializerByType[typeof(int)].ReadData(output);
                    }
                }

                return newFact;
            }