Better formatting of text for RO Summary report. Also handle degree and delta characters
This commit is contained in:
parent
18a99f8d02
commit
f73d9b1af5
@ -473,7 +473,7 @@ namespace VEPROMS.CSLA.Library
|
||||
// Return the RO Title in a list of strings
|
||||
// The last item in the list is the actual RO title, the items preceding it are the
|
||||
// titles of the groups and sub-groups containing the RO
|
||||
public List<string> GetROTitleAndGroupPath(string ROID, bool reportMissingROs)
|
||||
public List<string> GetROTitleAndGroupPath(string ROID, bool reportMissingROs, bool convertCaretToDelta)
|
||||
{
|
||||
List<string> titlePath = new List<string>();
|
||||
rochild roc = GetRoChild12(ROID);
|
||||
@ -482,9 +482,16 @@ namespace VEPROMS.CSLA.Library
|
||||
string tmp = roc.title;
|
||||
if (roc.appid != "")
|
||||
if (roc.title.Contains(roc.appid))
|
||||
tmp = roc.title.Replace(roc.appid, string.Format("<{0}>", roc.appid)).Trim();
|
||||
else
|
||||
tmp = string.Format("[{0}] {1}", roc.appid, roc.title);
|
||||
//tmp = roc.title.Replace(roc.appid, string.Format("<{0}>", roc.appid)).Trim();
|
||||
// remove the setpoint ID (appid) from the title string and always put the sepoint ID
|
||||
// at the beginning of the report line item.
|
||||
tmp = roc.title.Replace(roc.appid, "").Trim();
|
||||
//else
|
||||
tmp = string.Format("[{0}] {1}", roc.appid, tmp);
|
||||
tmp = tmp.Replace("`", "\u00B0"); //degree
|
||||
tmp = tmp.Replace("\xF8", "\u00B0"); //degree
|
||||
if (convertCaretToDelta)
|
||||
tmp = tmp.Replace("^", "\u0394"); // delta
|
||||
titlePath.Add(tmp);
|
||||
do
|
||||
{
|
||||
@ -500,22 +507,22 @@ namespace VEPROMS.CSLA.Library
|
||||
|
||||
return titlePath;
|
||||
}
|
||||
public List<string> GetROTitleAndGroupPathForSummary(string ROID)
|
||||
{
|
||||
List<string> titlePath = new List<string>();
|
||||
rochild roc = GetRoChild(ROID);
|
||||
string tmp = roc.title.Replace(roc.appid, string.Format("<{0}>",roc.appid)).Trim();
|
||||
titlePath.Add(tmp);
|
||||
do
|
||||
{
|
||||
string parent = ROID.Substring(0, 4) + string.Format("{0:X8}", roc.ParentID);
|
||||
roc = GetRoChild(parent);
|
||||
if (roc.ID > 0)
|
||||
titlePath.Add(roc.title);
|
||||
} while (roc.ID > 0);
|
||||
titlePath.Reverse();
|
||||
return titlePath;
|
||||
}
|
||||
//public List<string> GetROTitleAndGroupPathForSummary(string ROID)
|
||||
//{
|
||||
// List<string> titlePath = new List<string>();
|
||||
// rochild roc = GetRoChild(ROID);
|
||||
// string tmp = roc.title.Replace(roc.appid, string.Format("<{0}>",roc.appid)).Trim();
|
||||
// titlePath.Add(tmp);
|
||||
// do
|
||||
// {
|
||||
// string parent = ROID.Substring(0, 4) + string.Format("{0:X8}", roc.ParentID);
|
||||
// roc = GetRoChild(parent);
|
||||
// if (roc.ID > 0)
|
||||
// titlePath.Add(roc.title);
|
||||
// } while (roc.ID > 0);
|
||||
// titlePath.Reverse();
|
||||
// return titlePath;
|
||||
//}
|
||||
public DateTime GetRoFSTdts()
|
||||
{
|
||||
return MyDocVersionInfo.DocVersionAssociations[0].MyROFst.DTS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user