示例#1
0
        //returns Type
        internal string GetItemPage(Type type, string code)
        {
            XFile tableFile = this.OpenFileOrCreate(type.FullName + ".xtab");

            ////.NETCore typename compatibility
            //if (tableFile == null)
            //{
            //    string typeName = type.Namespace + "+" + type.Name;
            //    tableFile = this.OpenFileOrCreate(typeName + ".xtab");
            //}

            foreach (var file in tableFile.Pages().Select(s => s.Attribute("file").Value))
            {
                XFile pageFile = this.OpenFileOrCreate(file);
                if (pageFile.Rows().Where(delegate(XElement s)
                {
                    XAttribute sa = s.Attribute("code");
                    return(null != sa && sa.Value == code);
                }).Any())
                {
                    return(file.Replace(".xpag", ""));
                }
            }
            return(null);
        }
示例#2
0
        //returns Type
        internal string GetItemPage(Type type, string code)
        {
            XFile tableFile = this.OpenFileOrCreate(type.FullName + ".xtab");

            foreach (var file in tableFile.Pages().Select(s => s.Attribute("file").Value))
            {
                XFile pageFile = this.OpenFileOrCreate(file);
                if (pageFile.Rows().Where(delegate(XElement s)
                {
                    XAttribute sa = s.Attribute("code");
                    return(null != sa && sa.Value == code);
                }).Any())
                {
                    return(file.Replace(".xpag", ""));
                }
            }
            return(null);
        }