Ejemplo n.º 1
0
        public ActionResult GetTabId(string oldTabId)
        {
            string newTabId = UriUtility.ConvertStringtoMD5(DateTime.Now.ToString());

            if (!string.IsNullOrEmpty(oldTabId) && !newTabId.Equals(oldTabId))
            {
                // Clone old session
                CacheUtil.CloneTabCache(oldTabId, newTabId);
            }

            return(Json(new { tabId = newTabId }, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        public RedirectToRouteResult Redirect(string actionName, string controllerName, object routeValues)
        {
            string newTabId = UriUtility.ConvertStringtoMD5(DateTime.Now.ToString());

            if (routeValues != null)
            {
                RouteValueDictionary newRoute = new RouteValueDictionary(routeValues);
                newRoute = AddOrUpdate(newRoute, "tabId", this.CmnTabEntityModel != null ? this.CmnTabEntityModel.TabID ?? newTabId : newTabId);
                return(base.RedirectToAction(actionName, controllerName, newRoute));
            }
            routeValues = new { tabId = this.CmnTabEntityModel != null ? this.CmnTabEntityModel.TabID ?? newTabId : newTabId };
            return(base.RedirectToAction(actionName, controllerName, routeValues));
        }