Esempio n. 1
0
        public void AddRows(string property, string message = null, string control = null)
        {
            MandatoryField mf = new MandatoryField();

            mf.FieldName = property;

            if (message != null)
            {
                mf.MandatoryMessage = message;
            }
            else
            {
                mf.MandatoryMessage = property;
            }

            if (control != null)
            {
                mf.ControlName = control;
            }
            else
            {
                mf.ControlName = property;
            }

            if (this.Rows == null)
            {
                this.Rows = new List <MandatoryField>();
            }
            this.Rows.Add(mf);
        }
Esempio n. 2
0
        public void AddProperty(string property, string message = null, string control = null)
        {
            MandatoryField mf = new MandatoryField();

            mf.FieldName = property;

            if (message != null)
            {
                mf.MandatoryMessage = message;
            }
            else
            {
                mf.MandatoryMessage = property;
            }

            if (control != null)
            {
                mf.ControlName = control;
            }
            else
            {
                mf.ControlName = property;
            }

            AddProperty(mf);
        }
Esempio n. 3
0
 public void AddProperty(MandatoryField mf)
 {
     if (mf != null)
     {
         if (this.Properties == null)
         {
             this.Properties = new List <MandatoryField>();
         }
         this.Properties.Add(mf);
     }
 }