Corrected processing of RO values in grids when printing individual unit of multiunit site
Added SetData method to GridInfo class to allow updating grid data Added GetNonCached method to GridInfo class to allowing retrieving noncached grid data Added code to retrieve noncached grid data during printing of procedure with grids
This commit is contained in:
@@ -131,7 +131,7 @@ namespace VEPROMS.CSLA.Library
|
||||
_Text = Text.Substring(0, g.Index) + transText + Text.Substring(g.Index + g.Length);
|
||||
}
|
||||
// see if there is a grid to update too.
|
||||
if (tran.MyContent.MyGrid != null)
|
||||
if (MyGrid != null)
|
||||
{
|
||||
string lookForXml = string.Format(@"<START\](\\[^v \\]+)*\\v0(\\[^v \\]+)* ([^#]*?)(\\[^v'? \\]+)*\\v(\\[^v \\]+)* #Link:Transition[^:]*?:{0} {1}( [0-9]*){{1,2}}\[END>", tran.TranType, tran.TransitionID);
|
||||
Match mg = Regex.Match(MyGrid.Data, lookForXml);
|
||||
@@ -164,7 +164,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
// see if there is a grid to update too.
|
||||
if (rousg.MyContent.MyGrid != null)
|
||||
if (MyGrid != null)
|
||||
{
|
||||
if (rotype == (int)E_ROValueType.Table) // if change in rotable data...
|
||||
{
|
||||
@@ -180,18 +180,30 @@ namespace VEPROMS.CSLA.Library
|
||||
MatchCollection msg = Regex.Matches(MyGrid.Data, findLinkXml);
|
||||
foreach (Match mmg in msg)
|
||||
{
|
||||
int offset = 0; // crashed in substring line below if using mmg.Index; Set to 0 and it worked - KBR.
|
||||
Match mg = Regex.Match(MyGrid.Data, lookForXml);
|
||||
//int offset = 0; // crashed in substring line below if using mmg.Index; Set to 0 and it worked - KBR.
|
||||
Match mg = Regex.Match(mmg.Value, lookForXml);
|
||||
if (mg != null && mg.Groups.Count > 1)
|
||||
{
|
||||
System.Text.RegularExpressions.Group g = mg.Groups[3];
|
||||
//if (g.ToString() != newvalue)
|
||||
// MyGrid.Data = MyGrid.Data.Substring(0, offset + g.Index) + newvalue + MyGrid.Data.Substring(offset + g.Index + g.Length);
|
||||
if (g.ToString() != newvalue)
|
||||
{
|
||||
string prefix1 = MyGrid.Data.Substring(0,mmg.Index);
|
||||
string prefix2 = mmg.Value.Substring(0,g.Index);
|
||||
string suffix1 = MyGrid.Data.Substring(mmg.Index + mmg.Length);
|
||||
string suffix2 = mmg.Value.Substring(g.Index + g.Length);
|
||||
MyGrid.SetData(prefix1 + prefix2 + newvalue + suffix2 + suffix1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void LoadNonCachedGrid()
|
||||
{
|
||||
_MyGrid = GridInfo.GetNonCached(ContentID);
|
||||
Console.WriteLine("LoadNonCachedGrid {0},{1},{2}",ContentID,_MyGrid==null,_MyContentInfoUnique);
|
||||
}
|
||||
public PartInfoList LocalContentParts
|
||||
{
|
||||
get { return _ContentParts; }
|
||||
|
Reference in New Issue
Block a user