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); }
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); }
public void AddProperty(MandatoryField mf) { if (mf != null) { if (this.Properties == null) { this.Properties = new List <MandatoryField>(); } this.Properties.Add(mf); } }