public ReportView(int id) { InitializeComponent(); var list = ReportWrapper.GetReports(id); if (list.Count != 0) { lstReports.ItemsSource = list; } var agentlist = AgentWrapper.GetAllAgents(); var informerlist = InformerWrapper.GetAllInformers(); foreach (var i in agentlist) { authorlist.Add(new Person(i.Id, "", "", i.Name)); } foreach (var i in informerlist) { authorlist.Add(new Person(i.Id, "", "", i.Name)); } cmbAuthor.ItemsSource = authorlist; observedlist = ObservedWrapper.GetAllObserved(); cmbObserved.ItemsSource = observedlist; }
public void GetAllInformersTest() { List <Informer> list = InformerWrapper.GetAllInformers(); Assert.AreEqual(3, list.Count); Assert.AreEqual("Elias A. Kristoffersen", list[0].Name); }
private void btnGetAllInformers_Click(object sender, RoutedEventArgs e) { var list = InformerWrapper.GetAllInformers(); if (list.Count != 0) { lstInformers.ItemsSource = list; } }
public void SaveInformerTest() { List <Informer> list = InformerWrapper.GetAllInformers(); Assert.AreEqual(3, list.Count); InformerWrapper.SaveInformer(new Informer("DKK", "Cash", "", -1, "000000-0000", "TST", "TEST")); list = InformerWrapper.GetAllInformers(); Assert.AreEqual(4, list.Count); }