Edit & Validation Control for DataType "Date"
Наследование: EditControl
Пример #1
0
        void EditDateTime_Init(object sender, EventArgs e)
        {
            _ctlDate = new EditDate();
            _ctlDate.Initialise(FieldTitle, FieldType, FieldId, ModuleId, HelpText, DefaultValue, Required,
                                ValidationRule, ValidationMessage, Style, InputSettings, OutputSettings, NormalizeFlag,
                                MultipleValuesFlag, FilterTags, FilterScript, ListInputType, ModuleContext, FieldSettingsTable, FormEvents);
            Controls.Add(_ctlDate);
            Controls.Add(new LiteralControl("  "));
            var ctlTimeLbl = new Label
            {
                Text     = string.Format("{0}: ", Localization.GetString("Time", LocalResourceFile)),
                CssClass = "SubHead"
            };

            Controls.Add(ctlTimeLbl);
            _ctlTime = new EditTime();
            _ctlTime.Initialise(FieldTitle, FieldType, FieldId, ModuleId, HelpText, DefaultValue, Required,
                                ValidationRule, ValidationMessage, Style, InputSettings, OutputSettings, NormalizeFlag,
                                MultipleValuesFlag, FilterTags, FilterScript, ListInputType, ModuleContext, FieldSettingsTable, FormEvents);
            Controls.Add(_ctlTime);
            _convertTimezone = GetFieldSetting("ConvertToUserDateTime").AsBoolean();
            Value            = DefaultValue;
        }
Пример #2
0
 void EditDateTime_Init(object sender, EventArgs e)
 {
     _ctlDate = new EditDate();
     _ctlDate.Initialise(FieldTitle, FieldType, FieldId, ModuleId, HelpText, DefaultValue, Required,
                        ValidationRule, ValidationMessage, Style, InputSettings, OutputSettings, NormalizeFlag,
                        MultipleValuesFlag, FilterTags, FilterScript, ListInputType, ModuleContext, FieldSettingsTable, FormEvents );
     Controls.Add(_ctlDate);
     Controls.Add(new LiteralControl("  "));
     var ctlTimeLbl = new Label
                          {
                              Text = string.Format("{0}: ", Localization.GetString("Time", LocalResourceFile)),
                              CssClass = "SubHead"
                          };
     Controls.Add(ctlTimeLbl);
     _ctlTime = new EditTime();
     _ctlTime.Initialise(FieldTitle, FieldType, FieldId, ModuleId, HelpText, DefaultValue, Required,
                        ValidationRule, ValidationMessage, Style, InputSettings, OutputSettings, NormalizeFlag,
                        MultipleValuesFlag, FilterTags, FilterScript, ListInputType, ModuleContext,  FieldSettingsTable, FormEvents );
     Controls.Add(_ctlTime);
     _convertTimezone = GetFieldSetting("ConvertToUserDateTime").AsBoolean();
     Value = DefaultValue;
 }