Exemplo n.º 1
0
        private void AddPhoneClient_Load(object sender, EventArgs e)
        {
            comboPessoa.DisplayMember = "Text";
            comboPessoa.ValueMember   = "Value";
            List <Client> listClients = clients.getAllClients();

            listClients.ForEach(client => comboPessoa.Items.Add(new { Text = client.name, Value = client.idClient }));
        }
Exemplo n.º 2
0
        public AddAddressClient()
        {
            InitializeComponent();
            comboPessoa.DisplayMember = "Text";
            comboPessoa.ValueMember   = "Value";
            List <Client> listClients = clients.getAllClients();

            listClients.ForEach(client => comboPessoa.Items.Add(new { Text = client.name, Value = client.idClient }));
        }
Exemplo n.º 3
0
        private void CreateListClient()
        {
            clients = new ClassClient();
            listClients.Items.Clear();
            listClients.View          = View.Details;
            listClients.GridLines     = true;
            listClients.FullRowSelect = true;
            string[] columns = new string[listClients.Columns.Count];

            List <Client> listClient = clients.getAllClients();

            //Adiciona as informações a listClient
            ListViewItem item;

            listClient.ForEach(header => {
                columns[0] = header.idClient.ToString();
                columns[1] = header.name;
                columns[2] = header.surname;
                columns[3] = header.cpf;
                columns[4] = header.email;
                item       = new ListViewItem(columns);
                listClients.Items.Add(item);
            });
        }