public MaterialPurchasKey(MaterialPurchasBase entity) { this.Entity = entity; if (entity != null) { this.materialPurchasID = entity.MaterialPurchasID; } }
public virtual bool Equals(MaterialPurchasBase toObject) { if (toObject == null) { return(false); } return(Equals(this, toObject)); }
public static bool Equals(MaterialPurchasBase Object1, MaterialPurchasBase Object2) { if ((Object1 == null) && (Object2 == null)) { return(true); } if ((Object1 == null) ^ (Object2 == null)) { return(false); } bool flag = true; if (Object1.MaterialPurchasID != Object2.MaterialPurchasID) { flag = false; } if ((Object1.MaterialPurchasCode != null) && (Object2.MaterialPurchasCode != null)) { if (Object1.MaterialPurchasCode != Object2.MaterialPurchasCode) { flag = false; } } else if ((Object1.MaterialPurchasCode == null) ^ (Object2.MaterialPurchasCode == null)) { flag = false; } if ((Object1.PurchasUnitCode != null) && (Object2.PurchasUnitCode != null)) { if (Object1.PurchasUnitCode != Object2.PurchasUnitCode) { flag = false; } } else if ((Object1.PurchasUnitCode == null) ^ (Object2.PurchasUnitCode == null)) { flag = false; } if (Object1.PurchasDate.HasValue && Object2.PurchasDate.HasValue) { if (Object1.PurchasDate != Object2.PurchasDate) { flag = false; } } else if (!Object1.PurchasDate.HasValue ^ !Object2.PurchasDate.HasValue) { flag = false; } if ((Object1.ProjectCode != null) && (Object2.ProjectCode != null)) { if (Object1.ProjectCode != Object2.ProjectCode) { flag = false; } } else if ((Object1.ProjectCode == null) ^ (Object2.ProjectCode == null)) { flag = false; } if ((Object1.Title != null) && (Object2.Title != null)) { if (Object1.Title != Object2.Title) { flag = false; } } else if ((Object1.Title == null) ^ (Object2.Title == null)) { flag = false; } if ((Object1.Description != null) && (Object2.Description != null)) { if (Object1.Description != Object2.Description) { flag = false; } } else if ((Object1.Description == null) ^ (Object2.Description == null)) { flag = false; } if ((Object1.FollowUserCode != null) && (Object2.FollowUserCode != null)) { if (Object1.FollowUserCode != Object2.FollowUserCode) { flag = false; } } else if ((Object1.FollowUserCode == null) ^ (Object2.FollowUserCode == null)) { flag = false; } if ((Object1.Status != null) && (Object2.Status != null)) { if (Object1.Status != Object2.Status) { flag = false; } return(flag); } if ((Object1.Status == null) ^ (Object2.Status == null)) { flag = false; } return(flag); }