protected void AgregarPagoButton_Click(object sender, EventArgs e) { if (MontoPagarTextBox.Text.ToDecimal() <= 0) return; if (!SumarTotalPagos()) return; Pagos Pago = ViewState[KeyViewState].ToPago(); Pago.AgregarDetalle(0, Pago.PagosID, AnalisisDropdownList.SelectedValue.ToInt(), MontoPagarTextBox.Text.ToDecimal()); ViewState[KeyViewState] = Pago; this.BindGrid(); MontoPagarTextBox.Text = string.Empty; }