public static void cadastrarEntregador() { Console.Clear(); Console.WriteLine("CADASTRO DE ENTREGADOR"); Console.WriteLine(""); Console.WriteLine("Digite os dados do entregador"); Console.WriteLine(""); Console.Write("Nome: "); string nome = Console.ReadLine(); Console.Write("CPF: "); long cpf = long.Parse(Console.ReadLine()); Console.Write("RG: "); int rg = int.Parse(Console.ReadLine()); Console.Write("Celular: "); int celular = int.Parse(Console.ReadLine()); Entregador E = new Entregador(nome, cpf, rg, celular); Program.entregadores.Add(E); Console.WriteLine(""); Console.WriteLine("Entregador cadastrado com sucesso!"); Console.WriteLine(""); Console.Write("Pressione qualquer tecla para voltar ao menu..."); Console.ReadKey(); }
public Pedido(int id, int dia, int mes, int ano, Cliente cliente, Entregador entregador, char status, bool troco, double trocoPara) { this.id = id; data = new DateTime(ano, mes, dia); this.cliente = cliente; this.entregador = entregador; this.status = status; itens = new List <ItemPedido>(); this.troco = troco; this.trocoPara = trocoPara; }