public virtual bool LoadFromConfig(XmlNode node)
        {
            try
            {
                if (node.NodeType == XmlNodeType.Comment)
                {
                    return(true);
                }

                var level1Item = (XmlElement)node;

                var strProductType = level1Item.GetAttribute("ProductType");

                ProductType = (ProductType)CustomizedTypeManager.GetCustomizedType(strProductType);


                return(true);
            }
            catch (Exception ex)
            {
                Log.Error($"加载OrderList {ResourceName}出错:{ex.Message}");
                return(false);
            }
        }
Exemple #2
0
    protected void Page_Init(object sender, EventArgs e)
    {
        if (PX.Translation.ResourceCollectingManager.IsStringCollecting)
        {
            return;
        }

        AddFileControls();

        PX.Data.PXCacheRights rights;
        List <string>         invisible = null;
        List <string>         disabled  = null;

        if (!PXAccess.FeatureInstalled <PX.Objects.CS.FeaturesSet.outlookIntegration>())
        {
            this.RedirectToError(Messages.OutlookFeatureNotInstalled, true);
        }

        var node = PX.Data.PXSiteMap.Provider.FindSiteMapNode(this.Request.RawUrl) as PX.Data.PXSiteMapNode;

        if (node == null)
        {
            this.RedirectToError(Messages.AccessToAddInHasBeenDenied, true);
        }

        PXSiteMapNode nodeForAddInGraph = PXSiteMap.Provider.FindSiteMapNodeByGraphType(CustomizedTypeManager.GetTypeNotCustomized(typeof(OUSearchMaint).FullName));

        if (nodeForAddInGraph == null)
        {
            this.RedirectToError(Messages.AccessToAddInHasBeenDenied, true);
        }

        Page.Header.Controls.Add(
            new System.Web.UI.LiteralControl("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + ResolveUrl("~/Content/fabric.min.css") + "\" />"));
        Page.Header.Controls.Add(
            new System.Web.UI.LiteralControl("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + ResolveUrl("~/Content/fabric.components.min.css") + "\" />"));

        this.Master.FindControl("usrCaption").Visible = false;
        this.ClientScript.RegisterClientScriptInclude(this.GetType(), "msd", "/Scripts/modernizr-2.8.3.js");
        this.ClientScript.RegisterClientScriptInclude(this.GetType(), "ms", "//appsforoffice.microsoft.com/lib/1.1/hosted/office.js");
        //this.ClientScript.RegisterClientScriptInclude(this.GetType(), "ms", VirtualPathUtility.ToAbsolute("~/Scripts/Office/1/office.debug.js"));
        this.ClientScript.RegisterHiddenField(_outlookEmail, null);
        this.ClientScript.RegisterHiddenField(_outlookDisplayName, null);
        this.ClientScript.RegisterHiddenField(_outlookFirstName, null);
        this.ClientScript.RegisterHiddenField(_outlookLastName, null);
        this.ClientScript.RegisterHiddenField(_outlookIsIncome, null);

        this.ClientScript.RegisterHiddenField(_outlookEwsUrl, null);
        this.ClientScript.RegisterHiddenField(_outlookAttachemntInfo, null);
        this.ClientScript.RegisterHiddenField(_outlookAttachmentToken, null);

        _messageFields.ForEach(f => this.ClientScript.RegisterHiddenField(oums + f, null));
        this.ClientScript.RegisterHiddenField("suppressReloadPage", 1.ToString());
    }