using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using QuintoCaminoV2.Data_objects;

namespace QuintoCaminoV2.Users
{
    public partial class User : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            getCursosUsuario();
        }
        public void getCursosUsuario()
        {
            DataLayer oDataLayer = new DataLayer();
            Usuarios oUsu = new Usuarios();
            oUsu.intUsuarioId = Convert.ToInt32(Session["idUsuario"]);
            DataCursos.DataSource = oDataLayer.get_Cursos_by_User(oUsu);
            DataCursos.DataBind();

        }

        protected void LinkButton2_Click(object sender, EventArgs e)
        {
            string oValor;
            LinkButton obj = (LinkButton)sender;
            oValor = obj.CommandArgument;

            Response.Redirect("ClasesUser.aspx?iCursoId=" + oValor);
        }
    }
}