Example #1
0
        private static void SetFrequencyValue(DetailsSaveFieldModel field, IEditableRoot editableRoot)
        {
            var model = field.Value as FrequencyModel;

            if (model != null)
            {
                FrequencyFieldOptions settings = null;
                if (field.Settings != null)
                {
                    settings = field.Settings.ToObject<FrequencyFieldOptions>();
                }

                editableRoot.SetFrequencyInfo(
                    field.SystemName,
                    new FrequencyInfo(GetFrequencyName(model, settings), model.FrequencyType.ToString(), model.FrequencyHours, model.SelectedEvent));
            }
        }