rdlcnamespace.cs
来自「微软报表解析器语言生成器。选择微软的报表之后可以把每个节点生成一个实体类」· CS 代码 · 共 55 行
CS
55 行
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
namespace MSReport
{
public class RDLCNamespace:RDLCElement,IRDLCElement
{
public RDLCNamespace()
{
}
public string NamespaceName
{
get
{
return _NamespaceName;
}
set
{
_NamespaceName = value;
}
}
string _NamespaceName = "";
public SortedList<string, RDLCClass> ClassList = new SortedList<string, RDLCClass>();
public override string Create(XmlNode xnode)
{
RDLCClass rclass = new RDLCClass();;
this.ActXNode = xnode;
if (xnode.Name == @"ReportItems")
{
string xx = "xnode.Name";
}
if (ClassList.ContainsKey(this.GetName(xnode.Name)))
{
rclass = ClassList[this.GetName(xnode.Name)];
}
rclass.nsmgr = this.nsmgr;
string ns = @"
namespace " + _NamespaceName + @"
{
" + rclass.Create(xnode) + @"
}";
if (!ClassList.ContainsKey(this.GetName(xnode.Name)))
{
ClassList.Add(this.GetName(xnode.Name), rclass);
}
return ns;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?