This commit is contained in:
parent
926d99cfdc
commit
46a7416070
@ -53,7 +53,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
if (args.AncestorLookup || ParentLookup)
|
||||
{
|
||||
for (FolderInfo folder = _DocVersion.MyDocVersionInfo.MyFolder; folder != null; folder = folder.MyParent)
|
||||
for (FolderInfo folder = _DocVersion != null ? _DocVersion.MyDocVersionInfo.MyFolder : _DocVersionInfo.MyFolder; folder != null; folder = folder.MyParent)
|
||||
{
|
||||
string retval = folder.FolderConfig.GetValue(args.Group, args.Item);
|
||||
if (retval != string.Empty) return retval;
|
||||
@ -63,15 +63,15 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
//private string Xp_LookInAncestorFolderInfo(object sender, XMLPropertiesArgs args)
|
||||
//{
|
||||
// if (args.AncestorLookup || ParentLookup)
|
||||
// {
|
||||
// for (FolderInfo folder = _DocVersionInfo.MyFolder; folder != null; folder = folder.MyParent)
|
||||
// if (args.AncestorLookup || ParentLookup)
|
||||
// {
|
||||
// string retval = folder.FolderConfig.GetValue(args.Group, args.Item);
|
||||
// if (retval != string.Empty) return retval;
|
||||
// for (FolderInfo folder = _DocVersionInfo.MyFolder; folder != null; folder = folder.MyParent)
|
||||
// {
|
||||
// string retval = folder.FolderConfig.GetValue(args.Group, args.Item);
|
||||
// if (retval != string.Empty) return retval;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return string.Empty;
|
||||
// return string.Empty;
|
||||
//}
|
||||
private DocVersionInfo _DocVersionInfo;
|
||||
public DocVersionConfig(DocVersionInfo docVersionInfo)
|
||||
@ -80,6 +80,7 @@ namespace VEPROMS.CSLA.Library
|
||||
string xml = docVersionInfo.Config;
|
||||
if (xml == string.Empty) xml = "<Config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
if (docVersionInfo.MyFolder != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
|
||||
}
|
||||
public DocVersionConfig(string xml)
|
||||
{
|
||||
|
@ -58,7 +58,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
if (ParentLookup || args.AncestorLookup)
|
||||
{
|
||||
for (FolderInfo folder = _Folder.MyFolderInfo.MyParent; folder != null; folder = folder.MyParent)
|
||||
for (FolderInfo folder = _Folder != null?_Folder.MyFolderInfo.MyParent:_FolderInfo.MyParent; folder != null; folder = folder.MyParent)
|
||||
{
|
||||
string retval = folder.FolderConfig.GetValue(args.Group, args.Item);
|
||||
if (retval != string.Empty) return retval;
|
||||
@ -77,15 +77,15 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
//private string Xp_LookInAncestorFolderInfo(object sender, XMLPropertiesArgs args)
|
||||
//{
|
||||
// if (args.AncestorLookup || ParentLookup)
|
||||
// {
|
||||
// for (FolderInfo folder = _FolderInfo.MyParent; folder != null; folder = folder.MyParent)
|
||||
// if (args.AncestorLookup || ParentLookup)
|
||||
// {
|
||||
// string retval = folder.FolderConfig.GetValue(args.Group, args.Item);
|
||||
// if (retval != string.Empty) return retval;
|
||||
// for (FolderInfo folder = _FolderInfo.MyParent; folder != null; folder = folder.MyParent)
|
||||
// {
|
||||
// string retval = folder.FolderConfig.GetValue(args.Group, args.Item);
|
||||
// if (retval != string.Empty) return retval;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// return string.Empty;
|
||||
// return string.Empty;
|
||||
//}
|
||||
public FolderConfig(FolderInfo folderInfo)
|
||||
{
|
||||
@ -93,6 +93,7 @@ namespace VEPROMS.CSLA.Library
|
||||
string xml = _FolderInfo.Config;
|
||||
if (xml == string.Empty) xml = "<config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
if (_FolderInfo.MyParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
|
||||
}
|
||||
public FolderConfig(string xml)
|
||||
{
|
||||
|
@ -57,7 +57,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (args.AncestorLookup || ParentLookup)
|
||||
{
|
||||
string retval;
|
||||
SectionInfo sect = _Section.MySectionInfo;
|
||||
SectionInfo sect = _Section != null ? _Section.MySectionInfo : _SectionInfo;
|
||||
while (sect.ActiveParent.GetType() == typeof(SectionInfo))
|
||||
{
|
||||
retval = sect.SectionConfig.GetValue(args.Group, args.Item);
|
||||
@ -92,6 +92,7 @@ namespace VEPROMS.CSLA.Library
|
||||
string xml = sectionInfo.MyContent.Config;
|
||||
if (xml == string.Empty) xml = "<config/>";
|
||||
_Xp = new XMLProperties(xml);
|
||||
if (_SectionInfo.ActiveParent != null) _Xp.LookInAncestor += new XMLPropertiesEvent(Xp_LookInAncestorFolder);
|
||||
}
|
||||
public SectionConfig(string xml)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user