示例#1
0
        private void UpdateScoreLabel(HttpContext context)
        {
            // Get the source string from the http request's parameters.
            string source = context.Request.Params["Source"];

            string xPath = context.Request.Params["XPath"];

            string label = context.Request.Params["Value"];

            DefinitionObject item = new DefinitionObject(Global.Core, source, xPath);

            // Set the default for the language to english GB.
            int idLanguage = 2057;

            // Check if a specific language is defined.
            if (context.Request.Params["IdLanguage"] != null)
            {
                idLanguage = int.Parse(context.Request.Params["IdLanguage"]);
            }

            item.SetLabel(idLanguage, label);

            item.Save();
        }
示例#2
0
        private void UpdateScoreGroupName(HttpContext context)
        {
            string path = context.Request.Params["Path"];

            string name = context.Request.Params["Value"];

            // Get the source string from the http request's parameters.
            string source = context.Request.Params["Source"];

            // Set the default for the language to english GB.
            int idLanguage = 2057;

            // Check if a specific language is defined.
            if (context.Request.Params["IdLanguage"] != null)
            {
                idLanguage = int.Parse(context.Request.Params["IdLanguage"]);
            }

            DefinitionObject score = new DefinitionObject(Global.Core, source, path);

            score.SetLabel(idLanguage, name);

            score.Save();
        }