2011-01-13 20:21:02 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Runtime.Serialization;
|
|
|
|
|
|
|
|
|
|
namespace Tanshu.Accounts.Contracts
|
|
|
|
|
{
|
|
|
|
|
public class PrintLocationBO
|
|
|
|
|
{
|
|
|
|
|
public int PrintLocationID { get; set; }
|
|
|
|
|
public Guid ProductTypeID { get; set; }
|
|
|
|
|
public string Location { get; set; }
|
|
|
|
|
public string Printer { get; set; }
|
2011-01-17 14:55:43 +00:00
|
|
|
|
public int Copies { get; set; }
|
|
|
|
|
public string CutCode { get; set; }
|
|
|
|
|
|
|
|
|
|
public override bool Equals(System.Object obj)
|
|
|
|
|
{
|
|
|
|
|
// If parameter is null return false.
|
|
|
|
|
if (obj == null)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// If parameter cannot be cast to Point return false.
|
|
|
|
|
PrintLocationBO p = obj as PrintLocationBO;
|
|
|
|
|
if ((System.Object)p == null)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Return true if the fields match:
|
|
|
|
|
//return (PrintLocationID == p.PrintLocationID)
|
|
|
|
|
// && (ProductTypeID == p.ProductTypeID)
|
|
|
|
|
// && (Location == p.Location)
|
|
|
|
|
// && (Printer == p.Printer)
|
|
|
|
|
// && (Copies == p.Copies)
|
|
|
|
|
// && (CutCode == p.CutCode);
|
|
|
|
|
return (Location == p.Location)
|
|
|
|
|
&& (Printer == p.Printer)
|
|
|
|
|
&& (Copies == p.Copies)
|
|
|
|
|
&& (CutCode == p.CutCode);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Equals(PrintLocationBO p)
|
|
|
|
|
{
|
|
|
|
|
// If parameter is null return false:
|
|
|
|
|
if ((object)p == null)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Return true if the fields match:
|
|
|
|
|
//return (PrintLocationID == p.PrintLocationID)
|
|
|
|
|
// && (ProductTypeID == p.ProductTypeID)
|
|
|
|
|
// && (Location == p.Location)
|
|
|
|
|
// && (Printer == p.Printer)
|
|
|
|
|
// && (Copies == p.Copies)
|
|
|
|
|
// && (CutCode == p.CutCode);
|
|
|
|
|
return (Location == p.Location)
|
|
|
|
|
&& (Printer == p.Printer)
|
|
|
|
|
&& (Copies == p.Copies)
|
|
|
|
|
&& (CutCode == p.CutCode);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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-13 20:21:02 +00:00
|
|
|
|
}
|
|
|
|
|
}
|