Пример #1
0
        private void AddReportParameter(ref string url, string name, object?value)
        {
            if (url == null)
            {
                throw new ArgumentNullException(nameof(url));
            }
            string paramPrefix = "";

            if (ReportServerURL != null && ReportServerURL.Contains("RSViewerPage.aspx") &&
                !name.StartsWith("rs:") &&
                !name.StartsWith("rc:") &&
                !name.StartsWith("rp:"))
            {
                paramPrefix = "rp:";
            }
            if (url.Contains("?"))
            {
                url += "&";
            }
            else
            {
                url += "?";
            }

            if (value == null)
            {
                url += paramPrefix + name + ":IsNull=True";
                return;
            }
            else
            {
                string?strValue = GetStringOfValue(value) ?? "";
                url += String.Format("{0}={1}", paramPrefix + name, System.Uri.EscapeUriString(strValue));
            }
        }
Пример #2
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// LoadSettings loads the settings from the Database and displays them
        /// </summary>
        /// -----------------------------------------------------------------------------
        public override void LoadSettings()
        {
            try
            {
                if (Page.IsPostBack == false)
                {
                    GetPortalRoles();

                    if (EnableDiscount != null)
                    {
                        if (EnableDiscount.ToString().Length > 0)
                        {
                            CbxEnableDiscount.Checked = Convert.ToBoolean(EnableDiscount.ToString());
                        }
                    }

                    if (ShowPriceOnCheckout != null)
                    {
                        if (ShowPriceOnCheckout.ToString().Length > 0)
                        {
                            CbxShowPriceOnCheckout.Checked = Convert.ToBoolean(ShowPriceOnCheckout.ToString());
                        }
                    }

                    if (DisplayRemains != null)
                    {
                        if (DisplayRemains.ToString().Length > 0)
                        {
                            CbxDisplayRemains.Checked = Convert.ToBoolean(DisplayRemains.ToString());
                        }
                    }

                    if (RoleName != null)
                    {
                        ddlRoles.SelectedValue = RoleName;
                    }
                    if (PageSize > 0)
                    {
                        ddlPageSize.SelectedValue = PageSize.ToString();
                    }
                    if (EmailMessage != null)
                    {
                        txtEmailMessage.Text = EmailMessage;
                    }
                    if (EmailFrom != null)
                    {
                        txtEmailFrom.Text = EmailFrom;
                    }

                    if (EmailNotify != null)
                    {
                        txtEmailNotify.Text = EmailNotify;
                    }

                    if (EmailBCC != null)
                    {
                        txtEmailBCC.Text = EmailBCC;
                    }

                    if (EmailSubject != null)
                    {
                        txtEmailSubject.Text = EmailSubject;
                    }



                    if (ReportServerURL != null)
                    {
                        txturlReportServer.Text = ReportServerURL.ToString();
                    }

                    if (ReportPath != null)
                    {
                        txtReportPath.Text = ReportPath.ToString();
                    }

                    if (ReportCredentialsUserName != null)
                    {
                        txtRSCredentialsUserName.Text = ReportCredentialsUserName.ToString();
                    }

                    if (ReportCredentialsPassword != null)
                    {
                        txtRSCredentialsPassword.Text = ReportCredentialsPassword.ToString();
                    }
                    if (ReportCredentialsDomain != null)
                    {
                        txtRSCredentialsDomain.Text = ReportCredentialsDomain.ToString();
                    }
                    if (jQueryUI != null)
                    {
                        txtjQueryUI.Text = jQueryUI.ToString();
                    }

                    if (ImagePath != null)
                    {
                        txtImagePath.Text = ImagePath.ToString();
                    }

                    if (WallImage != null)
                    {
                        txtWallImage.Text = WallImage.ToString();
                    }
                }
            }
            catch (Exception exc) //Module failed to load
            {
                Exceptions.ProcessModuleLoadException(this, exc);
            }
        }