Added checkboxes for Placekeepers and Phonelist

Supporting logic to save/retrieve Placekeeper and Phonelist information
Supporting logic to save/retrieve Placekeeper information
Added Placekeeper logic
Null reference fix
Logic to get PrintPhoneList flag
Rearranged the panel and added Placekeeper checkbox
This commit is contained in:
2014-04-08 21:02:43 +00:00
parent c926ddbe60
commit d41c675f6e
9 changed files with 610 additions and 462 deletions

View File

@@ -124,7 +124,8 @@ namespace VEPROMS
myStepRTB.ClearUndo();
}
}
private static void FinishSectionSave(Section section)
//private static void FinishSectionSave(Section section)
private void FinishSectionSave(Section section)
{
ItemInfo sectinfo = ItemInfo.Get(section.ItemID);
@@ -140,7 +141,8 @@ namespace VEPROMS
break;
}
}
if (isWordSect && !sectinfo.HasWordContent && !sectinfo.IsAutoTOCSection)
if (isWordSect && !sectinfo.HasWordContent && !sectinfo.IsAutoTOCSection &&
(!sectinfo.IsPlacekeeperSection || (sectinfo.IsPlacekeeperSection && !ppCbPlaceKeeper.Checked)))
{
using (Content cont = Content.Get(sectinfo.MyContent.ContentID))
{
@@ -308,6 +310,22 @@ namespace VEPROMS
}
if (!_SectionConfig.MySection.MySectionInfo.IsStepSection)
cbKeepWordDocMargins.Checked = _SectionConfig.Section_WordMargin == "Y";
if ((pf.FormatData.PurchaseOptions & E_PurchaseOptions.AutoPlacekeeper) == E_PurchaseOptions.AutoPlacekeeper)
{
ppCbPlaceKeeper.Text = "Include In Placekeeper";
ppCbPlaceKeeper.Enabled = _isStepSection;
if (!_isStepSection && (_SectionConfig.MySection.MySectionInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.Placekeeper) == E_DocStructStyle.Placekeeper)
{
ppCbPlaceKeeper.Text = "Auto Generate Placekeeper";
ppCbPlaceKeeper.Enabled = true;
}
if (ppCbPlaceKeeper.Enabled) ppCbPlaceKeeper.Checked = _SectionConfig.Section_Placekeeper == "Y";
}
if (pf.FormatData.SectData.PrintPhoneList)
{
ppCbPhoneList.Enabled = true;
ppCbPhoneList.Checked = _SectionConfig.Section_PhoneList == "Y";
}
_Initializing = false;
}
@@ -687,6 +705,7 @@ namespace VEPROMS
/// </summary>
private void defaultSettingsVisiblity()
{
//ItemInfo ii = ItemInfo.Get(_SectionConfig.MySection.ItemID);
ppLblDefSettingsInfo.Visible = ppCbShwDefSettings.Checked;
ppLblFormatDefault.Visible = ppCbShwDefSettings.Checked && ppBtnDefaultFmt.Visible;
ppLblDefaultNumColumns.Visible = _isStepSection && ppCbShwDefSettings.Checked && ppBtnDefaultNumColumns.Visible;
@@ -899,6 +918,18 @@ namespace VEPROMS
_SectionConfig.Section_WordMargin = doWordMargin ? "Y" : "N";
}
private void ppCbPlaceKeeper_CheckedChanged(object sender, EventArgs e)
{
if (!_Initializing)
_SectionConfig.Section_Placekeeper = ppCbPlaceKeeper.Checked ? "Y" : "N";
}
private void ppCbPhoneList_CheckedChanged(object sender, EventArgs e)
{
if (!_Initializing)
_SectionConfig.Section_PhoneList = ppCbPhoneList.Checked ? "Y" : "N";
}
//private void ppBtnDefaultPrintSize_Click(object sender, EventArgs e)
//{
// // Get the parent setting