Exemplo n.º 1
0
        static void Main(string[] args)
        {
            //Есть пациенты
            PacientServise ps = new PacientServise();

            //Есть мед организации
            MedOrgService ms = new MedOrgService();


            ServiceZakreplenie sz      = new ServiceZakreplenie();
            string             message = "";

            sz.Zakreplenie(ref ms, ref ps, out message);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            PacientServise ps = new PacientServise();

            MedOrgService ms = new MedOrgService();


            ServiceZakreplenie sz      = new ServiceZakreplenie();
            string             message = "";

            sz.Zakreplenie(ref ms, ref ps, out message);

            ms.Save();
            ps.Save();
        }
Exemplo n.º 3
0
        public void Menu2()
        {
            string mesage = "";
            int    choiceee;
            bool   ab = true;

            Console.Clear();
            ServiceZakreplenie sz = new ServiceZakreplenie();

            foreach (var item in tempList)
            {
                if (log == "Root")
                {
                    while (ab)
                    {
                        Console.WriteLine("----------------MENU 2-----------------");
                        Console.WriteLine("For show all med organizations press 1");
                        Console.WriteLine("   For show all patients press 2");
                        Console.WriteLine("  For search med organizations press 3");
                        Console.WriteLine("     For fix the patients press 4");
                        Console.WriteLine("          For exit press 0");
                        int.TryParse(Console.ReadLine(), out choiceee);
                        switch (choiceee)
                        {
                        case 1: Console.Clear(); MedOrgService.Instance.PokazVsehOrg(); MedOrgService.Instance.Save(); PacientServise.Instance.Save(); break;

                        //case 1: Console.Clear(); MedOrgService.Instance.Load(); break;
                        //case 2: Console.Clear(); PacientServise.Instance.PokazVsehPacientov(); break;
                        case 2: Console.Clear(); PacientServise.Instance.Load(); MedOrgService.Instance.Save(); PacientServise.Instance.Save(); break;

                        case 3:
                            Console.Clear();
                            Console.WriteLine("For serch enter Name and address:");
                            Console.Write("Enter name:  "); string    n = Console.ReadLine();
                            Console.Write("Enter address:  "); string a = Console.ReadLine();
                            MedOrgService.Instance.SearchOrg(n, a);
                            MedOrgService.Instance.Save(); PacientServise.Instance.Save();
                            break;

                        case 4: Console.Clear(); sz.Zakreplenie(out mesage);
                            MedOrgService.Instance.Save(); PacientServise.Instance.Save(); break;

                        case 0:
                            MedOrgService.Instance.Save(); PacientServise.Instance.Save();
                            ab = false; break;     //goto theEnd2;
                        }
                    }
                }
                else
                {
                    while (true)
                    {
                        Console.WriteLine("----------------MENU 2-----------------");
                        Console.WriteLine("For show all med organizations press 1");
                        Console.WriteLine("   For show all patients press 2");
                        Console.WriteLine(" For search med organizations press 3");
                        Console.WriteLine("          For exit press 0");
                        int.TryParse(Console.ReadLine(), out choiceee);
                        switch (choiceee)
                        {
                        case 1: Console.Clear(); MedOrgService.Instance.PokazVsehOrg(); MedOrgService.Instance.Save(); PacientServise.Instance.Save(); break;

                        case 2: Console.Clear(); PacientServise.Instance.PokazVsehPacientov(); MedOrgService.Instance.Save(); PacientServise.Instance.Save(); break;

                        case 3:
                            Console.Clear();
                            Console.WriteLine("For serch enter Name and address:");
                            Console.Write("Enter name:  "); string    n = Console.ReadLine();
                            Console.Write("Enter address:  "); string a = Console.ReadLine();
                            MedOrgService.Instance.SearchOrg(n, a);
                            MedOrgService.Instance.Save(); PacientServise.Instance.Save();
                            break;

                        case 0:
                            MedOrgService.Instance.Save(); PacientServise.Instance.Save();
                            ab = false; break;     //goto theEnd2 ;
                        }
                    }
                }
            }
            // theEnd2:;
        }