Пример #1
0
        private static void StudyTabulators()
        {
            Console.WriteLine(" --- StudyTabulators ---");

            DateSet dataSet = new DateSet();

            dataSet.CreateObjectss();

            var dicasetepe = dataSet.DicaseTypes.OrderBy(e => e.Nazva);

            Console.WriteLine("dicasetepe:\n"
                              + dicasetepe.ToLineList("dicasetepe\""));

            DicaseTypeTabulator dicasetypeTabulator
                = new DicaseTypeTabulator();

            Console.WriteLine("DicaseTypeTabulator.CreateTable():\n"
                              + dicasetypeTabulator.CreateTable(dicasetepe));

            dicasetypeTabulator.UseId = false;
            Console.WriteLine("DicaseTypeTabulator.CreateTable():\n"
                              + dicasetypeTabulator.CreateTable(dicasetepe));
            var dicase = dataSet.Discases.OrderBy(e => e.Nazva);

            Console.WriteLine("dicase:\n"
                              + dicase.ToLineList("dicase\""));

            DiscaseTabulator dicaseTabulator
                = new DiscaseTabulator();

            Console.WriteLine("DiscaseTabulator.CreateTable():\n"
                              + dicaseTabulator.CreateTable(dicase));

            dicaseTabulator.UseId = false;
            Console.WriteLine("DiscaseTabulator.CreateTable():\n"
                              + dicasetypeTabulator.CreateTable(dicasetepe));

            var patcient = dataSet.Patcients.OrderBy(e => e.Sorname);

            Console.WriteLine("patcient:\n" + patcient.ToLineList("patcient"));

            PatcientTabulator patcientsTabulator = new PatcientTabulator();

            Console.WriteLine("countriesTabulator.CreateTable():\n"
                              + patcientsTabulator.CreateTable(patcient));

            patcientsTabulator.UseId = false;
            Console.WriteLine("patcientsTabulator.CreateTable():\n"
                              + patcientsTabulator.CreateTable(patcient));
            Console.ReadKey();
        }
Пример #2
0
        private void OutObjectsTable()
        {
            string tableString = dicasetypeTabulator
                                 .CreateTable(dataSet.DicaseTypes);

            Console.WriteLine(tableString);
        }
Пример #3
0
        public DicaseType SelectInstance(IEnumerable <DicaseType> collection)
        {
            string tableString = dicasetypeTabulator
                                 .CreateTable(collection);

            Console.WriteLine(tableString);
            if (dicasetypeTabulator.UseId)
            {
                int id = EnterId();
                return(collection.First(e => e.Id == id));
            }
            else
            {
                int index = EnterIndex();
                return(collection.ElementAt(index));
            }
        }