Ejemplo n.º 1
0
 static void ListanjeImena()
 {
     Console.Clear();
     string[] listOfNames = FileManagement.Read();
     string[] razbijenaOsoba;
     Console.WriteLine("Ime\tPrezime\tTelefon\tAdresa");
     Console.WriteLine("--------------------------------------------------");
     foreach (string osoba in listOfNames)
     {
         razbijenaOsoba = osoba.Split(';');
         Console.WriteLine("{0}\t{1}\t{2}\t{3}", razbijenaOsoba[0], razbijenaOsoba[1], razbijenaOsoba[3], razbijenaOsoba[2]);
     }
     Console.ReadKey();
 }
Ejemplo n.º 2
0
        static void SearchForName()
        {
            string Search = Utils.GetUserInput("Unesite termin za pretragu (najmanje 3 slova)");

            if ((Search == "") || (Search.Length < 3))
            {
                return;
            }

            List <string> SearchResults = new List <string>();
            List <string> ListOfNames   = FileManagement.Read();

            foreach (string Entry in ListOfNames)
            {
                if (Entry.ToUpper().Contains(Search.ToUpper()))
                {
                    SearchResults.Add(Entry);
                }
            }

            DisplayNames(SearchResults);
        }
Ejemplo n.º 3
0
 static void ListNames()
 {
     Console.Clear();
     DisplayNames(FileManagement.Read());
 }