Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            lblEspe.Text = ClsEspecialista.CountEspecialistas().ToString();
            if (int.Parse(Session["idRol"].ToString()) == 1)
            {
                lblCita.Text = ClsCita.CountCita().ToString();
                lblEnte.Text = ClsEnteSalud.CountEste().ToString();
            }
            if (int.Parse(Session["idRol"].ToString()) == 2)
            {
                lblEnte.Text = ClsEnteSalud.CountEsteAsociado(int.Parse(Session["idPersona"].ToString())).ToString();
            }
            if (int.Parse(Session["idRol"].ToString()) == 3)
            {
                lblCita.Text = ClsCita.CountCitaSinCal(int.Parse(Session["idPersona"].ToString())).ToString();
            }



            if (!IsPostBack)
            {
                ClsEnteSalud enteSalud = new ClsEnteSalud();
                if (int.Parse(Session["idRol"].ToString()) == 1)
                {
                    gdgGrid.DataSource = enteSalud.ConsultarEnte();
                    gdgGrid.DataBind();
                    if (gdgGrid.Rows.Count != 0)
                    {
                        gdgGrid.HeaderRow.TableSection = TableRowSection.TableHeader; // Agrega etiqueta: <thead> a la tabla
                    }
                }
                else if (int.Parse(Session["idRol"].ToString()) == 2)
                {
                    gdvEnte.DataSource = enteSalud.ConsultarEnteAsociado(int.Parse(Session["idPersona"].ToString()));
                    gdvEnte.DataBind();
                    if (gdvEnte.Rows.Count != 0)
                    {
                        gdvEnte.HeaderRow.TableSection = TableRowSection.TableHeader;
                    }
                }
                else
                {
                    ClsCita cita = new ClsCita();
                    gdvCita.DataSource = cita.AllFindConsulCita(int.Parse(Session["idPersona"].ToString()));
                    gdvCita.DataBind();
                    if (gdvCita.Rows.Count != 0)
                    {
                        gdvCita.HeaderRow.TableSection = TableRowSection.TableHeader;
                    }
                }
            }
        }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     lblEspe.Text = ClsEspecialista.CountEspecialistas().ToString();
     lblCita.Text = ClsCita.CountCita().ToString();
     lblEnte.Text = ClsEnteSalud.CountEste().ToString();
     if (!IsPostBack)
     {
         ClsEnteSalud enteSalud = new ClsEnteSalud();
         gdgGrid.DataSource = enteSalud.ConsultarEnte();
         gdgGrid.DataBind();
         //gdgGrid.HeaderRow.TableSection = TableRowSection.TableHeader; // Agrega etiqueta: <thead> a la tabla
     }
 }