예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(this.GetType());

            Page.RegisterBodyScripts(ResolveUrl("~/usercontrols/management/namingpeoplesettings/js/namingpeoplecontent.js"));
            Page.RegisterStyleControl(VirtualPathUtility.ToAbsolute("~/usercontrols/management/namingpeoplesettings/css/namingpeople.less"));

            var schemas         = new List <object>();
            var currentSchemaId = CustomNamingPeople.Current.Id;

            foreach (var schema in CustomNamingPeople.GetSchemas())
            {
                schemas.Add(new
                {
                    Id      = schema.Key,
                    Name    = schema.Value,
                    Current = string.Equals(schema.Key, currentSchemaId, StringComparison.InvariantCultureIgnoreCase)
                });
            }

            namingSchemaRepeater.DataSource = schemas;
            namingSchemaRepeater.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            AjaxPro.Utility.RegisterTypeForAjax(this.GetType());
            Page.ClientScript.RegisterClientScriptInclude(typeof(string), "peoplenamecontent_script", WebPath.GetPath("usercontrols/management/namingpeoplesettings/js/namingpeoplecontent.js"));
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "namingpeoplecontent_style", "<link rel=\"stylesheet\" type=\"text/css\" href=\"" + WebSkin.GetUserSkin().GetAbsoluteWebPath("usercontrols/management/namingpeoplesettings/css/<theme_folder>/namingpeople.css") + "\">", false);


            var schemas         = new List <object>();
            var currentSchemaId = CustomNamingPeople.Current.Id;

            foreach (var schema in CustomNamingPeople.GetSchemas())
            {
                schemas.Add(new
                {
                    Id      = schema.Key,
                    Name    = schema.Value,
                    Current = string.Equals(schema.Key, currentSchemaId, StringComparison.InvariantCultureIgnoreCase)
                });
            }

            namingSchemaRepeater.DataSource = schemas;
            namingSchemaRepeater.DataBind();
        }