protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //string strIdHospital = SSOHelper.Configuration["idHospital"] as string; //if (strIdHospital != "0") // lnkStyleSheet.Href = "styleHospital.css"; //else // lnkStyleSheet.Href = "style.css"; SSOHelper.Authenticate(); if (SSOHelper.CurrentIdentity == null) { SSOHelper.RedirectToSSOPage("Login.aspx", Request.Url.ToString()); } else { lblUsr.Text = string.Format(" {0}", SSOHelper.CurrentIdentity.Surname + " " + SSOHelper.CurrentIdentity.FirstName); lblEfector.Text = string.Format("{0}", SSOHelper.GetNombreEfectorRol(SSOHelper.CurrentIdentity.IdEfectorRol)); if (string.IsNullOrEmpty(url)) { url = SSOHelper.Configuration["StartPage"] as string; } ////Armo el menú de la Aplicación seleccionada para el efector seleccionado List <SSOMenuItem> menu = SSOHelper.GetApplicationMenuByEfector(); lvMenuSSO.DataSource = menu[0].items; lvMenuSSO.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { lblUsr.Text = string.Format("{0}, {1}", SSOHelper.CurrentIdentity.Surname, SSOHelper.CurrentIdentity.FirstName); lblEfector.Text = string.Format("{0}", SSOHelper.GetNombreEfectorRol(SSOHelper.CurrentIdentity.IdEfectorRol)); string strsips = SSOHelper.Configuration["Publicacion_Sips"] as string; string strsso = SSOHelper.Configuration["Publicacion_SSO"] as string; ImgHomeSystem.PostBackUrl = "../" + strsips + "/default.aspx"; ImgChangePass.PostBackUrl = "/" + strsso + "/Options.aspx"; string url = HttpContext.Current.Request.QueryString["url"]; if (string.IsNullOrEmpty(url)) { url = SSOHelper.Configuration["StartPage"] as string; } //ImgExit.PostBackUrl = String.Format("/"+strsso+"/Logout.aspx"); ImgExit.PostBackUrl = "/" + strsso + "/Logout.aspx?relogin=1&url=" + url; ////Armo el menú de la Aplicación seleccionada para el efector seleccionado //List<SSOMenuItem> menu = SSOHelper.GetApplicationMenuByEfector(); //lvMenuSSO.DataSource = menu[0].items; //lvMenuSSO.DataBind(); } }
private void CargarArbol() { TreeNode nodo = new TreeNode(); TreeView1.Nodes.Clear(); nodo.Value = "0"; nodo.Text = string.Format("{0}", SSOHelper.GetNombreEfectorRol(SSOHelper.CurrentIdentity.IdEfectorRol));//oUser.IdEfector.Nombre; TreeView1.Nodes.Add(nodo); mostrarNodos(nodo); pnlPiso.Visible = false; pnlHabitacion.Visible = false; pnlCama.Visible = false; }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { string strIdHospital = SSOHelper.Configuration["idHospital"] as string; if (strIdHospital != "0") { lnkStyleSheet.Href = "styleHospital.css"; } else { lnkStyleSheet.Href = "style.css"; } string strsips = SSOHelper.Configuration["Publicacion_Sips"] as string; string strsso = SSOHelper.Configuration["Publicacion_SSO"] as string; lblUsr.Text = string.Format(" {0}", SSOHelper.CurrentIdentity.Surname + " " + SSOHelper.CurrentIdentity.FirstName); lblEfector.Text = string.Format("{0}", SSOHelper.GetNombreEfectorRol(SSOHelper.CurrentIdentity.IdEfectorRol)); //ImgHomeSip.PostBackUrl = "/Sips/Default.aspx"; ImgHomeSystem.PostBackUrl = "~/default.aspx"; ImgChangePass.PostBackUrl = "/" + strsso + "/Options.aspx"; //ImgChangePass.PostBackUrl = "/SSO/Options.aspx"; string url = HttpContext.Current.Request.QueryString["url"]; if (string.IsNullOrEmpty(url)) { url = SSOHelper.Configuration["StartPage"] as string; } //ImgExit.PostBackUrl = "/SSO/Logout.aspx?relogin=1&url=" + url + "/sips"; ImgExit.PostBackUrl = "/" + strsso + "/Logout.aspx?relogin=1&url=" + url; ////Armo el menú de la Aplicación seleccionada para el efector seleccionado List <SSOMenuItem> menu = SSOHelper.GetApplicationMenuByEfector(); lvMenuSSO.DataSource = menu[0].items; lvMenuSSO.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } SSOHelper.Authenticate(); if (SSOHelper.CurrentIdentity == null) { SSOHelper.RedirectToSSOPage("Login.aspx", Request.Url.ToString()); } else { lblUsr.Text = string.Format("{0}, {1}", SSOHelper.CurrentIdentity.Surname, SSOHelper.CurrentIdentity.FirstName); lblEfector.Text = string.Format("{0}", SSOHelper.GetNombreEfectorRol(SSOHelper.CurrentIdentity.IdEfectorRol)); //ImgHomeSip.PostBackUrl = "/Sips/Default.aspx"; ImgHomeSystem.PostBackUrl = "~/default.aspx"; ImgChangePass.PostBackUrl = "/SSO/Options.aspx"; string url = HttpContext.Current.Request.QueryString["url"]; if (string.IsNullOrEmpty(url)) { url = SSOHelper.Configuration["StartPage"] as string; } ImgExit.PostBackUrl = "/SSO/Logout.aspx?relogin=1&url=" + url + "/sips"; ////Armo el menú de la Aplicación seleccionada para el efector seleccionado List <SSOMenuItem> menu = SSOHelper.GetApplicationMenuByEfector(); lvMenuSSO.DataSource = menu[0].items; lvMenuSSO.DataBind(); } }