Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["logeado"] == null)//si existe estara logeado
            {
                //Response.Redirect("Login.aspx");
                Response.Redirect(GetRouteUrl("LoginRoute", null));
            }
            else
            {
                if (IsPostBack)
                {
                    System.Diagnostics.Debug.WriteLine("is postback");
                }
                else
                {
                    System.Diagnostics.Debug.WriteLine("no postback");
                    profecional = new Profecional();
                    profecional.id_Profecional = Convert.ToInt32(Session["id_Profecional"].ToString());
                    ProfecionalLN ln = new ProfecionalLN();
                    profecional = ln.ProfecionalID(profecional);

                    cargarDatos();
                }


                //if (profecional == null)
                //{
                //    profecional = new Profecional();
                //    profecional.id_Profecional = Convert.ToInt32(Session["id_Profecional"].ToString());
                //    ProfecionalLN ln = new ProfecionalLN();
                //    profecional = ln.ProfecionalID(profecional);

                //    cargarDatos();
                //}
                //else
                //{
                //    cargarDatos();
                //}
            }
        }