The code now gets correct default and set values for section pagination
This commit is contained in:
parent
57bf9ddc2e
commit
edf38ca662
@ -189,10 +189,13 @@ namespace VEPROMS
|
||||
// ppLblFormatDefault.Text = defName;
|
||||
// ppCmbxFormat.WatermarkText = defName;
|
||||
//}
|
||||
_DefaultNumColumns = _SectionConfig.Section_ColumnMode.ToString();
|
||||
SetupDefault(EnumDescConverter.GetEnumDescription(_SectionConfig.Section_ColumnMode), ppLblDefaultNumColumns, ppCmbxNumColumns);
|
||||
_DefaultPaginationStyle = _SectionConfig.Section_Pagination.ToString();
|
||||
SetupDefault(EnumDescConverter.GetEnumDescription(_SectionConfig.Section_Pagination), ppLblDefPaginationStyle, ppCmbxSectPagination);
|
||||
SectionConfig.SectionColumnMode sc = _SectionConfig.Section_ColumnMode;
|
||||
_DefaultNumColumns = sc.ToString();
|
||||
SetupDefault(EnumDescConverter.GetEnumDescription(sc), ppLblDefaultNumColumns, ppCmbxNumColumns);
|
||||
SectionConfig.SectionPagination sp = _SectionConfig.Section_Pagination;
|
||||
//Console.WriteLine("{0}, {1}, default pagination", _SectionConfig.MySection.DisplayNumber, sp);
|
||||
_DefaultPaginationStyle = sp.ToString();
|
||||
SetupDefault(EnumDescConverter.GetEnumDescription(sp), ppLblDefPaginationStyle, ppCmbxSectPagination);
|
||||
//_DefaultPrintSize = _SectionConfig.Section_AttachmentPrintSize.ToString();
|
||||
//SetupDefault(EnumDescConverter.GetEnumDescription(_SectionConfig.Section_AttachmentPrintSize), ppLblDefaultPrintSize, ppCmbxAccPgPrintSize);
|
||||
|
||||
@ -246,17 +249,33 @@ namespace VEPROMS
|
||||
ppCmbxSectPagination.DisplayMember = "Description";
|
||||
ppCmbxSectPagination.SelectedValueChanged -= new EventHandler(ppCmbxSectPagination_SelectedValueChanged);
|
||||
ppCmbxSectPagination.ValueMember = "EValue";
|
||||
ppCmbxSectPagination.SelectedValueChanged +=new EventHandler(ppCmbxSectPagination_SelectedValueChanged);
|
||||
ppCmbxSectPagination.SelectedIndex = -1;
|
||||
ppCmbxSectPagination.SelectedValue = _SectionConfig.Section_Pagination;
|
||||
SectionConfig.SectionPagination sp = _SectionConfig.Section_Pagination;
|
||||
if (!(sp.ToString().Equals(_DefaultPaginationStyle)))
|
||||
{
|
||||
ppBtnDefaultPaginationStyle.Visible = true;
|
||||
ppCmbxSectPagination.SelectedValue = sp;
|
||||
}
|
||||
else
|
||||
ppBtnDefaultPaginationStyle.Visible = false;
|
||||
|
||||
//Console.WriteLine("{0}, {1}, current pagination", _SectionConfig.MySection.DisplayNumber, ppCmbxSectPagination.SelectedValue);
|
||||
ppCmbxSectPagination.SelectedValueChanged +=new EventHandler(ppCmbxSectPagination_SelectedValueChanged);
|
||||
|
||||
ppCmbxNumColumns.DataSource = EnumDetail<SectionConfig.SectionColumnMode>.Details();
|
||||
ppCmbxNumColumns.DisplayMember = "Description";
|
||||
ppCmbxNumColumns.SelectedValueChanged -= new EventHandler(ppCmbxNumColumns_SelectedValueChanged);
|
||||
ppCmbxNumColumns.ValueMember = "EValue";
|
||||
ppCmbxNumColumns.SelectedValueChanged += new EventHandler(ppCmbxNumColumns_SelectedValueChanged);
|
||||
ppCmbxNumColumns.SelectedIndex = -1;
|
||||
ppCmbxNumColumns.SelectedValue = _SectionConfig.Section_ColumnMode;
|
||||
SectionConfig.SectionColumnMode sc = _SectionConfig.Section_ColumnMode;
|
||||
if (!(sc.ToString().Equals(_DefaultNumColumns)))
|
||||
{
|
||||
ppBtnDefaultNumColumns.Visible = true;
|
||||
ppCmbxNumColumns.SelectedValue = sc;
|
||||
}
|
||||
else
|
||||
ppBtnDefaultNumColumns.Visible = false;
|
||||
ppCmbxNumColumns.SelectedValueChanged += new EventHandler(ppCmbxNumColumns_SelectedValueChanged);
|
||||
|
||||
//ppCmbxAccPgPrintSize.DataSource = EnumDetail<SectionConfig.AttPrintSize>.Details();
|
||||
//ppCmbxAccPgPrintSize.DisplayMember = "Description";
|
||||
|
Loading…
x
Reference in New Issue
Block a user