public static HtmlBuilder TimeSeries(
     this HtmlBuilder hb,
     Context context,
     SiteSettings ss,
     Column groupBy,
     string aggregationType,
     Column value,
     IEnumerable <DataRow> dataRows,
     bool inRange)
 {
     return(hb.Div(css: "both", action: () => hb
                   .FieldDropDown(
                       context: context,
                       controlId: "TimeSeriesGroupBy",
                       fieldCss: "field-auto-thin",
                       controlCss: " auto-postback",
                       labelText: Displays.GroupBy(context: context),
                       optionCollection: ss.TimeSeriesGroupByOptions(),
                       selectedValue: groupBy?.ColumnName,
                       addSelectedValue: false,
                       method: "post")
                   .FieldDropDown(
                       context: context,
                       controlId: "TimeSeriesAggregateType",
                       fieldCss: "field-auto-thin",
                       controlCss: " auto-postback",
                       labelText: Displays.AggregationType(context: context),
                       optionCollection: ss.TimeSeriesAggregationTypeOptions(context: context),
                       selectedValue: aggregationType,
                       addSelectedValue: false,
                       method: "post")
                   .FieldDropDown(
                       context: context,
                       fieldId: "TimeSeriesValueField",
                       controlId: "TimeSeriesValue",
                       fieldCss: "field-auto-thin",
                       controlCss: " auto-postback",
                       labelText: Displays.AggregationTarget(context: context),
                       optionCollection: ss.TimeSeriesValueOptions(),
                       selectedValue: value?.ColumnName,
                       addSelectedValue: false,
                       method: "post")
                   .Div(id: "TimeSeriesBody", action: () => hb
                        .TimeSeriesBody(
                            context: context,
                            ss: ss,
                            groupBy: groupBy,
                            aggregationType: aggregationType,
                            value: value,
                            dataRows: dataRows,
                            inRange: inRange))));
 }
Example #2
0
 public static HtmlBuilder Crosstab(
     this HtmlBuilder hb,
     Context context,
     SiteSettings ss,
     View view,
     Column groupByX,
     Column groupByY,
     List <Column> columns,
     string aggregateType,
     Column value,
     string timePeriod,
     DateTime month,
     EnumerableRowCollection <DataRow> dataRows,
     bool inRange = true)
 {
     return(hb.Div(id: "Crosstab", css: "both", action: () =>
     {
         hb
         .FieldDropDown(
             context: context,
             controlId: "CrosstabGroupByX",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.GroupByX(),
             optionCollection: ss.CrosstabGroupByXOptions(context: context),
             selectedValue: view.CrosstabGroupByX,
             method: "post")
         .FieldDropDown(
             context: context,
             controlId: "CrosstabGroupByY",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.GroupByY(),
             optionCollection: ss.CrosstabGroupByYOptions(context: context),
             selectedValue: view.CrosstabGroupByY,
             method: "post")
         .FieldDropDown(
             context: context,
             fieldId: "CrosstabColumnsField",
             controlId: "CrosstabColumns",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.NumericColumn(),
             optionCollection: ss.CrosstabColumnsOptions(),
             selectedValue: view.CrosstabColumns,
             multiple: true,
             method: "post")
         .FieldDropDown(
             context: context,
             controlId: "CrosstabAggregateType",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.AggregationType(),
             optionCollection: ss.CrosstabAggregationTypeOptions(),
             selectedValue: aggregateType,
             method: "post")
         .FieldDropDown(
             context: context,
             fieldId: "CrosstabValueField",
             controlId: "CrosstabValue",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.AggregationTarget(),
             optionCollection: ss.CrosstabColumnsOptions(),
             selectedValue: view.CrosstabValue,
             addSelectedValue: false,
             method: "post")
         .FieldDropDown(
             context: context,
             fieldId: "CrosstabTimePeriodField",
             controlId: "CrosstabTimePeriod",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.Period(),
             optionCollection: ss.CrosstabTimePeriodOptions(),
             selectedValue: view.CrosstabTimePeriod,
             method: "post")
         .DropDown(
             context: context,
             controlId: "CrosstabMonth",
             controlCss: " w100 auto-postback",
             optionCollection: CrosstabMonth(),
             selectedValue: new DateTime(month.Year, month.Month, 1).ToString(),
             action: "Crosstab",
             method: "post")
         .Button(
             controlId: "CrosstabPreviousButton",
             text: Displays.Previous(),
             controlCss: "button-icon",
             accessKey: "b",
             onClick: "$p.moveCrosstab('Previous');",
             icon: "ui-icon-seek-prev")
         .Button(
             controlId: "CrosstabNextButton",
             text: Displays.Next(),
             controlCss: "button-icon",
             accessKey: "n",
             onClick: "$p.moveCrosstab('Next');",
             icon: "ui-icon-seek-next")
         .Button(
             controlId: "CrosstabThisMonthButton",
             text: Displays.ThisMonth(),
             controlCss: "button-icon",
             accessKey: "n",
             onClick: "$p.moveCrosstab('ThisMonth');",
             icon: "ui-icon-Crosstab")
         .Div(id: "CrosstabBody", action: () =>
         {
             if (inRange)
             {
                 hb.CrosstabBody(
                     context: context,
                     ss: ss,
                     view: view,
                     groupByX: groupByX,
                     groupByY: groupByY,
                     columns: columns,
                     aggregateType: aggregateType,
                     value: value,
                     timePeriod: timePeriod,
                     month: month,
                     dataRows: dataRows);
             }
         });
     }));
 }
Example #3
0
 public static HtmlBuilder Kamban(
     this HtmlBuilder hb,
     Context context,
     SiteSettings ss,
     View view,
     Column groupByX,
     Column groupByY,
     string aggregateType,
     Column value,
     int columns,
     bool aggregationView,
     IEnumerable <KambanElement> data,
     bool inRange)
 {
     return(hb.Div(id: "Kamban", css: "both", action: () =>
     {
         hb
         .FieldDropDown(
             context: context,
             controlId: "KambanGroupByX",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.GroupByX(context: context),
             optionCollection: ss.KambanGroupByOptions(context: context),
             selectedValue: groupByX.ColumnName,
             method: "post")
         .FieldDropDown(
             context: context,
             controlId: "KambanGroupByY",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.GroupByY(context: context),
             optionCollection: ss.KambanGroupByOptions(
                 context: context,
                 addNothing: true),
             selectedValue: groupByY?.ColumnName,
             method: "post")
         .FieldDropDown(
             context: context,
             controlId: "KambanAggregateType",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.AggregationType(context: context),
             optionCollection: ss.KambanAggregationTypeOptions(context: context),
             selectedValue: aggregateType,
             method: "post")
         .FieldDropDown(
             context: context,
             fieldId: "KambanValueField",
             controlId: "KambanValue",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.AggregationTarget(context: context),
             optionCollection: ss.KambanValueOptions(context: context),
             selectedValue: value.ColumnName,
             method: "post")
         .FieldDropDown(
             context: context,
             controlId: "KambanColumns",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.MaxColumns(context: context),
             optionCollection: Enumerable.Range(
                 Parameters.General.KambanMinColumns,
                 Parameters.General.KambanMaxColumns)
             .ToDictionary(o => o.ToString(), o => o.ToString()),
             selectedValue: columns.ToString(),
             method: "post")
         .FieldCheckBox(
             controlId: "KambanAggregationView",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.AggregationView(context: context),
             _checked: aggregationView,
             method: "post")
         .KambanBody(
             context: context,
             ss: ss,
             view: view,
             groupByX: groupByX,
             groupByY: groupByY,
             aggregateType: aggregateType,
             value: value,
             columns: columns,
             aggregationView: aggregationView,
             data: data,
             inRange: inRange);
     }));
 }
Example #4
0
 public static HtmlBuilder Kamban(
     this HtmlBuilder hb,
     SiteSettings ss,
     View view,
     string groupByX,
     string groupByY,
     string aggregateType,
     string value,
     int?columns,
     bool aggregationView,
     IEnumerable <KambanElement> data)
 {
     return(hb.Div(id: "Kamban", css: "both", action: () =>
     {
         hb
         .FieldDropDown(
             controlId: "KambanGroupByX",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.GroupByX(),
             optionCollection: ss.KambanGroupByOptions(),
             selectedValue: groupByX,
             method: "post")
         .FieldDropDown(
             controlId: "KambanGroupByY",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.GroupByY(),
             optionCollection: ss.KambanGroupByOptions(),
             selectedValue: groupByY,
             insertBlank: true,
             method: "post")
         .FieldDropDown(
             controlId: "KambanAggregateType",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.AggregationType(),
             optionCollection: ss.KambanAggregationTypeOptions(),
             selectedValue: aggregateType,
             method: "post")
         .FieldDropDown(
             fieldId: "KambanValueField",
             controlId: "KambanValue",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.AggregationTarget(),
             optionCollection: ss.KambanValueOptions(),
             selectedValue: value,
             method: "post")
         .FieldDropDown(
             controlId: "KambanColumns",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.MaxColumns(),
             optionCollection: Enumerable.Range(
                 Parameters.General.KambanMinColumns,
                 Parameters.General.KambanMaxColumns)
             .ToDictionary(o => o.ToString(), o => o.ToString()),
             selectedValue: columns?.ToString(),
             method: "post")
         .FieldCheckBox(
             controlId: "KambanAggregationView",
             fieldCss: "field-auto-thin",
             controlCss: " auto-postback",
             labelText: Displays.AggregationView(),
             _checked: aggregationView,
             method: "post")
         .KambanBody(
             ss: ss,
             view: view,
             groupByX: ss.GetColumn(groupByX),
             groupByY: ss.GetColumn(groupByY),
             aggregateType: aggregateType,
             value: ss.GetColumn(value),
             columns: columns,
             aggregationView: aggregationView,
             data: data);
     }));
 }