public void LoadJournalExampleData() { //LedgerAccountList.AddBuchungssatz(new AccountingRecord {Account = account, Text = "Test1Haben", Value = 11}, // new AccountingRecord {Account = account, Text = "Test1Soll", Value = 101}); //LedgerAccountList.AddBuchungssatz(new AccountingRecord {Account = account, Text = "Test2Haben", Value = 22}, // new AccountingRecord {Account = account, Text = "Test2Soll", Value = 202}); //LedgerAccountList.AddBuchungssatz(new AccountingRecord {Account = account, Text = "Test3Haben", Value = 33}, // new AccountingRecord {Account = account, Text = "Test3Soll", Value = 303}); JournalList.Add(new Journal { Text = "Verkauf einer alten Maschine gegen Barzahlung für 1'500Fr." }); JournalList.Add(new Journal { Text = "Immobilienkauf durch eine Hypothek von 1'000'000Fr." }); }
public void LoadJournalExampleData() { foreach (Account account in accounts.ItemsSource) { JournalList.Add(new Journal() { Account = account, HABENAccountingRecords = new ObservableCollection <AccountingRecord> { new AccountingRecord() { Account = account, Text = "Test1Haben", Value = 11 }, new AccountingRecord() { Account = account, Text = "Test2Haben", Value = 22 }, new AccountingRecord() { Account = account, Text = "Test2Haben", Value = 33 }, }, SOLLAccountingRecords = new ObservableCollection <AccountingRecord> { new AccountingRecord() { Account = account, Text = "Test1Soll", Value = 101 }, new AccountingRecord() { Account = account, Text = "Test2Soll", Value = 202 }, new AccountingRecord() { Account = account, Text = "Test2Soll", Value = 303 }, } }); } }
internal static JournalList getJournalList(HttpResponseMessage responce) { var journalList = new JournalList(); var jsonObj = JsonConvert.DeserializeObject <Dictionary <string, object> >(responce.Content.ReadAsStringAsync().Result); if (jsonObj.ContainsKey("journals")) { var journalsArray = JsonConvert.DeserializeObject <List <object> >(jsonObj["journals"].ToString()); foreach (var journalObj in journalsArray) { var journal = new Journal(); journal = JsonConvert.DeserializeObject <Journal>(journalObj.ToString()); journalList.Add(journal); } } if (jsonObj.ContainsKey("page_context")) { var pageContext = new PageContext(); pageContext = JsonConvert.DeserializeObject <PageContext>(jsonObj["page_context"].ToString()); journalList.page_context = pageContext; } return(journalList); }
private void Button_Click(object sender, RoutedEventArgs e) { JournalList.Add(new Journal()); }