2011-01-13 20:21:02 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Runtime.Serialization;
|
2011-01-30 07:14:05 +00:00
|
|
|
|
using FluentNHibernate.Mapping;
|
2011-01-13 20:21:02 +00:00
|
|
|
|
|
2011-01-30 07:14:05 +00:00
|
|
|
|
namespace Tanshu.Accounts.Entities
|
2011-01-13 20:21:02 +00:00
|
|
|
|
{
|
2011-01-30 07:14:05 +00:00
|
|
|
|
public class PrintLocation
|
2011-01-13 20:21:02 +00:00
|
|
|
|
{
|
2011-01-31 20:33:22 +00:00
|
|
|
|
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; }
|
2011-01-17 14:55:43 +00:00
|
|
|
|
|
|
|
|
|
public override bool Equals(System.Object obj)
|
|
|
|
|
{
|
2011-01-30 07:14:05 +00:00
|
|
|
|
if (obj is PrintLocation)
|
|
|
|
|
return (this == (PrintLocation)obj);
|
|
|
|
|
else
|
2011-01-17 14:55:43 +00:00
|
|
|
|
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();
|
|
|
|
|
}
|
2011-01-30 07:14:05 +00:00
|
|
|
|
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;
|
2011-01-17 14:55:43 +00:00
|
|
|
|
|
2011-01-30 07:14:05 +00:00
|
|
|
|
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);
|
|
|
|
|
}
|
2011-01-13 20:21:02 +00:00
|
|
|
|
}
|
|
|
|
|
}
|