called procedures when looping
This commit is contained in:
@ -260,7 +260,7 @@ namespace CobXmlSupport
|
|||||||
}
|
}
|
||||||
if (rw.Move_FromCode == null) { rw.MoveFromCode = " "; }
|
if (rw.Move_FromCode == null) { rw.MoveFromCode = " "; }
|
||||||
Cc.WorkDicOut[rw.FieldName] = rw.Move_FromCode;
|
Cc.WorkDicOut[rw.FieldName] = rw.Move_FromCode;
|
||||||
FieldList.Add(rw.FieldName,objNr++);
|
FieldList.Add(rw.FieldName, objNr++);
|
||||||
}
|
}
|
||||||
// Prefill with possibly filled out code
|
// Prefill with possibly filled out code
|
||||||
if (chkWrap.Checked)
|
if (chkWrap.Checked)
|
||||||
@ -279,7 +279,7 @@ namespace CobXmlSupport
|
|||||||
foreach (string jkey in jkeys)
|
foreach (string jkey in jkeys)
|
||||||
{
|
{
|
||||||
int item;
|
int item;
|
||||||
if (!FieldList.TryGetValue(jkey,out item))
|
if (!FieldList.TryGetValue(jkey, out item))
|
||||||
{
|
{
|
||||||
string checktxt = "";
|
string checktxt = "";
|
||||||
Cc.WorkDicIn.TryGetValue(jkey, out checktxt);
|
Cc.WorkDicIn.TryGetValue(jkey, out checktxt);
|
||||||
@ -2197,6 +2197,7 @@ namespace CobXmlSupport
|
|||||||
private void createXMLMoveCode(savedFile SF, bool justOut = false)
|
private void createXMLMoveCode(savedFile SF, bool justOut = false)
|
||||||
{
|
{
|
||||||
bool loopTyp = false;
|
bool loopTyp = false;
|
||||||
|
string SectionNames="",BoolVars="";
|
||||||
qualifieldhlp locTmpQfh = null;
|
qualifieldhlp locTmpQfh = null;
|
||||||
//Create showing window
|
//Create showing window
|
||||||
fromToMoves = new ShowCode();
|
fromToMoves = new ShowCode();
|
||||||
@ -2258,8 +2259,8 @@ namespace CobXmlSupport
|
|||||||
{
|
{
|
||||||
foreach (string indTxt in indSt.NewInds)
|
foreach (string indTxt in indSt.NewInds)
|
||||||
{
|
{
|
||||||
// if (!justOut)
|
// if (!justOut)
|
||||||
// {
|
// {
|
||||||
//Before perform varying, move the count-value from old structure to new
|
//Before perform varying, move the count-value from old structure to new
|
||||||
string chosenKey = testIndexes.FirstOrDefault(x => x.Value == indTxt).Key; // indexes = <FieldName , FieldIndex> search FieldName from present FieldIndex
|
string chosenKey = testIndexes.FirstOrDefault(x => x.Value == indTxt).Key; // indexes = <FieldName , FieldIndex> search FieldName from present FieldIndex
|
||||||
locTmpQfh = qldList.First(x => x.qualCobRow.FieldName == chosenKey); // Find QualifiedHelp-object for right field
|
locTmpQfh = qldList.First(x => x.qualCobRow.FieldName == chosenKey); // Find QualifiedHelp-object for right field
|
||||||
@ -2272,6 +2273,10 @@ namespace CobXmlSupport
|
|||||||
//Perform
|
//Perform
|
||||||
fromToMoves.CodeShower.Text += " PERFORM VARYING " + indTxt + " FROM 1 BY 1\r\n UNTIL " +
|
fromToMoves.CodeShower.Text += " PERFORM VARYING " + indTxt + " FROM 1 BY 1\r\n UNTIL " +
|
||||||
indTxt + "\r\n > " + locTmpQfh.qualCobRow.CountIn.ToString() + "\r\n" + locTmpQfh.indexRedText;
|
indTxt + "\r\n > " + locTmpQfh.qualCobRow.CountIn.ToString() + "\r\n" + locTmpQfh.indexRedText;
|
||||||
|
|
||||||
|
string tmpCheckVar = "";
|
||||||
|
fromToMoves.CodeShower.Text += " PERFORM " + createAftReferenceSections(locTmpQfh.qualCobRow.TagName, "NXTO-",
|
||||||
|
indTxt, ref SectionNames) + "\r\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2352,6 +2357,8 @@ namespace CobXmlSupport
|
|||||||
fromToMoves.CodeShower.Text += " END-PERFORM" + "\r\n";
|
fromToMoves.CodeShower.Text += " END-PERFORM" + "\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fromToMoves.CodeShower.Text = SectionNames + "\r\n" + fromToMoves.CodeShower.Text;
|
||||||
|
fromToMoves.CodeShower.Text = BoolVars + "\r\n" + fromToMoves.CodeShower.Text;
|
||||||
//List all used indexes
|
//List all used indexes
|
||||||
string tempIndText = "";
|
string tempIndText = "";
|
||||||
fromToMoves.CodeShower.Text = addOccursVars(testIndexes, fromToMoves.CodeShower.Text, tempIndText);
|
fromToMoves.CodeShower.Text = addOccursVars(testIndexes, fromToMoves.CodeShower.Text, tempIndText);
|
||||||
@ -2360,6 +2367,24 @@ namespace CobXmlSupport
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string createAftReferenceSections(string tagName, string procPrefix, string indexVar, ref string wrkSectStr)
|
||||||
|
{
|
||||||
|
string tmpProcName = procPrefix + tagName.Replace("\"", "").Replace(":", "");;
|
||||||
|
if (!wrkSectStr.Contains(tmpProcName))
|
||||||
|
{
|
||||||
|
wrkSectStr += "\r\n *>------------------- HANDLE SECTION --------------*" + tmpProcName;
|
||||||
|
wrkSectStr += "\r\n * Den här sektionen används för att positionera ";
|
||||||
|
wrkSectStr += "\r\n * datat när den genererade xml-proceduren körs";
|
||||||
|
wrkSectStr += "\r\n *-------------------- HANDLE SECTION --------------*\r\n";
|
||||||
|
wrkSectStr += "\r\n " + tmpProcName + " SECTION.";
|
||||||
|
wrkSectStr += "\r\n * Styrs av :" + indexVar;
|
||||||
|
wrkSectStr += "\r\n .";
|
||||||
|
wrkSectStr += "\r\n " + tmpProcName + "-EX.";
|
||||||
|
wrkSectStr += "\r\n EXIT.\r\n";
|
||||||
|
|
||||||
|
}
|
||||||
|
return tmpProcName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void btnFrXMLTo_Click(object sender, EventArgs e)
|
private void btnFrXMLTo_Click(object sender, EventArgs e)
|
||||||
|
|||||||
Reference in New Issue
Block a user