protected void btnGuardar_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(this.txtNro.Text)) { string str = this.txtNro.Text.ToString(); DataTable table = Consulta.ValidaDocRendicion(str); if ((table.Rows.Count > 0) && (table != null)) { Transaccion.UpdateDocRendicion(str, null, null, this.cbxBanco.SelectedValue.ToString(), this.txtNroCheque.Text.ToString(), this.txtNroSerie.Text.ToString(), this.txtFechacheque.Text.ToString(), this.txtNroCtaCte.Text.ToString(), this.Session["Usuario"].ToString()); this.Page.RegisterClientScriptBlock("Mensaje", "<script>alert('Datos actualizados correctamente');</script>"); } else { Transaccion.InsertaDocRendicion(str, null, null, this.cbxBanco.SelectedValue.ToString(), this.txtNroCheque.Text.ToString(), this.txtNroSerie.Text.ToString(), this.txtFechacheque.Text.ToString(), this.txtNroCtaCte.Text.ToString(), this.Session["Usuario"].ToString()); this.Page.RegisterClientScriptBlock("Mensaje", "<script>alert('Datos ingresados correctamente');</script>"); } } else { this.Page.RegisterClientScriptBlock("Mensaje", "<script>alert('Debe ingresar N\x00b0 de rendici\x00f3n');</script>"); } }