Compare commits
24 Commits
C2022-003-
...
B2026-025_
| Author | SHA1 | Date | |
|---|---|---|---|
| 33cc650871 | |||
| 955ffc48d3 | |||
| a0be60a1b9 | |||
| d296d6f000 | |||
| 8df4bd2537 | |||
| cc5cdb88ff | |||
| f66c6a93c5 | |||
| a7b5ee33e2 | |||
| fe90af5aa4 | |||
| 7e672d91e9 | |||
| 09f472bee2 | |||
| 30da0c5105 | |||
| d2082cdbea | |||
| c42596811e | |||
| d095a19187 | |||
| 8089e2c898 | |||
| a657d03fb0 | |||
| 4e829200f5 | |||
| bef9be5cbe | |||
| 56f14323d1 | |||
| 4fcd22ca68 | |||
| 21890e74fe | |||
| ef32564fba | |||
| d95505726f |
Binary file not shown.
@@ -2142,7 +2142,20 @@ namespace RODBInterface
|
||||
wraccid = accid;
|
||||
string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now);
|
||||
string xmlstr = GenerateXmlString(ro, false);
|
||||
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstr + "'";
|
||||
StringBuilder xmlstrTmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
|
||||
char[] chrAry = xmlstr.ToCharArray();
|
||||
foreach (int chr in chrAry)
|
||||
{
|
||||
if (chr > 166)
|
||||
{
|
||||
xmlstrTmp.Append($"\\u{(int)chr}?");
|
||||
}
|
||||
else
|
||||
{
|
||||
xmlstrTmp.Append((char)chr);
|
||||
}
|
||||
}
|
||||
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstrTmp.ToString() + "'";
|
||||
if (movedRO)
|
||||
{
|
||||
VlnXmlElement parent = (VlnXmlElement)ro.ParentNode;
|
||||
@@ -2186,6 +2199,20 @@ namespace RODBInterface
|
||||
}
|
||||
string xmlstr = GenerateXmlString(ro, false);
|
||||
|
||||
StringBuilder xmlstrTmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
|
||||
char[] chrAry = xmlstr.ToCharArray();
|
||||
foreach (int chr in chrAry)
|
||||
{
|
||||
if (chr > 166)
|
||||
{
|
||||
xmlstrTmp.Append($"\\u{(int)chr}?");
|
||||
}
|
||||
else
|
||||
{
|
||||
xmlstrTmp.Append((char)chr);
|
||||
}
|
||||
}
|
||||
|
||||
string wraccid = null;
|
||||
if (ro.HasAttribute("AccPageID"))
|
||||
{
|
||||
@@ -2209,13 +2236,13 @@ namespace RODBInterface
|
||||
// strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageID, ModDateTime, Info ) ";
|
||||
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) ";
|
||||
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
|
||||
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
|
||||
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp.ToString() + "');";
|
||||
}
|
||||
else
|
||||
{
|
||||
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, Info ) ";
|
||||
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
|
||||
strInsert = strInsert + "','" + dt + "','" + xmlstr + "');";
|
||||
strInsert = strInsert + "','" + dt + "','" + xmlstrTmp.ToString() + "');";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2223,7 +2250,7 @@ namespace RODBInterface
|
||||
{
|
||||
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageId, ModDateTime, Info ) ";
|
||||
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.RRO + ",'" + ro.GetAttribute("ParentID");
|
||||
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
|
||||
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp.ToString() + "');";
|
||||
}
|
||||
|
||||
try
|
||||
@@ -2631,7 +2658,20 @@ namespace RODBInterface
|
||||
}
|
||||
}
|
||||
StatMsgWindow.StatusMessage = echild.GetAttribute("MenuTitle");
|
||||
str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2 + "'";
|
||||
StringBuilder tinfo2Tmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
|
||||
char[] chrAry = tinfo2.ToCharArray();
|
||||
foreach (int chr in chrAry)
|
||||
{
|
||||
if (chr > 166)
|
||||
{
|
||||
tinfo2Tmp.Append($"\\u{(int)chr}?");
|
||||
}
|
||||
else
|
||||
{
|
||||
tinfo2Tmp.Append((char)chr);
|
||||
}
|
||||
}
|
||||
str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp.ToString() + "'";
|
||||
str = str + ", ModDateTime = '" + dt + "' WHERE RecID = '" + echild.GetAttribute("RecID") + "';";
|
||||
DBE.Command(str);
|
||||
DBE.Reader();
|
||||
|
||||
@@ -96,6 +96,7 @@ using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using ROFields;
|
||||
using VlnStatus;
|
||||
using System.Text.RegularExpressions;
|
||||
//using VlnProfiler; //don't forget to add VlnProfiler to the reference list
|
||||
|
||||
namespace RODBInterface
|
||||
@@ -517,7 +518,9 @@ namespace RODBInterface
|
||||
strtmp.Append(" ");
|
||||
cnt++;
|
||||
}
|
||||
if ((cnt + text.Length) > frmt2) // longer than the field length?
|
||||
// string sym = symbcode < 256 ? ((char)symbcode).ToString() : string.Format(@"\u{0}", symbcode);
|
||||
text = Regex.Replace(text, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); //B2026-025 Unicode removed from RO menu titles in treeview.
|
||||
if ((cnt + text.Length) > frmt2) // longer than the field length?
|
||||
strtmp.Append(text.Substring(0,frmt2-cnt));
|
||||
else
|
||||
strtmp.Append(text);
|
||||
|
||||
@@ -628,29 +628,25 @@ namespace VEPROMS
|
||||
|
||||
//B2019-140 Change bars do not get refreshed when approval is run.
|
||||
// Reset a Procedure and sub items in the cache
|
||||
ProcedureInfo newproc = ItemInfo.ResetProcedure(pi.ItemID);
|
||||
|
||||
//// Refresh the StepPanel for the current Procedure
|
||||
//// so change bars update
|
||||
//// on any open StepPanel
|
||||
|
||||
|
||||
//B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open
|
||||
DisplayTabItem dti = GetTabContainingProcedure(pi.ItemID);
|
||||
if (dti != null)
|
||||
{
|
||||
if (!dti.MyStepTabPanel.MyStepPanel.ContainsFocus)
|
||||
|
||||
if (!dti.MyStepTabPanel.MyStepPanel.ContainsFocus)
|
||||
dti.MyStepTabPanel.MyStepPanel.Focus();
|
||||
|
||||
foreach (EditItem eitm in dti.MyStepTabPanel.MyStepPanel.Controls.OfType<EditItem>())
|
||||
{
|
||||
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
|
||||
}
|
||||
|
||||
dti.MyStepTabPanel.MyStepTabRibbon.RefreshProcedure();
|
||||
}
|
||||
else
|
||||
{
|
||||
_ = ItemInfo.ResetProcedure(pi.ItemID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1113,13 +1113,34 @@ namespace VEPROMS
|
||||
if (_Apples == null)
|
||||
{
|
||||
_Apples = new List<MiniConfig>();
|
||||
}
|
||||
_Apples.Add(cfg);
|
||||
}
|
||||
|
||||
//B2026-017 Use Pre-typed in information when adding New Applicability
|
||||
if (_Apples.Count == 0)
|
||||
{
|
||||
cfg.ID = textBox1.Text;
|
||||
if (!string.IsNullOrEmpty(textBox2.Text))
|
||||
{
|
||||
cfg.Name = textBox2.Text;
|
||||
}
|
||||
cfg.Number = textBox3.Text;
|
||||
cfg.Text = textBox4.Text;
|
||||
cfg.OtherID = textBox8.Text;
|
||||
cfg.OtherName = textBox9.Text;
|
||||
cfg.OtherNumber = textBox10.Text;
|
||||
cfg.OtherText = textBox11.Text;
|
||||
cfg.ProcedureNumber = textBox5.Text;
|
||||
cfg.SetID = textBox6.Text;
|
||||
cfg.SetName = textBox7.Text;
|
||||
}
|
||||
_Apples.Add(cfg);
|
||||
|
||||
bsApples.DataSource = null;
|
||||
bsApples.DataSource = _Apples;
|
||||
lbApplicabilities.SelectedItem = cfg;
|
||||
}
|
||||
lbApplicabilities.SelectedItem = cfg;
|
||||
lbApplicabilities_SelectedIndexChanged(sender, e);
|
||||
|
||||
}
|
||||
|
||||
private bool ApplicIsUsed(MiniConfig cfg) // B2017-230 - don't allow user to remove an applicability that is being used (specified)
|
||||
{
|
||||
|
||||
@@ -2291,7 +2291,7 @@ OnPropertyChanged("Default_BkColor");
|
||||
public void RemoveSlave(int index)
|
||||
{
|
||||
XmlNode dd = _Xp.XmlContents.SelectSingleNode("//Slave[@index='" + index.ToString() + "']");
|
||||
dd.ParentNode.RemoveChild(dd);
|
||||
dd?.ParentNode?.RemoveChild(dd);
|
||||
}
|
||||
public int MaxSlaveIndex
|
||||
{
|
||||
|
||||
@@ -3867,26 +3867,27 @@ namespace VEPROMS.CSLA.Library
|
||||
ItemInfo newprocitem = Get(procID, true);
|
||||
newprocitem.RefreshConfig();
|
||||
|
||||
//Reload all the child/sub items
|
||||
//Reload all the child/sub items
|
||||
#pragma warning disable S2971 // LINQ expressions should be simplified - need initial ToList to force enumeration
|
||||
//otherwise will get a "Collection was modified; enumeration operation may not execute" error
|
||||
List<int> itemIDs = _CacheByPrimaryKey.Values.ToList().SelectMany(y => y).Where(t => t?.ActiveParent != null && (t.ActiveParent is ItemInfo) && t.MyProcedure.ItemID == procID).Select(x => (x.ActiveParent as ItemInfo).ItemID).Distinct().ToList();
|
||||
//otherwise will get a "Collection was modified; enumeration operation may not execute" error
|
||||
List<int> itemIDs = _CacheByPrimaryKey.SelectMany(kvp => kvp.Value).ToList().Where(t => t?.ActiveParent != null && (t.ActiveParent is ItemInfo) && t.MyProcedure.ItemID == procID).Select(x => (x.ActiveParent as ItemInfo).ItemID).Distinct().ToList();
|
||||
#pragma warning restore S2971 // LINQ expressions should be simplified
|
||||
for (int index = 0; index < itemIDs.Count; index++)
|
||||
{
|
||||
ResetParts(itemIDs[index]);
|
||||
}
|
||||
|
||||
//reset the procedure config for all items attached to current procedure
|
||||
#pragma warning disable S2971 // LINQ expressions should be simplified - need initial ToList to force enumeration
|
||||
//otherwise will get a "Collection was modified; enumeration operation may not execute" error
|
||||
List<ItemInfo> pconfigrefresh_items = _CacheByPrimaryKey.Values.ToList().SelectMany(y => y).Where(t => t?.MyProcedure?.ItemID == procID).Distinct().ToList();
|
||||
#pragma warning restore S2971 // LINQ expressions should be simplified
|
||||
for (int index = 0; index < pconfigrefresh_items.Count; index++)
|
||||
{
|
||||
pconfigrefresh_items[index].MyProcedure = newproc;
|
||||
ResetParts(itemIDs[index]);
|
||||
}
|
||||
|
||||
//reset the procedure config for all items attached to current procedure
|
||||
#pragma warning disable S2971 // LINQ expressions should be simplified - need initial ToList to force enumeration
|
||||
//otherwise will get a "Collection was modified; enumeration operation may not execute" error
|
||||
List<ItemInfo> pconfigrefresh_items = _CacheByPrimaryKey.SelectMany(kvp => kvp.Value).ToList().Where(t => t?.MyProcedure?.ItemID == procID).Distinct().ToList();
|
||||
#pragma warning restore S2971 // LINQ expressions should be simplified
|
||||
for (int index = 0; index < pconfigrefresh_items.Count; index++)
|
||||
{
|
||||
pconfigrefresh_items[index].MyProcedure = newproc;
|
||||
}
|
||||
|
||||
|
||||
//return the changed procedure info
|
||||
return newproc;
|
||||
}
|
||||
|
||||
@@ -374,6 +374,7 @@ namespace Volian.Controls.Library
|
||||
// B2022-098: [JPR] ROs not being resolved in Word Sections
|
||||
if (e.Node.Tag is ROFSTLookup.rochild){
|
||||
ROFSTLookup.rochild chld = (ROFSTLookup.rochild)e.Node.Tag;
|
||||
chld.value = Regex.Replace(chld.value, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString());
|
||||
selectedChld = chld;
|
||||
|
||||
if (chld.value != null)
|
||||
|
||||
@@ -4162,8 +4162,11 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
void MyConfig_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
SaveConfig();
|
||||
}
|
||||
//B2026-024 Change bars should not show when updating Applicability.
|
||||
if (e.PropertyName == "MasterSlave_Applicability") ChangeBarForConfigItemChange = false;
|
||||
SaveConfig();
|
||||
if (e.PropertyName == "MasterSlave_Applicability") ChangeBarForConfigItemChange = true;
|
||||
}
|
||||
public void SaveConfig()
|
||||
{
|
||||
if (!MyItemInfo.MyConfig.IsDirty) return;
|
||||
|
||||
@@ -1404,7 +1404,7 @@ namespace Volian.Controls.Library
|
||||
var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2022 - 003
|
||||
foreach (Match match in Regex.Matches(linkValue, pattern, RegexOptions.IgnoreCase))
|
||||
{
|
||||
linkValue = linkValue.Replace(match.Value, "\\f1 " + match.Value + " \\f0");
|
||||
linkValue = linkValue.Replace(match.Value, "\\f1 " + match.Value + "\\f0");
|
||||
}
|
||||
|
||||
linkValue = linkValue.Replace(@"{", @"\{");
|
||||
|
||||
Reference in New Issue
Block a user