예제 #1
0
        public override string UpdateSettings()
        {
            var PageSize = 5;

            var obj = new GridReportSettings();

            obj.OrderBy      = txtOrderBy.Text;
            obj.AllowSorting = chkAllowSorting.Checked;
            obj.AllowPaging  = chkAllowPaging.Checked;
            if (int.TryParse(txtPageSize.Text, out PageSize))
            {
                obj.PageSize = PageSize;
            }
            else
            {
                obj.PageSize = 5;
            }
            obj.PagerMode                = ddPagerMode.SelectedValue;
            obj.PagerPosition            = ddPagerPosition.SelectedValue;
            obj.PrevPageText             = txtPrevPageText.Text;
            obj.NextPageText             = txtNextPageText.Text;
            obj.EnableExcelExport        = chkEnableExcelExport.Checked;
            obj.ExcelExportButtonCaption = txtExcelExportButtonCaption.Text;
            obj.ExcelExportPosition      = ddExcelExportPosition.SelectedValue;
            obj.HideColumnHeaders        = chkHideColumnHeaders.Checked;
            obj.HideColumns              = txtHideColumns.Text;

            return(Serialization.SerializeObject(obj, typeof(GridReportSettings)));
        }
예제 #2
0
        public override void LoadSettings(string settings)
        {
            var obj = new GridReportSettings();

            if (!string.IsNullOrEmpty(settings))
            {
                obj = (GridReportSettings)(Serialization.DeserializeObject(settings, typeof(GridReportSettings)));
            }

            txtOrderBy.Text                     = obj.OrderBy;
            chkAllowSorting.Checked             = obj.AllowSorting;
            chkAllowPaging.Checked              = obj.AllowPaging;
            txtPageSize.Text                    = obj.PageSize.ToString();
            ddPagerMode.SelectedValue           = obj.PagerMode;
            ddPagerPosition.SelectedValue       = obj.PagerPosition;
            txtPrevPageText.Text                = obj.PrevPageText;
            txtNextPageText.Text                = obj.NextPageText;
            chkEnableExcelExport.Checked        = obj.EnableExcelExport;
            txtExcelExportButtonCaption.Text    = obj.ExcelExportButtonCaption;
            ddExcelExportPosition.SelectedValue = obj.ExcelExportPosition;
            chkHideColumnHeaders.Checked        = obj.HideColumnHeaders;
            txtHideColumns.Text                 = obj.HideColumns;
        }
예제 #3
0
 public override void LoadRuntimeSettings(ReportInfo settings)
 {
     ReportExtra = (GridReportSettings)(Serialization.DeserializeObject(settings.ReportConfig, typeof(GridReportSettings)));
 }