69 lines
1.9 KiB
C#
69 lines
1.9 KiB
C#
///
|
|
/// Copyright (c) 2016 Sensus Metering Systems
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Results.Entities
|
|
{
|
|
public class Components
|
|
{
|
|
public virtual int Id { get; protected set; }
|
|
public virtual int BenchId { get; set; }
|
|
public virtual string BenchName { get; set; }
|
|
public virtual string Pump { get; set; }
|
|
public virtual string RegValve { get; set; }
|
|
public virtual string Flowmeter { get; set; }
|
|
public virtual string Diverter { get; set; }
|
|
public virtual string Scale { get; set; }
|
|
public virtual string Custom1 { get; set; }
|
|
public virtual string Custom2 { get; set; }
|
|
public virtual string Custom3 { get; set; }
|
|
|
|
protected Components()
|
|
{
|
|
BenchId = 0;
|
|
BenchName = string.Empty;
|
|
Pump = string.Empty;
|
|
RegValve = string.Empty;
|
|
Flowmeter = string.Empty;
|
|
Diverter = string.Empty;
|
|
Scale = string.Empty;
|
|
Custom1 = string.Empty;
|
|
Custom2 = string.Empty;
|
|
Custom3 = string.Empty;
|
|
}
|
|
|
|
public Components(int benchId, string benchName, string pump, string flowmeter,
|
|
string scale, string regValve, string diverter)
|
|
{
|
|
BenchId = benchId;
|
|
BenchName = benchName;
|
|
Pump = pump;
|
|
RegValve = regValve;
|
|
Flowmeter = flowmeter;
|
|
Diverter = diverter;
|
|
Scale = scale;
|
|
Custom1 = string.Empty;
|
|
Custom2 = string.Empty;
|
|
Custom3 = string.Empty;
|
|
}
|
|
|
|
public virtual bool Equals(Components bc)
|
|
{
|
|
if (BenchId != bc.BenchId) return false;
|
|
if (!BenchName.Equals(bc.BenchName)) return false;
|
|
if (!Pump.Equals(bc.Pump)) return false;
|
|
if (!RegValve.Equals(bc.RegValve)) return false;
|
|
if (!Flowmeter.Equals(bc.Flowmeter)) return false;
|
|
if (!Diverter.Equals(bc.Diverter)) return false;
|
|
if (!Scale.Equals(bc.Scale)) return false;
|
|
if (!Custom1.Equals(bc.Custom1)) return false;
|
|
if (!Custom2.Equals(bc.Custom2)) return false;
|
|
if (!Custom3.Equals(bc.Custom3)) return false;
|
|
|
|
return true;
|
|
}
|
|
}
|
|
}
|