public void ObtenerValores(Proyectos Pro) { Pro.Fecha = FechaTextBox.Text; Pro.Total = ConvertirTotal(); Pro.ClienteId = ConvertirId(); Pro.ProyectoId = ConvertirIdProyecto(); foreach (GridViewRow row in DetalleGridView.Rows) { Pro.AgregarTrabajos(1, Convert.ToInt32(row.Cells[0].Text), Convert.ToSingle(row.Cells[1].Text), Convert.ToSingle(row.Cells[2].Text), Convert.ToSingle(row.Cells[3].Text), Convert.ToSingle(row.Cells[4].Text)); } }