protected void Page_Load(object sender, EventArgs e) { int idOrientador = (int)Session["id"]; if (!Page.IsPostBack) { try { DropDownList1.DataSource = objProceso.D_consultarProcesoPorOrientador(idOrientador); DropDownList1.DataTextField = "Nombre"; DropDownList1.DataValueField = "IdProceso"; DropDownList1.DataBind(); DropDownList2.DataSource = objPersona.D_consultarPersonaPorProcesoYOrientador(int.Parse(DropDownList1.SelectedValue), idOrientador); DropDownList2.DataTextField = "Nombre"; DropDownList2.DataValueField = "IdPersona"; DropDownList2.DataBind(); CrystalReportViewer1.ReportSource = null; CrystalReportViewer1.DataBind(); } catch { } } else { try { } catch { } } }
protected void Page_Load(object sender, EventArgs e) { int idOrientador = (int)Session["id"]; if (!Page.IsPostBack) { System.Web.Security.MembershipUser logUser = System.Web.Security.Membership.GetUser(User.Identity.Name); CapaNegocio.clsOrientador usuario = new CapaNegocio.clsOrientador(); CapaDatos.clsDOrientador objDatosPerfil = new CapaDatos.clsDOrientador(); usuario = objDatosPerfil.D_consultarOrientador(logUser.UserName.ToString()); Session["id"] = usuario.IDOrientador1; try { DropDownList1.DataSource = objProceso.D_consultarProcesoPorOrientador(idOrientador); DropDownList1.DataTextField = "Nombre"; DropDownList1.DataValueField = "IdProceso"; DropDownList1.DataBind(); DropDownList2.DataSource = objPersona.D_consultarPersonaPorProcesoYOrientador(int.Parse(DropDownList1.SelectedValue), idOrientador); DropDownList2.DataTextField = "Nombre"; DropDownList2.DataValueField = "IdPersona"; DropDownList2.DataBind(); } catch { } } }