コード例 #1
0
        public override string GetUrl(HttpContextBase context)
        {
            PathInfo         path         = PathInfo.Create(Item.BuildingID, ID, 0, 0);
            LocationPathInfo locationPath = LocationPathInfo.Create(Item.LabID, 0);

            return($"~/Lab.aspx?View=locations&LocationPath={locationPath.UrlEncode()}&Path={path.UrlEncode()}&Date={context.Request.SelectedDate():yyyy-MM-dd}");
        }
コード例 #2
0
        protected virtual string GetHeaderText()
        {
            var       path = PathInfo.Parse(SelectedPath);
            IResource res  = Helper.GetResourceTreeItemCollection().GetResource(path.ResourceID);

            if (res == null)
            {
                return(string.Empty);
            }

            string result = $"<span>{res.BuildingName} &gt; {res.LabDisplayName} &gt; {res.ProcessTechName} &gt; </span><span class=\"tabs-resource-name\"><a href=\"{Page.Request.Url}\">{res.ResourceName} [{res.ResourceID}]</a></span>";

            var loc = GetLabLocationByResource(res.ResourceID);

            if (loc != null)
            {
                var locationPath = LocationPathInfo.Create(loc);
                var url          = VirtualPathUtility.ToAbsolute($"~/LabLocation.aspx?LocationPath={locationPath.UrlEncode()}&Date={ContextBase.Request.SelectedDate():yyyy-MM-dd}");
                result += $" <span clas\"lab-location\">(<a href=\"{url}\">{loc.LocationName}</a>)</span>";
            }

            return(result);
        }
コード例 #3
0
        public static string GetLocationNodeUrl(int labId, int labLocationId, DateTime selectedDate)
        {
            var locationPath = LocationPathInfo.Create(labId, labLocationId);

            return($"~/LabLocation.aspx?LocationPath={locationPath.UrlEncode()}&Date={selectedDate:yyyy-MM-dd}");
        }