Beispiel #1
0
        //private void ConvertDeptField(XmlElement output)
        //{
        //    DeptLookup lookup = Context.Extensions[DeptLookup.Name] as DeptLookup;

        //    foreach (XmlElement each in output.SelectNodes("Class"))
        //    {
        //        string name = each.SelectSingleNode("DepartmentName").InnerText;
        //        XmlElement newNode = CreateChild(each, "RefDeptID");
        //        newNode.InnerText = lookup.GetDeptID(name);
        //    }
        //}

        private void ConvertGraduationPlanField(XmlElement output)
        {
            GPLookup lookup = Context.Extensions[GPLookup.Name] as GPLookup;

            foreach (XmlElement each in output.SelectNodes("Class"))
            {
                string     name    = each.SelectSingleNode("GraduationPlan").InnerText;
                XmlElement newNode = CreateChild(each, "RefGraduationPlanID");
                newNode.InnerText = lookup.GetGraduationPlanID(name);
            }
        }
        public void InitFromXMLNode(System.Xml.XmlElement XmlNode)
        {
            _skip_empty = bool.Parse(XmlNode.GetAttribute("SkipEmpty"));

            _activate_validator = false;
            foreach (XmlElement each in XmlNode.SelectNodes("ActivatorField"))
            {
                string fieldName = each.InnerText;
                _activate_validator |= (_context.SelectedFields.Contains(fieldName));
            }

            if (!_activate_validator)
            {
                return;
            }

            _lookup = _context.Extensions[GPLookup.Name] as GPLookup;
        }