Esempio n. 1
0
        public void List()
        {
            MenuClass menuClass = new MenuClass();

            Console.Title = "Lista rekordów";
            Console.Clear();
            Console.ForegroundColor = ConsoleColor.Magenta;
            Console.WriteLine(Enum_Menu.Menu.Lista);
            Console.ForegroundColor = ConsoleColor.Green;
            Console.WriteLine(Environment.NewLine);
            Console.ForegroundColor = ConsoleColor.Blue;
            Console.WriteLine("ID\t||Data\t        ||Opis\t");
            Console.ForegroundColor = ConsoleColor.Green;
            IList <Dane> OrderList = DaneNowe.OrderBy(i => i.ID).ToList();

            foreach (var i in OrderList)
            {
                Console.WriteLine($"{i.ID}\t||{i.Data.ToShortDateString()}\t||{i.Opis}\t");
                //Console.WriteLine(string.Format("{0}\t||{1}\t||{2}\t", i.ID, i.Data, i.Opis));
            }
            Console.WriteLine(Environment.NewLine);

            Console.WriteLine("\nNacisnij dowolny klawisz aby powrócić..");

            Console.ReadKey();
            Console.Clear();

            menuClass.Select_Menu();
        }
Esempio n. 2
0
        static void Main()
        {
            DaneNowe = new List <Dane>();
            WriteJSON writeJSON = new WriteJSON();

            writeJSON.CheckFolder();
            MenuClass menuClass = new MenuClass();

            Console.ForegroundColor = ConsoleColor.Green;
            menuClass.Select_Menu();
        }
Esempio n. 3
0
        public void PreviewV()
        {
            Parse     parse     = new Parse();
            MenuClass menuClass = new MenuClass();
            Validate  validate  = new Validate();


            Console.Title = "Szczegóły rekordu";
            Console.Clear();
            Console.ForegroundColor = ConsoleColor.Magenta;
            Console.WriteLine(Enum_Menu.Menu.Podgląd);
            Console.ForegroundColor = ConsoleColor.Green;
            Console.Write("\nWprowadz ID: ");
            string ID = Console.ReadLine();

            if (!parse.ParseID(ID))
            {
                menuClass.Select_Menu();
            }

            Dane SearchResoult = validate.Search(ID_Parse);

            if (SearchResoult == null)
            {
                Console.Clear();
                Console.ForegroundColor = ConsoleColor.DarkYellow;
                Console.WriteLine("\nNie znaleziono Danych..{0}{0}", Environment.NewLine);
                Console.ForegroundColor = ConsoleColor.Green;
            }

            else
            {
                Console.Clear();
                Console.WriteLine("ID:" + SearchResoult.ID);
                Console.WriteLine("Data:" + SearchResoult.Data);
                Console.WriteLine("Opis:" + SearchResoult.Opis);
                Console.WriteLine(Environment.NewLine);


                Console.Write("\nNaciśnij dowolny klawisz aby powrócić..");
                Console.ReadKey();
                Console.Clear();
            }
            menuClass.Select_Menu();
        }