示例#1
0
        public ActionResult ListaWnioskow(string data1, string data2)
        {
            using (DbServiceClient client = new DbServiceClient())
            {
                IEnumerable <wniosekWithDecyzja> wwdList = client.GetWnioskiBetweenDates(data1, data2);

                return(View(wwdList));
            }
        }
示例#2
0
        public void TestDetailsViewData()
        {
            IEnumerable <wniosekWithDecyzja> wwdList;
            var controller = new HomeController();
            var result     = controller.ListaWnioskow("2011-09-09", "2012-09-09") as ViewResult;
            var list       = (IEnumerable <wniosekWithDecyzja>)result.ViewData.Model;

            using (DbServiceClient client = new DbServiceClient())
            {
                wwdList = client.GetWnioskiBetweenDates("2011-09-09", "2012-09-09");
            }
            Assert.AreEqual(wwdList.Count(), list.Count());
        }