Exemple #1
0
        public static void Edit()
        {
            Console.Write("\nНазва басейну: ");

            string name = Console.ReadLine();

            bool[] write = new bool[Program.all.Length];

            for (int i = 0; i < Program.all.Length; ++i)
            {
                if (Program.all[i] != null)
                {
                    if (Program.all[i].Name == name)
                    {
                        Console.WriteLine("\nВведiть нову iнформацiю: ");

                        string str = Console.ReadLine();

                        string[] elements = str.Split(" ", StringSplitOptions.RemoveEmptyEntries);

                        Program.all[i] = new Workday(elements[i], elements[i + 1], DateTime.Parse(elements[i + 2]), int.Parse(elements[i + 3]), int.Parse(elements[i + 4]));
                    }
                }
            }
            PutKey.Key();
        }
Exemple #2
0
        public static void Add()
        {
            Console.WriteLine("\nВведiть данi:");

            string str = Console.ReadLine();

            string[] elements = str.Split(" ", StringSplitOptions.RemoveEmptyEntries);

            PutKey.P(elements, true);

            PutKey.Key();
        }
Exemple #3
0
        public static void Write(Workday[] s)
        {
            Console.WriteLine("{0,-15} {1, -15}\t {2, -20} {3, -20} {4,-30} ", "Назва", "Адреса", "Дата", "Кiлькiсть вiдвiдувачiв", "Кiлькiсть доступних дорiжок");

            for (int i = 0; i < s.Length; ++i)
            {
                if (s[i] != null)
                {
                    Console.WriteLine("{0,-15} {1, -10}\t {2, -20} {3, -20} \t\t{4,-30} ", Program.all[i].Name, Program.all[i].Address, Program.all[i].Data, Program.all[i].Visitors, Program.all[i].Number);
                }
            }
            PutKey.Key();
        }
Exemple #4
0
        public static void Remove()
        {
            Console.Write("\nНазвiть басейн, який хочете видалити : ");

            string name = Console.ReadLine();

            bool[] write = new bool[Program.all.Length];

            for (int i = 0; i < Program.all.Length; ++i)
            {
                if (Program.all[i].Name != null)
                {
                    if (Program.all[i].Name == name)
                    {
                        Console.WriteLine("{0,-15} {1, -15} {2, -15} {3, -20} {4,-20} ", Program.all[i].Name, Program.all[i].Address, Program.all[i].Data, Program.all[i].Visitors, Program.all[i].Number);

                        Program.delete[i] = true;
                    }
                }
            }
            PutKey.Key();
        }
Exemple #5
0
 static void Main(string[] args)
 {
     PutKey.Key();
 }