public SeleccionarClienteForm() { InitializeComponent(); this.ClientesListView.Columns.Insert(0, "Id", 10 * (int)ClientesListView.Font.SizeInPoints, HorizontalAlignment.Center); this.ClientesListView.Columns.Insert(1, "Nombre", 20 * (int)ClientesListView.Font.SizeInPoints, HorizontalAlignment.Center); this.ClientesListView.Columns.Insert(2, "Apellido", 20 * (int)ClientesListView.Font.SizeInPoints, HorizontalAlignment.Center); this.ClientesListView.Columns.Insert(3, "Documento", 10 * (int)ClientesListView.Font.SizeInPoints, HorizontalAlignment.Center); this.ClientesListView.Columns.Insert(4, "TipoDocumento", 5 * (int)ClientesListView.Font.SizeInPoints, HorizontalAlignment.Center); this.ClientesListView.Columns.Insert(5, "Mail", 30 * (int)ClientesListView.Font.SizeInPoints, HorizontalAlignment.Center); this.ClientesListView.Columns.Insert(6, "Telefono", 12 * (int)ClientesListView.Font.SizeInPoints, HorizontalAlignment.Center); this.ClientesListView.Columns.Insert(7, "Calle", 20 * (int)ClientesListView.Font.SizeInPoints, HorizontalAlignment.Center); this.ClientesListView.Columns.Insert(8, "Piso", 5 * (int)ClientesListView.Font.SizeInPoints, HorizontalAlignment.Center); this.ClientesListView.Columns.Insert(9, "Nacimiento", 10 * (int)ClientesListView.Font.SizeInPoints, HorizontalAlignment.Center); this.ClientesListView.Columns.Insert(10, "Puntos", 10 * (int)ClientesListView.Font.SizeInPoints, HorizontalAlignment.Center); ClientesDao dao = new ClientesDao(); clientes.AddRange(dao.getClientes()); actualizarLista(""); }
public ListadoClientesForm() { InitializeComponent(); this.ListaCliente.Columns.Insert(0, "Id", 10 * (int)ListaCliente.Font.SizeInPoints, HorizontalAlignment.Center); this.ListaCliente.Columns.Insert(1, "Nombre", 20 * (int)ListaCliente.Font.SizeInPoints, HorizontalAlignment.Center); this.ListaCliente.Columns.Insert(2, "Apellido", 20 * (int)ListaCliente.Font.SizeInPoints, HorizontalAlignment.Center); this.ListaCliente.Columns.Insert(3, "Documento", 10 * (int)ListaCliente.Font.SizeInPoints, HorizontalAlignment.Center); this.ListaCliente.Columns.Insert(4, "TipoDocumento", 5 * (int)ListaCliente.Font.SizeInPoints, HorizontalAlignment.Center); this.ListaCliente.Columns.Insert(5, "Mail", 30 * (int)ListaCliente.Font.SizeInPoints, HorizontalAlignment.Center); this.ListaCliente.Columns.Insert(6, "Telefono", 12 * (int)ListaCliente.Font.SizeInPoints, HorizontalAlignment.Center); this.ListaCliente.Columns.Insert(7, "Calle", 20 * (int)ListaCliente.Font.SizeInPoints, HorizontalAlignment.Center); this.ListaCliente.Columns.Insert(8, "Piso", 5 * (int)ListaCliente.Font.SizeInPoints, HorizontalAlignment.Center); this.ListaCliente.Columns.Insert(9, "Nacimiento", 10 * (int)ListaCliente.Font.SizeInPoints, HorizontalAlignment.Center); this.ListaCliente.Columns.Insert(10, "Puntos", 10 * (int)ListaCliente.Font.SizeInPoints, HorizontalAlignment.Center); ClientesDao clientesDao = new ClientesDao(); listaClientes = clientesDao.getClientes(); listaClientes.ForEach(elem => { ListaCliente.Items.Add(getItemFromClient(elem)); }); }