///////////////////////////////////////////////////////////////////////////// public TransactionOccurs(JulianDay lStartDate, JulianDay lEndDate, List<Transaction> transactions) : this() { // Load the transaction data for (int i = 0; i < transactions.Count; i++) AddTransaction(transactions[i]); }
///////////////////////////////////////////////////////////////////////////// public bool Open(string filename) { Close(); if (m_Document != null) return false; bool fakeUserData = (filename == null); if (fakeUserData) { List<Account> accounts = WebResources.Accounts; if (accounts == null) return false; m_Document = new Document(this); // Load the account table for (int i = 0; i < accounts.Count; i++) m_Document.AddAccount(accounts[i]); } else m_Document = Document.Open(filename); m_Document.DocHolder = this; JulianDay lStartDate = new JulianDay(1, 1, 1955); JulianDay lEndDate = new JulianDay(12, 31, 1955 + 120); JulianDay lDate = DateTime.Today.ToJulian(); Run(lStartDate, lEndDate, lDate); SendChangeEvent(); return true; }
///////////////////////////////////////////////////////////////////////////// public void Run(JulianDay lStartDate, JulianDay lEndDate, JulianDay lDate) { if (m_Document == null) return; m_Document.Run(lStartDate, lEndDate); m_Document.CurrentDate = lDate; }
///////////////////////////////////////////////////////////////////////////// public void Run(JulianDay lStartDate, JulianDay lEndDate) { }
///////////////////////////////////////////////////////////////////////////// public Document(DocumentHolder documentHolder) { m_DocumentHolder = documentHolder; m_DocType = DOCTYPE_FF; m_DocVersion = DOC_VERSION; m_strFullDocPath = null; m_Accounts = new List<Account>(); m_TransactionLogAccounts = new List<Account>(); m_TransactionEvents = new List<TransactionOccurs>(); m_lStartDate = DateTime.Today.ToJulian(); m_lEndDate = DateTime.Today.ToJulian(); m_bModified = false; m_lCurrentDate = 0; }
///////////////////////////////////////////////////////////////////////////// public bool Run(Document document, JulianDay lDate, JulianDay lParentStartDate, JulianDay lParentEndDate) { return false; }
///////////////////////////////////////////////////////////////////////////// public Transaction(string _sName, ETransactionType _eType, double _fValue, EAccountType _eAccountType, EAccountType _eAccountType2, JulianDay lStartDateLimit, JulianDay lEndDateLimit) { m_sName = _sName; m_lValue = (tMillicents)(_fValue * 1000.0); m_eType = _eType; }
///////////////////////////////////////////////////////////////////////////// public bool Run(Document document, JulianDay lDate) { return false; }
///////////////////////////////////////////////////////////////////////////// public TransactionOccurs(JulianDay lStartDate, JulianDay lEndDate, Transaction transaction) : this(lStartDate, lEndDate, new Transaction[] { transaction }) { }
///////////////////////////////////////////////////////////////////////////// public TransactionOccurs(JulianDay lStartDate, JulianDay lEndDate, Transaction[] transactions) : this(lStartDate, lEndDate, new List<Transaction>(transactions)) { }