コード例 #1
0
        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;
        }
コード例 #2
0
        public void GetAllInformersTest()
        {
            List <Informer> list = InformerWrapper.GetAllInformers();

            Assert.AreEqual(3, list.Count);
            Assert.AreEqual("Elias A. Kristoffersen", list[0].Name);
        }
コード例 #3
0
        private void btnGetAllInformers_Click(object sender, RoutedEventArgs e)
        {
            var list = InformerWrapper.GetAllInformers();

            if (list.Count != 0)
            {
                lstInformers.ItemsSource = list;
            }
        }
コード例 #4
0
        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);
        }