コード例 #1
0
        public string Template <T, PropType>(string propertyName, string templateName) where T : class
        {
            PropType propVal = Data <T>().DataProp <T, PropType>(propertyName);

            if (propVal == null)
            {
                return(string.Empty);
            }
            string      path = BoxServer.GetVirtualDataBoxPath(HttpContext.Current, typeof(PropType), templateName);
            BoxResponse resp = BoxServer.GetBoxResponse(HttpContext.Current, path, propVal);

            return(resp.Html);
        }
コード例 #2
0
        public string TemplateIEnumerable <T, PropType>(string propertyName, string templateName) where T : class
        {
            string retVal = string.Empty;
            IEnumerable <PropType> arr = Data <T>().DataProp <T, IEnumerable <PropType> >(propertyName);

            if (arr == null)
            {
                return(string.Empty);
            }
            string path = BoxServer.GetVirtualDataBoxPath(HttpContext.Current, typeof(PropType), templateName);

            foreach (PropType p in arr)
            {
                retVal += BoxServer.GetBoxResponse(HttpContext.Current, path, p).Html;
            }

            return(retVal);
        }