diff --git a/PROMS/VEPROMS User Interface/frmSectionProperties.cs b/PROMS/VEPROMS User Interface/frmSectionProperties.cs index 9f3450dc..2b367606 100644 --- a/PROMS/VEPROMS User Interface/frmSectionProperties.cs +++ b/PROMS/VEPROMS User Interface/frmSectionProperties.cs @@ -40,6 +40,7 @@ namespace VEPROMS this.Text = string.Format("{0} {1} Properties", ii.DisplayNumber, ii.DisplayText); else this.Text = string.Format("{0} Properties", ii.DisplayText); + ppSectTitleStpRTB.Font = ppSectTitleStpRTB.FormatFont = new System.Drawing.Font("Microsoft Sans Serif", 10F); ppSectTitleStpRTB.FieldToEdit = E_FieldToEdit.Text; ppSectTitleStpRTB.BorderStyle = BorderStyle.Fixed3D; ppSectTitleStpRTB.MyItemInfo = ii; @@ -96,15 +97,15 @@ namespace VEPROMS _SectionConfig.MySection.MyContent.DTS = DateTime.Now; _SectionConfig.MySection.MyContent.UserID = Volian.Base.Library.VlnSettings.UserID; Section mySection = _SectionConfig.MySection.Save(); - FinishSectionSave(mySection); + SaveText(ppSectNumberStpRTB); // save the section number + SaveText(ppSectTitleStpRTB); // save the section title + FinishSectionSave(mySection); // this will also create an empty Word Doc if this is a word section // if there was a document to delete, do it. if (_DocumentToDelete != null) { Document.Delete(_DocumentToDelete.DocID); _DocumentToDelete = null; } - SaveText(ppSectNumberStpRTB); - SaveText(ppSectTitleStpRTB); mySection.Dispose(); this.DialogResult = DialogResult.OK; this.Close(); diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs index 40c90ff9..98cd1602 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocumentExt.cs @@ -332,6 +332,10 @@ namespace VEPROMS.CSLA.Library if (_MyDocument != null) { _MyFile = new FileInfo(string.Format(@"{0}\tmp_{1}{2}{3}", VlnSettings.TemporaryFolder, MyDocument.DocID, Unique, MyDocument.FileExtension)); + while (_MyFile.Exists) + { + _MyFile = new FileInfo(string.Format(@"{0}\tmp_{1}{2}{3}", VlnSettings.TemporaryFolder, MyDocument.DocID, Unique, MyDocument.FileExtension)); + } FileStream fs = _MyFile.Create(); if (MyDocument.DocContent != null) fs.Write(MyDocument.DocContent, 0, MyDocument.DocContent.Length); fs.Close(); diff --git a/PROMS/Volian.Controls.Library/StepPanel.cs b/PROMS/Volian.Controls.Library/StepPanel.cs index 86f3a18c..5fd9ab3f 100644 --- a/PROMS/Volian.Controls.Library/StepPanel.cs +++ b/PROMS/Volian.Controls.Library/StepPanel.cs @@ -397,7 +397,7 @@ namespace Volian.Controls.Library if (lastEI != null && lastEI.BeingDisposed == false) { - bool shouldDelete = !lastEI.BeingRemoved && lastEI.Empty; + bool shouldDelete = !lastEI.BeingRemoved && lastEI.Empty && (lastEI.MyItemInfo.MyContent.ContentEntryCount <= 0); if (shouldDelete) { if (lastEI.HasChildren)