Changed handling of "varying" in Unload and completion code in transfer

This commit is contained in:
2015-08-08 16:02:27 +02:00
parent 105fdd0769
commit 7a48388f23

View File

@ -879,11 +879,11 @@ namespace CobXmlSupport
private void btnGenICodeNew_Click(object sender, EventArgs e) private void btnGenICodeNew_Click(object sender, EventArgs e)
{ {
bool justOut = true; //bool justOut = true;
//bool loopTyp = false; //bool loopTyp = false;
Dictionary<string, string> indexNames = new Dictionary<string, string>(); Dictionary<string, string> indexNames = new Dictionary<string, string>();
string IndVarText = " *--------------------------------------------------*\r\n * Extra indexvariabler för occurs-taggar --------*\r\n *--------------------------------------------------*"; //string IndVarText = " *--------------------------------------------------*\r\n * Extra indexvariabler för occurs-taggar --------*\r\n *--------------------------------------------------*";
string slask = ""; string slask = "";
genCode = new ShowCode(); genCode = new ShowCode();
genCode.Parent = this; genCode.Parent = this;
@ -1204,7 +1204,7 @@ namespace CobXmlSupport
SF.idConnect = "598A5F20-9A8A-415D-81B2-BBFE04465381"; SF.idConnect = "598A5F20-9A8A-415D-81B2-BBFE04465381";
SF.usageName = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Unload"; SF.usageName = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Unload";
SF.fNameSaved = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Unload.cbl"; SF.fNameSaved = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Unload.cbl";
createXMLMoveCode(SF,true); createXMLMoveCode(SF, true);
} }
else else
{ {
@ -2227,11 +2227,13 @@ 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
if (!justOut)
{
fromToMoves.CodeShower.Text += " MOVE " + locTmpQfh.qualCobRow.CountIn + "\r\n" + locTmpQfh.indexRedText; fromToMoves.CodeShower.Text += " MOVE " + locTmpQfh.qualCobRow.CountIn + "\r\n" + locTmpQfh.indexRedText;
fromToMoves.CodeShower.Text += " TO " + fromToMoves.CodeShower.Text += " TO " +
locTmpQfh.qualCobRow.CountIn.ToString().Replace(S.ettingPrefix, S.ettingExpPrefix) + "\r\n" + locTmpQfh.indexRedText; locTmpQfh.qualCobRow.CountIn.ToString().Replace(S.ettingPrefix, S.ettingExpPrefix) + "\r\n" + locTmpQfh.indexRedText;
@ -2257,10 +2259,14 @@ namespace CobXmlSupport
if (!justOut) if (!justOut)
{ {
fromToMoves.CodeShower.Text += " TO " + tmpQfh.ToExpString(); fromToMoves.CodeShower.Text += " TO " + tmpQfh.ToExpString();
if (tmpQfh.qualCobRow.MoveFromCode != null && tmpQfh.qualCobRow.Move_FromCode.Trim().Length > 0)
{
fromToMoves.CodeShower.Text += tmpQfh.qualCobRow.MoveFromCode + "\r\n";
}
} }
else else
{ {
if (tmpQfh.qualCobRow.MoveFromCode != null && tmpQfh.qualCobRow.MoveFromCode.Trim().Length > 0) if (tmpQfh.qualCobRow.MoveFromCode != null && tmpQfh.qualCobRow.Move_FromCode.Trim().Length > 0)
{ {
if (tmpQfh.qualCobRow.MoveFromCode.IndexOf("<?>") > -1 || tmpQfh.qualCobRow.MoveFromCode.IndexOf("<NYPOST>") > -1) if (tmpQfh.qualCobRow.MoveFromCode.IndexOf("<?>") > -1 || tmpQfh.qualCobRow.MoveFromCode.IndexOf("<NYPOST>") > -1)
{ {
@ -2348,8 +2354,8 @@ namespace CobXmlSupport
} }
fromToMoves.Show(); fromToMoves.Show();
//createXMLMoveCode(); //createXMLMoveCode();
//func_exit: ; //func_exit: ;
} }
private void loadResWords() private void loadResWords()