protected override void CreateChildControls()
        {
            if (RenderLink)
            {
                var link = new HtmlAnchor {InnerText = Text, HRef = "#"};
                link.Attributes.Add("onclick", "ImportUsersManager.ShowImportControl();");
                if (!string.IsNullOrEmpty(LinkStyle))
                    link.Attributes.Add("class", LinkStyle);

                Controls.Add(link);
            }
            Controls.Add(Page.LoadControl(ImportUsersTemplate.Location));
            _users = new ImportUsers();
            _users = (ImportUsers)_users.LoadControl(ImportUsers.Location);

            Controls.Add(new LiteralControl("<div id=\"importAreaBlock\" class=\"importAreaBlock\" style=\"display:none\">"));

            _localContainer = new Container { Body = new PlaceHolder(), Header = new PlaceHolder() };
            _localContainer.Body.Controls.Add(_users);
            var html = new HtmlGenericControl("DIV") { InnerHtml = CustomNamingPeople.Substitute<Resources.Resource>("ImportContactsHeader").HtmlEncode() };
            _localContainer.Header.Controls.Add(html);
            Controls.Add(_localContainer);
            Controls.Add(new LiteralControl("</div>"));


            Controls.Add(Page.LoadControl(TariffLimitExceed.Location));

            base.CreateChildControls();

            ChildControlsCreated = true;
        }
예제 #2
0
        protected override void CreateChildControls()
        {
            if (RenderLink)
            {
                var link = new HtmlAnchor {
                    InnerText = Text, HRef = "#"
                };
                link.Attributes.Add("onclick", "ImportUsersManager.ShowImportControl();");
                if (!string.IsNullOrEmpty(LinkStyle))
                {
                    link.Attributes.Add("class", LinkStyle);
                }

                Controls.Add(link);
            }
            Controls.Add(Page.LoadControl(ImportUsersTemplate.Location));
            _users = new ImportUsers();
            _users = (ImportUsers)_users.LoadControl(ImportUsers.Location);

            Controls.Add(new LiteralControl("<div id=\"importAreaBlock\" class=\"importAreaBlock\" style=\"display:none\">"));

            _localContainer = new Container {
                Body = new PlaceHolder(), Header = new PlaceHolder()
            };
            _localContainer.Body.Controls.Add(_users);
            var html = new HtmlGenericControl("DIV")
            {
                InnerHtml = CustomNamingPeople.Substitute <Resources.Resource>("ImportContactsHeader").HtmlEncode()
            };

            _localContainer.Header.Controls.Add(html);
            Controls.Add(_localContainer);
            Controls.Add(new LiteralControl("</div>"));

            _importedContainer = new Container {
                Body = new PlaceHolder(), Header = new PlaceHolder()
            };
            var html1 = new HtmlGenericControl("DIV")
            {
                InnerHtml = Resources.Resource.FinishImportUserTitle
            };
            var html2 = new HtmlGenericControl("DIV")
            {
                InnerHtml = CustomNamingPeople.Substitute <Resources.Resource>("ImportContactsHeader").HtmlEncode()
            };

            _importedContainer.Body.Controls.Add(html1);
            _importedContainer.Header.Controls.Add(html2);

            Controls.Add(new LiteralControl("<div id=\"successImportedArea\">"));
            Controls.Add(_importedContainer);
            Controls.Add(new LiteralControl("</div>"));

            Controls.Add(Page.LoadControl(TariffLimitExceed.Location));

            base.CreateChildControls();

            ChildControlsCreated = true;
        }