using HStation.WinFrmUI.Xhs; namespace HStation.WinFrmUI { public class XhsProjectSimulationFourlinkMatchingViewModel { public XhsProjectSimulationFourlinkMatchingViewModel() { } public XhsProjectSimulationFourlinkMatchingViewModel(FourlinkMatchingViewModel rhs) { this.ID = rhs.ID; this.DbLocked = rhs.DbLocked; this.Material = rhs.Material; this.Caliber = rhs.Caliber; this.Code = rhs.Code; this.Dbid = rhs.DbId; this.Name = rhs.Name; this.ModelType = rhs.ModelType; this.MatchingCaliber = rhs.MatchingCaliber.ToString(); this.MatchingMinorLoss = rhs.MatchingMinorLoss; this.MatchingDbId = rhs.MatchingDbId; this.MatchingMaterial = rhs.MatchingMaterial; if (rhs.DbId == null || rhs.DbId == string.Empty) { MatchingType = eMatchingStatus.Failed; } else { MatchingType = eMatchingStatus.Succeed; } if (rhs.MatchingDbId == null || rhs.MatchingDbId == string.Empty) { MatchingSatus = eMatchingStatus.Failed; } else { MatchingSatus = eMatchingStatus.Succeed; } } /// /// ID /// [DisplayName("ID")] [Browsable(false)] public long ID { get; set; } /// /// 名称 /// [DisplayName("名称")] [Browsable(true)] public string Name { get; set; } /// ///修改前Dbid /// [DisplayName("Dbid")] [Browsable(false)] public string Dbid { get; set; } /// ///修改后Dbid /// [DisplayName("MatchingDbid")] [Browsable(false)] public string MatchingDbId { get; set; } /// /// 编码 /// [DisplayName("编码")] [Browsable(true)] public string Code { get; set; } /// /// 型号名 /// [DisplayName("型号")] [Browsable(true)] public string ModelType { get; set; } /// /// 材质 /// [DisplayName("材质")] [Browsable(true)] public string Material { get; set; } /// ///修改后材质 /// [DisplayName("匹配材质")] [Browsable(true)] public string MatchingMaterial { get; set; } /// /// 口径 /// [DisplayName("口径")] [Browsable(true)] public double? Caliber { get; set; } /// ///修改后口径 /// [DisplayName("匹配口径")] [Browsable(true)] public string MatchingCaliber { get; set; } /// /// Db锁定 /// [DisplayName("锁定")] [Browsable(true)] public bool DbLocked { get; set; } /// /// 损失系数 /// [DisplayName("损失系数")] [Browsable(true)] public double? MinorLoss { get; set; } /// ///匹配损失系数 /// [DisplayName("匹配损失系数")] [Browsable(true)] public double? MatchingMinorLoss { get; set; } /// /// 匹配状态 /// [DisplayName("匹配状态")] [Browsable(true)] public eMatchingStatus MatchingType { get; set; } /// /// 是否匹配成功 /// [DisplayName("匹配")] [Browsable(true)] public eMatchingStatus MatchingSatus { get; set; } } }