using DW5S.Entity; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml.Linq; namespace DW5S.ViewModel { public class PosResViewModel : PosData { [Display(Name = "任务编号")] public int TaskID { get; set; } [Display(Name = "频点",AutoGenerateField =false)] public long FrequpHz { get; set; } [Display(Name = "上行频点(MHz)")] public double FreqUpDis => FrequpHz / 1e6; [Display(Name = "任务编号",AutoGenerateField =false)] public int? TargetInfoID { get; set; } [Display(Name = "检测方式")] [ToolTip] public string CheckType { get; set; } [Display(Name = "定位点")] public string LonLat { get { if (PosLon == 0 && PosLat == 0) return "--"; else if (PosLon > 180 || PosLon < -180) return "--"; else return $"{PosLon:f4},{PosLat:f4}"; } } [Display(Name = "镜像点")] public string MirrLonLat { get { if (MirrLon == 0 && MirrLat == 0) return "--"; else if (MirrLon > 180 || MirrLon < -180) return "--"; else return $"{MirrLon:f4},{MirrLat:f4}"; } } [Display(Name = "定位类型")] public EnumPosResType PosResType { get; set; } } }