Ejemplo n.º 1
0
        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();
                }
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SSOHelper.Authenticate();

            if (SSOHelper.CurrentIdentity == null)
            {
                SSOHelper.RedirectToSSOPage("Login.aspx", Request.Url.ToString());
            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                return;
            }
            SSOHelper.Authenticate();

            if (SSOHelper.CurrentIdentity == null)
            {
                SSOHelper.RedirectToSSOPage("Login.aspx", Request.Url.ToString());
            }
            cargarCombos();
            cargarListaFichas();
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SSOHelper.Authenticate();

            if (SSOHelper.CurrentIdentity == null)
            {
                SSOHelper.RedirectToSSOPage("Login.aspx", Request.Url.ToString());
            }
            SysEfector efector = null;

            efector = new SysEfector(SSOHelper.CurrentIdentity.IdEfector);

            //lblUsr.Text = string.Format("{0}, {1}", SSOHelper.CurrentIdentity.Surname, SSOHelper.CurrentIdentity.FirstName);
            lblUsr.Text     = string.Format(" {0}", SSOHelper.CurrentIdentity.Surname + " " + SSOHelper.CurrentIdentity.FirstName);
            lblEfector.Text = string.Format("{0}", efector.Nombre);
            //lblEfector.Text = string.Format("{0}", SSOHelper.GetNombreEfectorRol(SSOHelper.CurrentIdentity.IdEfectorRol));
            Session["SessionEfector"] = lblEfector.Text;


            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();
             */
        }