Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace AESSmart.ViewModels
- {
- public class ACVoltagesTelerikGraph
- {
- public long InverterID { get; set; }
- public string InverterName { get; set; }
- public double? voltage_ac_a { get; set; }
- public double? voltage_ac_b { get; set; }
- public double? voltage_ac_c { get; set; }
- public DateTime recordTime { get; set; }
- }
- public class GraphsACVoltagesViewModel
- {
- public DateTime startingDate { get; set; }
- public DateTime endingDate { get; set; }
- public string HCSeries { get; set; }
- public List<ACVoltagesTelerikGraph> GraphDetail { set; get; }
- public void setLists()
- {
- //Code to populate InverterGoups and Inverters
- }
- public void setSeries()
- {
- //Code to populate GraphDetail and HCSeries
- }
- }
- }
- @model AESSmart.ViewModels.GraphsACVoltagesViewModel
- @(Html.Telerik().Grid(Model.GraphDetail)
- .Name("Grid")
- .DataBinding(dataBinding => dataBinding.Server())
- .Columns(columns =>
- {
- columns.Bound(o => o.InverterID).Title("InverterID").Width(25);
- columns.Bound(o => o.InverterName).Title("InverterName").Width(100);
- columns.Bound(o => o.voltage_ac_a).Title("Phase 1 Volts").Width(75);
- columns.Bound(o => o.voltage_ac_b).Title("Phase 2 Volts").Width(75);
- columns.Bound(o => o.voltage_ac_c).Title("Phase 3 Volts").Width(75);
- columns.Bound(o => o.recordTime).Title("Record Time").Width(150);
- })
- .Groupable()
- .Sortable()
- .Filterable()
- .Pageable(pager => pager.PageSize(3))
- )
- public virtual ICollection<ACVoltagesTelerikGraph> GraphDetail { set; get; }
- @(Html.Telerik().Grid(Model.GraphDetail)
- .Name("Grid")
- .DataBinding(dataBinding => dataBinding
- .Ajax()
- .OperationMode(GridOperationMode.Client)
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement