protected void btnConfirmar_Click(object sender, EventArgs e) { if (validar()) { DataTable dtPremios = ControladorGeneral.RecuperarTodosPremios(); for (int i = 0; i < dtPremios.Rows.Count; i++) { if (i == 0) { ControladorGeneral.InsertarActualizarPremio(1, dtPremios.Rows[i]["descripcion"].ToString(), int.Parse(txtTrago.Text)); } if (i == 1) { ControladorGeneral.InsertarActualizarPremio(2, dtPremios.Rows[i]["descripcion"].ToString(), int.Parse(txtDescuento.Text)); } if (i == 2) { ControladorGeneral.InsertarActualizarPremio(3, dtPremios.Rows[i]["descripcion"].ToString(), int.Parse(txtChampagne.Text)); } if (i == 3) { ControladorGeneral.InsertarActualizarPremio(4, dtPremios.Rows[i]["descripcion"].ToString(), int.Parse(txtSigueParticipando.Text)); } if (i == 4) { ControladorGeneral.InsertarActualizarPremio(5, dtPremios.Rows[i]["descripcion"].ToString(), int.Parse(txtEntrada.Text)); } if (i == 5) { ControladorGeneral.InsertarActualizarPremio(6, dtPremios.Rows[i]["descripcion"].ToString(), int.Parse(txt2x1.Text)); } } pcPremios.ShowOnPageLoad = false; LoadGridPremios(); } }