B2022-124: [JPR] Blank RO Values (All Spaces) printing as "?"
This commit is contained in:
@@ -127,8 +127,6 @@ namespace VEPROMS.CSLA.Library
|
||||
public static Regex regRoKeyHigh = new Regex("( |-|_)(HIGH|HI)([0-9])");
|
||||
public static Regex regRoKeyLow = new Regex("( |-|_)(LOW|LO)([0-9])");
|
||||
|
||||
public const string RoMissingDefaultValue = "[TBD]";
|
||||
|
||||
private List<RoExtension> _extensions;
|
||||
private List<string> _baseAccPageKeys;
|
||||
|
||||
@@ -137,7 +135,8 @@ namespace VEPROMS.CSLA.Library
|
||||
private DocVersionInfo _myDocVersionInfo;
|
||||
private int _selectedSlave;
|
||||
private string _otherChild = string.Empty;
|
||||
|
||||
private string _roMissingDefaultValue = "[TBD]";
|
||||
|
||||
private bool _autoCombineSingleRetValues = true;
|
||||
|
||||
private List<string> _lstRoValues;
|
||||
@@ -194,6 +193,13 @@ namespace VEPROMS.CSLA.Library
|
||||
set { _itemInfo = value; }
|
||||
}
|
||||
|
||||
// B2022-124: [JPR] Blank RO Values (All Spaces) printing as "?"
|
||||
public string RoMissingDefaultValue
|
||||
{
|
||||
get { return _roMissingDefaultValue; }
|
||||
set { _roMissingDefaultValue = value; }
|
||||
}
|
||||
|
||||
public List<RoExtension> Extensions
|
||||
{
|
||||
get
|
||||
@@ -872,6 +878,10 @@ namespace VEPROMS.CSLA.Library
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
cmd.Parameters.Add(new SqlParameter("@value", SqlDbType.VarChar)).Value = value;
|
||||
|
||||
// B2022-124: [JPR] Blank RO Values (All Spaces) printing as "?"
|
||||
if (!string.IsNullOrEmpty(this.RoMissingDefaultValue))
|
||||
cmd.Parameters.Add(new SqlParameter("@missingDefaultValue", SqlDbType.VarChar)).Value = this.RoMissingDefaultValue;
|
||||
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
@@ -1131,7 +1141,7 @@ namespace VEPROMS.CSLA.Library
|
||||
cmd.Parameters.Add(new SqlParameter("@Value", SqlDbType.VarChar)).Value = value;
|
||||
cmd.Parameters.Add(new SqlParameter("@SearchTypeID", SqlDbType.Int)).Value = searchTypeID;
|
||||
cmd.Parameters.Add(new SqlParameter("@OnlyRoid16", SqlDbType.Bit)).Value = (onlyRoid16) ? 1 : 0;
|
||||
|
||||
|
||||
if (maxNumRecords != null)
|
||||
cmd.Parameters.Add(new SqlParameter("@MaxNumOfRecords", SqlDbType.Int)).Value = (int)maxNumRecords;
|
||||
|
||||
@@ -1759,7 +1769,8 @@ namespace VEPROMS.CSLA.Library
|
||||
// setting appid and roid
|
||||
var roExt = lstValues.Count==1? Extensions.Where(x => x.Offset.Equals(i + 1)).SingleOrDefault() : Extensions.Where(x => x.AccPageExt.Equals(_multiRoValues[i])).SingleOrDefault();
|
||||
|
||||
string roValue = GetParentChildROValue(lstValues[i], this.SelectedSlave);
|
||||
// B2022-124: [JPR] Blank RO Values (All Spaces) printing as "?"
|
||||
string roValue = GetParentChildROValue(lstValues[i], this.SelectedSlave, this.RoMissingDefaultValue);
|
||||
|
||||
child.children[i].ParentID = child.ID;
|
||||
child.children[i].type = child.type; // Multiple return value inherit type from parent
|
||||
@@ -1796,12 +1807,13 @@ namespace VEPROMS.CSLA.Library
|
||||
return;
|
||||
}
|
||||
|
||||
private static string GetParentChildROValue(string roval, int selChldIdx)
|
||||
private static string GetParentChildROValue(string roval, int selChldIdx, string roMissingDefaultValue)
|
||||
{
|
||||
// C2021-026 Get the child RO value if it exists, otherwise to the default (parent) RO value
|
||||
// C2022-001 new logic to handle new format of Parent/Child RO.FST
|
||||
// The RO.FST will not have a specific child value if that child value is the same as the default value
|
||||
// B2021-093 Don't look for child RO values if "roval" is null
|
||||
// B2022-124: [JPR] Blank RO Values (All Spaces) printing as "?", Added roMissingDefaultValue parameter
|
||||
if (string.IsNullOrEmpty(roval))
|
||||
return null;
|
||||
|
||||
@@ -1854,7 +1866,8 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
|
||||
// If Default Value is selected (selChldIdx = 0), and return value is empty then replace with Standard Missing Default Value
|
||||
return (selChldIdx == 0 && sb.ToString().Trim().Length <= 0) ? ROFSTLookup.RoMissingDefaultValue : sb.ToString().Trim();
|
||||
// TODO: [JAKE]
|
||||
return (selChldIdx == 0 && sb.ToString().Length <= 0) ? roMissingDefaultValue : sb.ToString();
|
||||
}
|
||||
|
||||
private List<string> GetROReturnValue(string roval)
|
||||
|
Reference in New Issue
Block a user