Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. namespace AESSmart.ViewModels
  2. {
  3. public class ACVoltagesTelerikGraph
  4. {
  5. public long InverterID { get; set; }
  6. public string InverterName { get; set; }
  7. public double? voltage_ac_a { get; set; }
  8. public double? voltage_ac_b { get; set; }
  9. public double? voltage_ac_c { get; set; }
  10. public DateTime recordTime { get; set; }
  11. }
  12.  
  13. public class GraphsACVoltagesViewModel
  14. {
  15. public DateTime startingDate { get; set; }
  16. public DateTime endingDate { get; set; }
  17.  
  18. public string HCSeries { get; set; }
  19. public List<ACVoltagesTelerikGraph> GraphDetail { set; get; }
  20.  
  21. public void setLists()
  22. {
  23. //Code to populate InverterGoups and Inverters
  24. }
  25.  
  26. public void setSeries()
  27. {
  28. //Code to populate GraphDetail and HCSeries
  29. }
  30. }
  31. }
  32.  
  33. @model AESSmart.ViewModels.GraphsACVoltagesViewModel
  34.  
  35. @(Html.Telerik().Grid(Model.GraphDetail)
  36. .Name("Grid")
  37. .DataBinding(dataBinding => dataBinding.Server())
  38. .Columns(columns =>
  39. {
  40. columns.Bound(o => o.InverterID).Title("InverterID").Width(25);
  41. columns.Bound(o => o.InverterName).Title("InverterName").Width(100);
  42. columns.Bound(o => o.voltage_ac_a).Title("Phase 1 Volts").Width(75);
  43. columns.Bound(o => o.voltage_ac_b).Title("Phase 2 Volts").Width(75);
  44. columns.Bound(o => o.voltage_ac_c).Title("Phase 3 Volts").Width(75);
  45. columns.Bound(o => o.recordTime).Title("Record Time").Width(150);
  46. })
  47. .Groupable()
  48. .Sortable()
  49. .Filterable()
  50. .Pageable(pager => pager.PageSize(3))
  51. )
  52.  
  53. public virtual ICollection<ACVoltagesTelerikGraph> GraphDetail { set; get; }
  54.  
  55. @(Html.Telerik().Grid(Model.GraphDetail)
  56. .Name("Grid")
  57. .DataBinding(dataBinding => dataBinding
  58. .Ajax()
  59. .OperationMode(GridOperationMode.Client)
  60. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement