コード例 #1
0
ファイル: DateEditorAttribute.cs プロジェクト: dpawatts/zeus
        protected override Control AddEditor(Control container)
        {
            CompositeField placeHolder = new CompositeField();

            DateField tb = new DateField();
            tb.ID = Name;
            if (Required)
            {
                tb.AllowBlank = false;
                tb.Cls = "required";
            }
            placeHolder.Items.Add(tb);

            if (IncludeTime)
            {
                TimeField timeField = new TimeField();
                timeField.ID = Name + "Time";
                timeField.Width = 70;
                if (Required)
                {
                    timeField.AllowBlank = false;
                    timeField.Cls += " required";
                }
                placeHolder.Items.Add(timeField);
            }

            container.Controls.Add(placeHolder);
            container.Controls.Add(new LiteralControl("<br />"));

            return placeHolder;
        }
コード例 #2
0
 /// <summary>
 ///
 /// </summary>
 public CompositeField.Builder CompositeField(CompositeField component)
 {
     return(new CompositeField.Builder(component));
 }