Пример #1
0
    protected void btnBuscar_Click(object sender, EventArgs e)
    {
        try
        {
            string apellido = txtApellido.Text;

            DateTime?FechaDesde;
            if (!string.IsNullOrEmpty(txtFechaDesde.Text))
            {
                FechaDesde = DateTime.Parse(txtFechaDesde.Text);
            }
            else
            {
                FechaDesde = null;
            }
            DateTime?FechaHasta;
            if (!string.IsNullOrEmpty(txtFechaHasta.Text))
            {
                FechaHasta = DateTime.Parse(txtFechaHasta.Text);
            }
            else
            {
                FechaHasta = null;
            }



            int tratamiento = cboTratamiento.SelectedIndex;

            gdvIntervenciones.DataSource   = IntervencionQueryDao.ListaInforme(apellido, FechaDesde, FechaHasta, tratamiento);
            gdvIntervenciones.DataKeyNames = new string[] { "IdPaciente" };
            gdvIntervenciones.DataBind();
        }
        catch (Exception ex)
        {
            divResultado.Visible = true;
            txtResultado.Text    = "Error = " + ex.Message;
        }
    }
Пример #2
0
 protected void CargarGrillaIntervenciones(int id)
 {
     gdvIntervenciones.DataSource   = IntervencionQueryDao.ListaInteevencionesFactura(id);
     gdvIntervenciones.DataKeyNames = new string[] { "codIntervencion" };
     gdvIntervenciones.DataBind();
 }