narsil/Tanshu.Accounts.Contracts/Data Contracts/PrintLocationBO.cs
2011-02-01 02:03:22 +05:30

50 lines
1.7 KiB
C#

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);
}
}
}