protected void TxtPartida_TextChanged(object sender, EventArgs e) { if (this.TxtPartida.Text != "") { try { SqlDataEgreso.SelectCommand = "SELECT * FROM [tb_Egreso_Manual_los_negritos] where Id_partida like '%" + this.TxtPartida.Text + "%'"; SqlDataEgreso.DataBind(); } catch (Exception) { ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true); } } else { try { SqlDataEgreso.SelectCommand = " SELECT * FROM [tb_Egreso_Manual_los_negritos]"; SqlDataEgreso.DataBind(); } catch (Exception) { ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true); } } }
protected void Dptestado_SelectedIndexChanged(object sender, EventArgs e) { if (this.Dptestado.SelectedValue != "Seleccionar") { try { SqlDataEgreso.SelectCommand = "SELECT * FROM [tb_Egreso_Manual_los_negritos] where Estado_pago like '%" + this.Dptestado.SelectedValue + "%'"; SqlDataEgreso.DataBind(); } catch (Exception) { ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true); } } else { try { SqlDataEgreso.SelectCommand = " SELECT * FROM [tb_Egreso_Manual_los_negritos]"; SqlDataEgreso.DataBind(); } catch (Exception) { ScriptManager.RegisterStartupScript(this, typeof(Page), "mensajeError", "mensajeError('" + "" + "');", true); } } }