AntInfo.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace Ips.Library.Entity
  9. {
  10. public class AntInfo
  11. {
  12. public AntInfo()
  13. {
  14. }
  15. public AntInfo(int id, string name, double lon, double lat, double alt)
  16. {
  17. Id = id;
  18. Name = name;
  19. Lon = lon;
  20. Lat = lat;
  21. Alt = alt;
  22. }
  23. [Display(Name = "编号")]
  24. public int Id { get; set; }
  25. [Display(Name = "名称")]
  26. public string Name { get; set; }
  27. [Display(Name = "经度(°)")]
  28. [DisplayFormat(DataFormatString = "{0}°", ApplyFormatInEditMode = false, ConvertEmptyStringToNull = true, NullDisplayText = "无")]
  29. public double Lon { get; set; }
  30. [Display(Name = "纬度(°)")]
  31. public double Lat { get; set; }
  32. [Display(Name = "高度(m)")]
  33. public double Alt { get; set; }
  34. public override string ToString()
  35. {
  36. return Name;
  37. }
  38. }
  39. }