Enhanced Document support

Null check
Move DisplayText.cs to CSLA
Enhanced Documents – don’t allow ‘Save’ RO on enhanced step
Enhanced Documents windowing
Enhanced Documents remove unnecessary options
Enhanced Documents – don’t allow ‘Save’ transition on enhanced step
Enhanced Documents/Insert,Delete,Paste
This commit is contained in:
2016-01-20 16:43:23 +00:00
parent 77cdf81736
commit 6366af8b47
17 changed files with 1132 additions and 243 deletions

View File

@@ -22,14 +22,11 @@ namespace VEPROMS.CSLA.Library
}
return ed;
}
public EnhancedDocument this[int type]
public EnhancedDocument GetByType(int type)
{
get
{
foreach (EnhancedDocument ed in this)
if (ed.Type == type) return ed;
return null;
}
foreach (EnhancedDocument ed in this)
if (ed.Type == type) return ed;
return null;
}
}
public partial class EnhancedDocument
@@ -396,8 +393,14 @@ namespace VEPROMS.CSLA.Library
// so that what remains are those that need added to xml that will then be written to database
foreach (XmlNode xn in _Xp.XmlContents.SelectNodes("//Enhanced"))
{
EnhancedDocument tmp = edsToAdd[int.Parse(xn.Attributes["Type"].Value)];
if (tmp != null) edsToAdd.Remove(tmp);
//EnhancedDocument tmp = edsToAdd[int.Parse(xn.Attributes["Type"].Value)];
EnhancedDocument tmp = edsToAdd.GetByType(int.Parse(xn.Attributes["Type"].Value));
if (tmp != null)
{
if (int.Parse(xn.Attributes["ItemID"].Value) != tmp.ItemID)
xn.Attributes["ItemID"].Value = tmp.ItemID.ToString();
edsToAdd.Remove(tmp);
}
}
foreach (EnhancedDocument edadd in edsToAdd)
{