Merge pull request 'B2025-010 PROMS – Change ID Issues' (#500) from B2025-010 into Development

good for testing phase
This commit is contained in:
John Jenko 2025-01-28 09:05:28 -05:00
commit a04def360d
3 changed files with 839 additions and 823 deletions

View File

@ -105,7 +105,7 @@ namespace VEPROMS.CSLA.Library
if (tmp._MyContent != null) if (tmp._MyContent != null)
{ {
ContentInfo.Refresh(tmp._MyContent); ContentInfo.Refresh(tmp._MyContent);
if (tmp._MyContent.MyImage != null) ImageInfo.Refresh(tmp._MyContent.MyImage); if (tmp._MyContent?.MyImage != null) ImageInfo.Refresh(tmp._MyContent.MyImage);
} }
ItemInfo.Refresh(tmp); ItemInfo.Refresh(tmp);
} }

File diff suppressed because it is too large Load Diff

View File

@ -142,6 +142,7 @@ namespace Volian.Controls.Library
tbChgID.Text = ""; tbChgID.Text = "";
tbChgID.Enabled = false; tbChgID.Enabled = false;
lblChgId.Visible = tbChgID.Visible = false; lblChgId.Visible = tbChgID.Visible = false;
btnSaveChangeID.Enabled = btnSaveChangeID.Visible = false;
CurItemInfo = null; CurItemInfo = null;
cbInitialLine.Visible = cbInitialLine.Enabled = false; cbInitialLine.Visible = cbInitialLine.Enabled = false;
@ -521,9 +522,10 @@ namespace Volian.Controls.Library
tbChgID.Text = sc1.Step_ChangeID; tbChgID.Text = sc1.Step_ChangeID;
tbChgID.Enabled = true; tbChgID.Enabled = true;
lblChgId.Visible = tbChgID.Visible = true; lblChgId.Visible = tbChgID.Visible = true;
btnSaveChangeID.Enabled = btnSaveChangeID.Visible = true;
} }
else else
lblChgId.Visible = tbChgID.Visible = false; lblChgId.Visible = tbChgID.Visible = btnSaveChangeID.Enabled = btnSaveChangeID.Visible = false;
// Walk up tree until this step type's parentType is "Base". Start adding menuitems from this step type. // Walk up tree until this step type's parentType is "Base". Start adding menuitems from this step type.
StepData top = fmtdata.StepDataList[formatSteptype]; StepData top = fmtdata.StepDataList[formatSteptype];
@ -903,18 +905,6 @@ namespace Volian.Controls.Library
} }
#endregion #endregion
private void tbChgID_TextChanged(object sender, EventArgs e)
{
MyEditItem.SaveContents();
StepConfig sc = CurItemInfo.MyConfig as StepConfig;
// if the changeID changed, then reset the change bar override
// B2021-029: don't change changeid if the config & text box are both empty
if (sc.Step_ChangeID != tbChgID.Text && sc.Step_ChangeID != null && tbChgID.Text != "")
{
sc.Step_ChangeID = tbChgID.Text;
sc.Step_CBOverride = null;
}
}
#region WCNTRN format #region WCNTRN format
// The following supports the Wolf Creek Training format/Responsibility data // The following supports the Wolf Creek Training format/Responsibility data
// off of the High Level Step // off of the High Level Step
@ -1037,25 +1027,41 @@ namespace Volian.Controls.Library
} }
//private void txbxAltConActSumText_Leave(object sender, EventArgs e) //B2025-010 PROMS -Fixed issues updating Changeid
//{ // Changed to a Save button instead of onTextChanged
// // User left Atlernate Continuous Action Text field. If text changed, then prompt // Also was issue where sometimes would lave last character / digit (not allowing the change id to be completely removed)
// // to see if save should occur. private void btnSaveChangeID_Click(object sender, EventArgs e)
// StepConfig sc = CurItemInfo.MyConfig as StepConfig; {
// if (sc == null) return; MyEditItem.SaveContents();
// bool bothEmpty = (sc.Step_AlternateContActSumText == null || sc.Step_AlternateContActSumText == "") && (txbxAltConActSumText.Text == null || txbxAltConActSumText.Text == ""); StepConfig sc = CurItemInfo.MyConfig as StepConfig;
// if (!bothEmpty && sc.Step_AlternateContActSumText != txbxAltConActSumText.Text) // if the changeID changed, then reset the change bar override
// { // B2021-029: don't change changeid if the config & text box are both empty
// if (MessageBox.Show(this, "Do you want to save the Alternate Continuous Action Text?", "Confirm Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) if (sc.Step_ChangeID != tbChgID.Text && (!string.IsNullOrEmpty(sc.Step_ChangeID) || !string.IsNullOrEmpty(tbChgID.Text)))
// { {
// MyEditItem.SaveContents(); sc.Step_ChangeID = tbChgID.Text;
// sc.Step_AlternateContActSumText = txbxAltConActSumText.Text; // this actually saves the config sc.Step_CBOverride = null;
// } }
// else }
// txbxAltConActSumText.Text = sc.Step_AlternateContActSumText;
// }
//} //private void txbxAltConActSumText_Leave(object sender, EventArgs e)
//{
// // User left Atlernate Continuous Action Text field. If text changed, then prompt
// // to see if save should occur.
// StepConfig sc = CurItemInfo.MyConfig as StepConfig;
// if (sc == null) return;
// bool bothEmpty = (sc.Step_AlternateContActSumText == null || sc.Step_AlternateContActSumText == "") && (txbxAltConActSumText.Text == null || txbxAltConActSumText.Text == "");
// if (!bothEmpty && sc.Step_AlternateContActSumText != txbxAltConActSumText.Text)
// {
// if (MessageBox.Show(this, "Do you want to save the Alternate Continuous Action Text?", "Confirm Save", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
// {
// MyEditItem.SaveContents();
// sc.Step_AlternateContActSumText = txbxAltConActSumText.Text; // this actually saves the config
// }
// else
// txbxAltConActSumText.Text = sc.Step_AlternateContActSumText;
// }
} //}
}
} }