narsil/Tanshu.Accounts.Contracts/Data Contracts/PrintLocationBO.cs

50 lines
1.7 KiB
C#
Raw Normal View History

using System;
using System.Runtime.Serialization;
using FluentNHibernate.Mapping;
namespace Tanshu.Accounts.Entities
{
public class PrintLocation
{
public virtual int PrintLocationID { get; set; }
public virtual ProductGroup ProductGroup { get; set; }
public virtual string Location { get; set; }
public virtual string Printer { get; set; }
public virtual int Copies { get; set; }
public virtual string CutCode { get; set; }
public override bool Equals(System.Object obj)
{
if (obj is PrintLocation)
return (this == (PrintLocation)obj);
else
return false;
}
public override int GetHashCode()
{
//return PrintLocationID.GetHashCode() ^ ProductTypeID.GetHashCode() ^ Location.GetHashCode() ^ Printer.GetHashCode() ^ Copies.GetHashCode() ^ CutCode.GetHashCode();
return Location.GetHashCode() ^ Printer.GetHashCode() ^ Copies.GetHashCode() ^ CutCode.GetHashCode();
}
public static bool operator ==(PrintLocation a, PrintLocation b)
{
if (object.ReferenceEquals(null, a))
return object.ReferenceEquals(null, b);
if (!(a is PrintLocation))
return false;
if (!(b is PrintLocation))
return false;
return (a.Location == b.Location)
&& (a.Printer == b.Printer)
&& (a.Copies == b.Copies)
&& (a.CutCode == b.CutCode);
}
public static bool operator !=(PrintLocation a, PrintLocation b)
{
return !(a == b);
}
}
}