コード例 #1
0
ファイル: PcFieldBase.cs プロジェクト: bhimbolar/WebVella-ERP
        public PcFieldBaseOptions InitPcFieldBaseOptions(PageComponentContext context)
        {
            var options = new PcFieldBaseOptions();

            //Check if it is defined in form group
            if (context.Items.ContainsKey(typeof(LabelRenderMode)))
            {
                options.LabelMode = (LabelRenderMode)context.Items[typeof(LabelRenderMode)];
            }
            else
            {
                options.LabelMode = LabelRenderMode.Stacked;
            }


            //Check if it is defined in form group
            if (context.Items.ContainsKey(typeof(FieldRenderMode)))
            {
                options.Mode = (FieldRenderMode)context.Items[typeof(FieldRenderMode)];
            }
            else
            {
                options.Mode = FieldRenderMode.Form;
            }

            return(options);
        }
コード例 #2
0
 public static PcFieldTextOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldTextOptions {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         MaxLength = null
     });
 }
コード例 #3
0
 public static PcFieldDateTimeOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldDateTimeOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name
     });
 }
コード例 #4
0
 public static PcFieldFileOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldFileOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Accept = ""
     });
 }
コード例 #5
0
 public static PcFieldUrlOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldUrlOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name
     });
 }
コード例 #6
0
 public static PcFieldTextareaOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldTextareaOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Height = ""
     });
 }
コード例 #7
0
 public static PcFieldRadioListOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldRadioListOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Options = ""
     });
 }
コード例 #8
0
 public static PcFieldAutonumberOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldAutonumberOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Template = input.Template
     });
 }
コード例 #9
0
 public static PcFieldPasswordOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldPasswordOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Min = null,
         Max = null
     });
 }
コード例 #10
0
 public static PcFieldCheckboxListOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldCheckboxListOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Options = ""
     });
 }
コード例 #11
0
 public static PcFieldCheckboxOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldCheckboxOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         TextTrue = "",
         TextFalse = ""
     });
 }
コード例 #12
0
 public static PcFieldMultiFileUploadOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldMultiFileUploadOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Accept = ""
     });
 }
コード例 #13
0
 public static PcFieldPhoneOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldPhoneOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         MaxLength = input.MaxLength
     });
 }
コード例 #14
0
ファイル: PcFieldHtml.cs プロジェクト: bhimbolar/WebVella-ERP
 public static PcFieldHtmlOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldHtmlOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         UploadMode = HtmlUploadMode.None,
         ToolbarMode = HtmlToolbarMode.Basic
     });
 }
コード例 #15
0
ファイル: PcFieldCode.cs プロジェクト: bhimbolar/WebVella-ERP
 public static PcFieldCodeOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldCodeOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Height = "120px",
         Language = "razor",
         Theme = "cobalt"
     });
 }
コード例 #16
0
ファイル: PcFieldTime.cs プロジェクト: lulzzz/WebVella-ERP
 public static PcFieldTimeOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldTimeOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Description = input.Description,
         LabelHelpText = input.LabelHelpText
     });
 }
コード例 #17
0
 public static PcFieldPasswordOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldPasswordOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Min = (int?)input.Min,
         Max = (int?)input.Max
     });
 }
コード例 #18
0
 public static PcFieldSelectOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldSelectOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Options = "",
         AjaxDatasource = null
     });
 }
コード例 #19
0
 public static PcFieldCheckboxGridOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return new PcFieldCheckboxGridOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         TextTrue = "",
         TextFalse = ""
     };
 }
コード例 #20
0
 public static PcFieldMultiSelectOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldMultiSelectOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Options = "",
         AjaxDatasource = null,
         SelectMatchingType = WvSelectMatchType.Contains
     });
 }
コード例 #21
0
 public static PcFieldNumberOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldNumberOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Min = input.Min,
         Max = input.Max,
         Step = null,
         DecimalDigits = input.DecimalDigits
     });
 }
コード例 #22
0
 public static PcFieldCurrencyOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldCurrencyOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Min = null,
         Max = null,
         Step = null,
         CurrencyCode = "USD"
     });
 }
コード例 #23
0
 public static PcFieldPercentOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldPercentOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Min = null,
         Max = null,
         Step = null,
         DecimalDigits = 2
     });
 }
コード例 #24
0
ファイル: PcFieldHtml.cs プロジェクト: lulzzz/WebVella-ERP
 public static PcFieldHtmlOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldHtmlOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         UploadMode = HtmlUploadMode.None,
         ToolbarMode = HtmlToolbarMode.Basic,
         Description = input.Description,
         LabelHelpText = input.LabelHelpText
     });
 }
コード例 #25
0
 public static PcFieldCurrencyOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldCurrencyOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Min = input.Min,
         Max = input.Max,
         Step = null,
         CurrencyCode = input.CurrencyCode
     });
 }
コード例 #26
0
 public static PcFieldCheckboxOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldCheckboxOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         TextTrue = "",
         TextFalse = "",
         Description = input.Description,
         LabelHelpText = input.LabelHelpText
     });
 }
コード例 #27
0
 public static PcFieldImageOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldImageOptions
     {
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         TextRemove = "remove",
         TextSelect = "select",
         Accept = "",
         Width = null,
         Height = null,
         ResizeAction = ImageResizeMode.Pad
     });
 }
コード例 #28
0
ファイル: PcFieldPercent.cs プロジェクト: lulzzz/WebVella-ERP
 public static PcFieldPercentOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldPercentOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Min = input.Min,
         Max = input.Max,
         Step = null,
         DecimalDigits = input.DecimalDigits,
         Description = input.Description,
         LabelHelpText = input.LabelHelpText
     });
 }
コード例 #29
0
 public static PcFieldDataCsvOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldDataCsvOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Height = "",
         DelimiterValueDs = "",
         HasHeaderValueDs = "",
         DelimiterFieldName = "",
         HasHeaderFieldName = "",
         LangDs = "en",
     });
 }
コード例 #30
0
 public static PcFieldMultiFileUploadOptions CopyFromBaseOptions(PcFieldBaseOptions input)
 {
     return(new PcFieldMultiFileUploadOptions
     {
         IsVisible = input.IsVisible,
         LabelMode = input.LabelMode,
         LabelText = input.LabelText,
         Mode = input.Mode,
         Name = input.Name,
         Accept = "",
         GetHandlerPrefix = "/fs",
         FileUploadApi = "/fs/upload-file-multiple",
         PathPropName = "path",
         SizePropName = "size",
         NamePropName = "name",
         IconPropName = "icon",
         TimestampPropName = "timestamp",
         AuthorPropName = "author"
     });
 }