Esempio n. 1
0
        private static void UpdateModelDefaultValues(IEditableRoot model)
        {
            using (new BypassPropertyCheckContext())
            {
                foreach (var prop in model.GetAllPropertiesByFieldType(ColumnTypes.SampleType))
                {
                    var value = model.GetValueByPropertyName(prop.Name);
                    if (string.IsNullOrWhiteSpace(value))
                    {
                        model.SetValueByPropertyName(prop.Name, SampleTypes.Number.ToString());
                    }
                }

                //ELMTSUP 2512
                //foreach (var prop in model.GetAllPropertiesByFieldType(ColumnTypes.SamplingTechnique))
                //{
                //    var value = model.GetValueByPropertyName(prop.Name);
                    //if (string.IsNullOrWhiteSpace(value))
                    //{
                    //    model.SetValueByPropertyName(prop.Name, SampleSizeTypes.Fixed.ToString());
                    //}
                //}
            }
        }