BGE: Save Change id on grid edit

BGE: Save Change id on step edit
BGE: Added user interface for modifying current change id
BGE: Added menu item for removing change ids (no supporting code yet – the actual code to remove ids needs to be developed)
BGE: If format uses ‘ChangeIds’, then use the data from the changed step config for printing the change bar data.
This commit is contained in:
2014-05-07 13:43:07 +00:00
parent b48a813a85
commit c0c9c8e314
7 changed files with 275 additions and 218 deletions

View File

@@ -639,30 +639,40 @@ namespace Volian.Controls.Library
//if (!MatchingXML(itm.MyContent.MyGrid.Data, xml))
//{
// CompareXML(itm.MyContent.MyGrid.Data, xml);
itm.MyContent.MyGrid.Data = xml;
itm.MyContent.MyGrid.DTS = DateTime.Now;
itm.MyContent.MyGrid.Data = xml;
itm.MyContent.MyGrid.DTS = DateTime.Now;
//}
// if this is the initial save of an ro table, then the 'DoLinkForRoTable' will
// create the usage for it. this code gets run on modify of the ro table and also
// on exit of the griditem. We don't want to save the ro usage again, if it's already
// been saved.
if (MyFlexGrid.IsRoTable && MyFlexGrid.ROID != null && itm.MyContent.ContentRoUsageCount < 1)
{
searchableText = string.Format(@"\v<START]\v0 {0} \v {1}[END>\v0 ", searchableText, DoLinkForRoTable(itm));
//if (itm.MyContent.Text != searchableText)
//{
itm.MyContent.Text = searchableText;
itm.MyContent.UserID = Volian.Base.Library.VlnSettings.UserID;
itm.MyContent.DTS = DateTime.Now;
//}
}
else
{
itm.MyContent.Text = searchableText;
itm.MyContent.UserID = Volian.Base.Library.VlnSettings.UserID;
itm.MyContent.DTS = DateTime.Now;
}
if (!MyFlexGrid.IsRoTable)itm.MyContent.Text = searchableText;
if (MyFlexGrid.IsRoTable && MyFlexGrid.ROID != null && itm.MyContent.ContentRoUsageCount < 1)
{
searchableText = string.Format(@"\v<START]\v0 {0} \v {1}[END>\v0 ", searchableText, DoLinkForRoTable(itm));
//if (itm.MyContent.Text != searchableText)
//{
itm.MyContent.Text = searchableText;
itm.MyContent.UserID = Volian.Base.Library.VlnSettings.UserID;
itm.MyContent.DTS = DateTime.Now;
//}
}
else
{
itm.MyContent.Text = searchableText;
itm.MyContent.UserID = Volian.Base.Library.VlnSettings.UserID;
itm.MyContent.DTS = DateTime.Now;
}
if (!MyFlexGrid.IsRoTable) itm.MyContent.Text = searchableText;
// if the plant has the change id option, the change id was entered when the program started.
// this should be saved for every piece of edited data. Note that the set of config
// item Step_MultipleChangeID has the save built in to it.
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ChangeBarData.ChgBarMessageFromEdit)
{
StepConfig sc = itm.MyConfig as StepConfig;
sc.Step_ChangeID = this.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.ChgId;
}
itm.Save();
MyItemInfo.MyContent.MyGrid.ResetContent(itm.MyContent.MyGrid);
}