123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- using System;
- using System.ComponentModel;
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Drawing;
- using System.Runtime.CompilerServices;
- using System.Runtime.Serialization;
- namespace GDNXFD.Data
- {
- [DataContract]
- [Table("FAULTSNAP")]
- public class FaultSnap : INotifyPropertyChanged
- {
- [DataMember]
- [Column("ID")]
- public long Id { get; set; }
- [DataMember]
- [Column("STATIONID")]
- public string StationId { get; set; }
- [DataMember]
- [Column("PROJECTID")]
- public string ProjectId { get; set; }
- [DataMember]
- [Column("LINEID")]
- public string LineId { get; set; }
- [DataMember]
- [Column("WINDTURBINEID")]
- public string WindturbineId { get; set; }
- [DataMember]
- [Column("ALERTVALUE")] //报警对应故障编码
- public long AlertValue { get; set; }
- [DataMember]
- [Column("RANK")] //报警级别
- public string Rank { get; set; }
- [DataMember]
- [Column("CATEGORY1")]
- public string Category1 { get; set; }
- [DataMember]
- [Column("CATEGORY2")]
- public string Category2 { get; set; }
- [DataMember]
- [Column("CATEGORY3")]
- public string Category3 { get; set; }
- [DataMember]
- [Column("ISOPENED")]
- public bool IsOpened { get; set; }
- [DataMember]
- [Column("LASTUPDATETIME")]
- public DateTime? LastUpdateTime { get; set; }
- [DataMember]
- [Column("LASTUPDATEPERSON")]
- public string LastUpdatePerson { get; set; }
- [DataMember]
- [Column("STATIONNAME")]
- public string StationName { get; set; }
- [DataMember]
- [Column("PROJECTNAME")]
- public string ProjectName { get; set; }
- [DataMember]
- [Column("LINENAME")]
- public string LineName { get; set; }
- [DataMember]
- [Column("WINDTURBINENAME")]
- public string WindturbineName { get; set; }
- [DataMember]
- [Column("ALERTTEXT")]
- public string AlertText { get; set; }
- [DataMember]
- [Column("MODELID")]
- public string ModelId { get; set; }
- [DataMember]
- [Column("TESTINGPOINTKEY")]
- public string TestingPointKey { get; set; }
- /// <summary>
- /// Property changed event
- /// </summary>
- public event PropertyChangedEventHandler PropertyChanged;
- private void RaisePropertyChanged([CallerMemberName] string caller = "")
- {
- if (PropertyChanged != null)
- {
- PropertyChanged(this, new PropertyChangedEventArgs(caller));
- }
- }
- public string ObjectName
- {
- get
- {
- if (Category1 == "FJ")
- return WindturbineName;
- else
- return StationName;
- }
- }
- public string ObjectId
- {
- get
- {
- if (Category1 == "FJ")
- return WindturbineId;
- else
- return StationId;
- }
- }
- public string CategoryName
- {
- get
- {
- switch (Category1)
- {
- case "FJ":
- return "风机";
- case "SYZ":
- return "升压站";
- default:
- return "未知";
- }
- }
- }
- }
- }
|