Example #1
0
 public BaseVM(BaseVM parent)
 {
     this.Parent = parent;
     propertyValidators = new Dictionary<string, PropertyValidator>();
     foreach (PropertyInfo propertyInfo in this.GetType().GetProperties())
     {
         ValidationAttribute[] vas = GetValidationAttributes(propertyInfo);
         if (vas.Length > 0 && propertyInfo.GetGetMethod() != null)
         {
             PropertyValidator validator = new PropertyValidator(propertyInfo.Name, propertyInfo.GetGetMethod(), vas);
             propertyValidators[propertyInfo.Name] = validator;
         }
     }
 }
Example #2
0
 public BaseVM(BaseVM parent)
 {
     this.Parent        = parent;
     propertyValidators = new Dictionary <string, PropertyValidator>();
     foreach (PropertyInfo propertyInfo in this.GetType().GetProperties())
     {
         ValidationAttribute[] vas = GetValidationAttributes(propertyInfo);
         if (vas.Length > 0 && propertyInfo.GetGetMethod() != null)
         {
             PropertyValidator validator = new PropertyValidator(propertyInfo.Name, propertyInfo.GetGetMethod(), vas);
             propertyValidators[propertyInfo.Name] = validator;
         }
     }
 }
Example #3
0
 public CondGroupVM DeepCopy(BaseVM parent)
 {
     CondGroupVM newCondGroup = new CondGroupVM();
     newCondGroup.Parent = parent;
     foreach (CondVM cond in Conds)
     {
         CondVM newCond = cond.DeepCopy(newCondGroup);
         newCondGroup.Conds.Add(newCond);
     }
     return newCondGroup;
 }
Example #4
0
 public CheckOptionVM(BaseVM parent, CheckOption checkOption) : base(parent)
 {
     this.checkOption = checkOption;
 }
Example #5
0
 public CondVM DeepCopy(BaseVM parent)
 {
     CondVM newCond = new CondVM();
     newCond.Parent = parent;
     newCond.SelectedQuestionConstruct = SelectedQuestionConstruct;
     newCond.selectedOperatorCode = SelectedOperatorCode;
     newCond.CondValue = CondValue;
     return newCond;
 }
Example #6
0
 public CheckOptionVM(BaseVM parent, CheckOption checkOption)
     : base(parent)
 {
     this.checkOption = checkOption;
 }