Ejemplo n.º 1
0
        public string getSeassionValue(string userID, string seassionName, string probertyName)
        {
            string probertyValue = null;

            var sessionHolder = HttpContext.Current.Session[seassionName];

            if (sessionHolder == null)
            {
                SeassionStateBL sessionStateBL = new SeassionStateBL();
                IEnumerable <SessionValuesViewModel> sessionValuesList = sessionStateBL.getSessionValueList(seassionName, userID);
                if (sessionValuesList != null)
                {
                    foreach (var item in sessionValuesList)
                    {
                        if (item.propertyName == probertyName)
                        {
                            probertyValue = item.sessionValue;
                            break;
                        }
                    }
                    HttpContext.Current.Session[seassionName] = probertyValue;
                }
            }
            else
            {
                probertyValue = sessionHolder.ToString();
            }

            return(probertyValue);
        }
Ejemplo n.º 2
0
        public void setSeassionValue(string userID, string seassionName, string probertyName, string probertyValue)
        {
            SeassionStateBL sessionStateBL = new SeassionStateBL();

            sessionStateBL.setSessionProbertyValue(seassionName, userID, probertyName, probertyValue);
            HttpContext.Current.Session[seassionName] = probertyValue;
        }