Added new property ChangeBarDate to fix approval bug involving change bars
Added code to handle processing slave nodes of multi unit config file
This commit is contained in:
parent
0979a8b178
commit
8ddb8c88d2
@ -325,6 +325,51 @@ namespace VEPROMS.CSLA.Library
|
||||
OnPropertyChanged("Print_RevDate");
|
||||
}
|
||||
}
|
||||
//new changebar_date
|
||||
[Category("Print Settings")] //Note that this print setting is stored under 'Procedure' element
|
||||
[Browsable(false)]
|
||||
[DisplayName("Revision ChangeBarDate")]
|
||||
[RefreshProperties(RefreshProperties.All)]
|
||||
[Description("Revision ChangeBarDate")]
|
||||
public string Print_ChangeBarDate
|
||||
{
|
||||
get
|
||||
{
|
||||
string s = _Xp["Procedure", "ChangeBarDate"];
|
||||
if (SelectedSlave > 0)
|
||||
s = _Xp["Slave[@index='" + SelectedSlave.ToString() + "']", "ChangeBarDate"];
|
||||
else
|
||||
{
|
||||
if (s != "")
|
||||
return s;
|
||||
System.Xml.XmlNodeList nl = _Xp.XmlContents.SelectNodes("//Slave");
|
||||
if (nl.Count == 0)
|
||||
return s;
|
||||
DateTime dt = DateTime.MaxValue;
|
||||
foreach (System.Xml.XmlNode nd in nl)
|
||||
{
|
||||
System.Xml.XmlAttribute xa = nd.Attributes["ChangeBarDate"];
|
||||
if (xa == null)
|
||||
return s;
|
||||
DateTime dtt = DateTime.Parse(xa.InnerText);
|
||||
if (dtt < dt)
|
||||
dt = dtt;
|
||||
}
|
||||
if (dt == DateTime.MaxValue)
|
||||
return s;
|
||||
return dt.ToString("MM/dd/yyyy HH:mm:ss");
|
||||
}
|
||||
return s;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (SelectedSlave > 0)
|
||||
_Xp["Slave[@index='" + SelectedSlave.ToString() + "']", "ChangeBarDate"] = value; // save selected value
|
||||
else
|
||||
_Xp["Procedure", "ChangeBarDate"] = value;
|
||||
OnPropertyChanged("Print_ChangeBarDate");
|
||||
}
|
||||
}
|
||||
[Category("Print Settings")] //Note that this print setting is stored under 'Procedure' element
|
||||
[Browsable(false)]
|
||||
[DisplayName("Review Date")]
|
||||
|
@ -55,7 +55,7 @@ namespace VEPROMS.CSLA.Library
|
||||
private XmlNode GetGroup(string group)
|
||||
{
|
||||
XmlNodeList xl = _XmlContents.DocumentElement.SelectNodes(string.Format("//{0}", group));
|
||||
if(xl.Count == 0)
|
||||
if(xl.Count == 0 && System.Text.RegularExpressions.Regex.IsMatch(group,"^[A-Za-z0-9]+$"))
|
||||
xl = _XmlContents.DocumentElement.SelectNodes(
|
||||
string.Format("//*[translate(local-name(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='{0}']", group.ToLower()));
|
||||
switch (xl.Count)
|
||||
|
Loading…
x
Reference in New Issue
Block a user