RankingModel.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.Serialization;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace GDNXFD.Data
  8. {
  9. [DataContract]
  10. public class RankingModel
  11. {
  12. [DataMember]
  13. public int RankingNo { get; set; }
  14. [DataMember]
  15. public string ObjectName { get; set; }
  16. [DataMember]
  17. public int Total { get; set; }
  18. }
  19. public class GroupRankModel
  20. {
  21. public GroupModel GM { get; set; }
  22. public int Total { get; set; }
  23. }
  24. public class GroupModel
  25. {
  26. public string StationName { get; set; }
  27. public string ProjectName { get; set; }
  28. public string LineName { get; set; }
  29. public string WindturbineName { get; set; }
  30. public string ObjectName
  31. {
  32. get
  33. {
  34. if (!string.IsNullOrWhiteSpace(WindturbineName))
  35. return WindturbineName;
  36. if (!string.IsNullOrWhiteSpace(LineName))
  37. return LineName;
  38. if (!string.IsNullOrWhiteSpace(ProjectName))
  39. return ProjectName;
  40. return StationName;
  41. }
  42. }
  43. }
  44. }