private void MapearDtgFiltroTotalAsc(DataGridView dtg) { dtg.Rows.Clear(); facturaService = new FacturaService(ConfigConnection.ConnectionString); foreach (var item in facturaService.FiltroTotalAsc()) { int n = dtg.Rows.Add(); dtg.Rows[n].Cells[0].Value = item.Numero; dtg.Rows[n].Cells[1].Value = item.Lugar.Ciudad; dtg.Rows[n].Cells[2].Value = item.Cantidad; dtg.Rows[n].Cells[3].Value = item.Iva; dtg.Rows[n].Cells[4].Value = item.SubTotal; dtg.Rows[n].Cells[5].Value = item.Total; dtg.Rows[n].Cells[6].Value = item.Cliente.Cedula; dtg.Rows[n].Cells[7].Value = item.Cliente.PrimerNombre; dtg.Rows[n].Cells[8].Value = item.Cliente.Telefono; dtg.Rows[n].Cells[9].Value = item.Fecha; dtg.Rows[n].Cells[10].Value = item.Estado; } TxtTotal.Text = facturaService.FiltroTotalAsc().Count.ToString(); }