using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.Runtime.Serialization;
using System.ComponentModel.DataAnnotations;
namespace IStation.Model
{
///
/// 仪器仪表详细信息视图
///
public partial class MeterBaseInfo : Model.ProductBase, System.ICloneable
{
public MeterBaseInfo() { }
public MeterBaseInfo(ProductBase rhs) : base(rhs)
{
}
public MeterBaseInfo(MeterBaseInfo rhs):base(rhs)
{
this.ID = rhs.ID;
this.Catalog = rhs.Catalog;
this.Name = rhs.Name;
this.NO = rhs.NO;
this.Code = rhs.Code;
this.ManufacturerName = rhs.ManufacturerName;
this.Elevation = rhs.Elevation;
this.PiepDia = rhs.PiepDia;
this.Position = rhs.Position;
this.Address = rhs.Address;
this.PipeSiteID = rhs.PipeSiteID;
this.IsRemote = rhs.IsRemote;
this.MapInfoID = rhs.MapInfoID;
}
public MeterBaseInfo(ProductBase product, DmaPipeSite pipeSite, MapInfoBase mapInfo):base(product)
{
if (pipeSite != null)
{
this.PipeSiteID = pipeSite.ID;
if (pipeSite.PiepDia != null)
this.PiepDia = pipeSite.PiepDia.Value;
if (pipeSite.Elevation != null)
this.Elevation = pipeSite.Elevation.Value;
}
if (mapInfo != null)
{
this.MapInfoID = mapInfo.ID;
this.Position = mapInfo.Position;
// this.Address = mapInfo.Address;
}
}
///
/// ManufacturerName
///
[Display(Name = "ManufacturerName")]
public string ManufacturerName { get; set; }
///
/// Elevation
///
[Display(Name = "Elevation")]
public double Elevation { get; set; }
///
/// PiepDia
///
[Display(Name = "PiepDia")]
public double PiepDia { get; set; }
///
/// Position
///
[Display(Name = "Position")]
public string Position { get; set; }
///
/// Address
///
//[Display(Name = "Address")]
//public string Address { get; set; }
///
/// PipeSiteID
///
[Display(Name = "PipeSiteID")]
public long PipeSiteID { get; set; }
///
/// MapInfoID
///
[Display(Name = "MapInfoID")]
public long MapInfoID { get; set; }
///
/// 是否远程
///
[Display(Name = "IsRemote")]
public bool IsRemote { get; set; }
public new MeterBaseInfo Clone()
{
return (MeterBaseInfo)this.MemberwiseClone();
}
object ICloneable.Clone()
{
return this.MemberwiseClone();
}
}
}