public override void SetParameter(EventBase even)
        {
            ValidateFormDataDev _event = even as ValidateFormDataDev;

            this.txtName.Text          = _event.Name;
            this.txtCode.Text          = _event.Code;
            this.ddlMode.SelectedValue = ((int)_event.ValidateMode).ToString();
        }
 public static void CheckWarning(ValidateFormDataDev entity)
 {
     entity.Warning.Clear();
     if (entity.ValidateMode == ValidateFormDataEvent.EnumValidateFormDataMode.Appoint)
     {
         XmlDocument xmlDocValidateSet = new XmlDocument();
         xmlDocValidateSet.LoadXml(entity.ValidateSetXml);
         XmlNodeList xmlNodeListValidate = xmlDocValidateSet.SelectNodes("ValidateSet/Validate");
         foreach (XmlNode xmlNode in xmlNodeListValidate)
         {
             if (entity.HostFormEntity.Elements.Contains(xmlNode.Attributes["FormElement"].Value.Split('.')[1]) == false)
             {
                 entity.Warning.AddWarningSign(entity, Language.Current.EventDev_ValidateFormDataDev_FormElementNotExist);
             }
         }
     }
 }
Пример #3
0
        public override void SetParameter(EventBase even)
        {
            ValidateFormDataDev _event = even as ValidateFormDataDev;
            XmlDocument         xmlDoc = new XmlDocument();

            xmlDoc.LoadXml(_event.ValidateSetXml);
            XmlNodeList xmlNodeList = xmlDoc.SelectNodes("ValidateSet/Validate");
            DataRow     dr;
            bool        warningRow;

            this.dtFormElement.Rows.Clear();
            foreach (XmlNode xmlNode in xmlNodeList)
            {
                warningRow            = false;
                dr                    = this.dtFormElement.NewRow();
                dr["FormElement"]     = xmlNode.Attributes["FormElement"].Value;
                dr["FormElementName"] =
                    StringParserLogic.DataSourceVisibleString(this.HostAdapter.HostFormEntity, xmlNode.Attributes["FormElement"].Value, out warningRow);
                dr["Warning"] = warningRow;
                this.dtFormElement.Rows.Add(dr);
            }
        }