Enhanced Documents for Procedures – add checkbox

Enhanced Documents for Sections – add radiobox
Enhanced Documents – set sync checkbox
This commit is contained in:
2016-01-20 16:33:09 +00:00
parent 58d52eefc0
commit 33850f59c1
5 changed files with 1527 additions and 1320 deletions

View File

@@ -71,6 +71,7 @@ namespace VEPROMS
_ProcedureConfig.MyProcedure.Save().Dispose();
SaveText(ppProcTitleStpRTB);
SaveText(ppProcNumStpRTB);
_ProcedureConfig.MyProcedure.MyProcedureInfo.CreateEnhanced = cbEnhanced.Checked;
DialogResult = DialogResult.OK;
this.Close();
}
@@ -90,6 +91,7 @@ namespace VEPROMS
private void ppBtnCancel_Click(object sender, EventArgs e)
{
procedureConfigBindingSource.CancelEdit();
_ProcedureConfig.MyProcedure.MyProcedureInfo.CreateEnhanced = false;
this.DialogResult = DialogResult.Cancel;
this.Close();
}
@@ -210,6 +212,19 @@ namespace VEPROMS
ppCmbxStpEditorCols.ValueMember = "EValue";
ppCmbxStpEditorCols.SelectedIndex = -1;
// if the associated DocVersion has Enhanced, make the Enhanced checkbox visible
cbEnhanced.Visible = false;
DocVersionConfig dvc = _ProcedureConfig.MyProcedure.MyProcedureInfo.MyDocVersion.MyConfig as DocVersionConfig;
if (dvc != null && dvc.MyEnhancedDocuments != null && dvc.MyEnhancedDocuments.Count > 0)
{
if (dvc.MyEnhancedDocuments.Count > 1 || dvc.MyEnhancedDocuments[0].Type != 0)
{
cbEnhanced.Visible = true;
// if this procedure has enhanced data, the checkbox should not be editable:
cbEnhanced.Enabled = !(_ProcedureConfig.MyEnhancedDocuments != null && _ProcedureConfig.MyEnhancedDocuments.Count > 0);
cbEnhanced.Checked = (_ProcedureConfig.MyEnhancedDocuments != null && _ProcedureConfig.MyEnhancedDocuments.Count > 0);
}
}
_Initializing = false;
}