public Plan1Data(string currencyName = "Money", float totalAmount = 0.0f) { this.currencyName = currencyName; currencyAmount = totalAmount; necesarryAccount = new Plan1Account(0, 0); shoppingsAccount = new Plan1Account(0, 0); circulationAccount = new Plan1Account(0, 0); incomeAccount = new Plan1Account(0, 0); }
public XmlAccount XmlAccountFromPlan1Account(Plan1Account account) { XmlAccount xAccount = new XmlAccount(); xAccount.accountMoney = account.AccountMoney; xAccount.accountPercent = account.AccountPercent; foreach (Transaction tr in account.Transactions) { XmlTransaction tmpTrans = new XmlTransaction(); tmpTrans.amount = tr.Amount; tmpTrans.description = tr.Description; tmpTrans.transactionType = tr.TransactionType; tmpTrans.dateTime = Transaction.DateTimeSecondsFromEpochFor(tr.DateTime); tmpTrans.id = tr.ID; xAccount.transactions.Add(tmpTrans); } return(xAccount); }