50 lines
1.6 KiB
C#
50 lines
1.6 KiB
C#
using System;
|
|
using System.Runtime.Serialization;
|
|
using FluentNHibernate.Mapping;
|
|
|
|
namespace Tanshu.Accounts.Entities
|
|
{
|
|
public class PrintLocation
|
|
{
|
|
public int PrintLocationID { get; set; }
|
|
public ProductGroup ProductGroup { get; set; }
|
|
public string Location { get; set; }
|
|
public string Printer { get; set; }
|
|
public int Copies { get; set; }
|
|
public 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);
|
|
}
|
|
}
|
|
}
|