Esempio n. 1
0
        //ALTERA UM CLIENTE A PARTIR DO NOME
        public static void AlterClient(List <Cadastro> list, string n)
        {
            var client = list.SingleOrDefault(x => x.name.Equals(n));

            if (client != null)
            {
                Console.WriteLine("\nALTERANDO DADOS DO USUARIO " + client.name);
                client.name   = Cadastro.PicName();
                client.email  = Cadastro.PicEmail();
                client.number = Cadastro.PicNumber();
            }
            else
            {
                Console.WriteLine("\nCliente nao encontrado");
            }
        }
Esempio n. 2
0
 //ADICIONA UM NOVO CLIENTE A LISTA
 public static void AddClient(List <Cadastro> list)
 {
     list.Add(new Cadastro(Cadastro.PicName(), Cadastro.PicEmail(), Cadastro.PicNumber()));
     Console.WriteLine("\nCADASTRO CONCLUIDO");
 }