public virtual bool Equals(MaterialBase toObject) { if (toObject == null) { return(false); } return(Equals(this, toObject)); }
public MaterialKey(MaterialBase entity) { this.Entity = entity; if (entity != null) { this.materialCode = entity.MaterialCode; } }
public static bool Equals(MaterialBase Object1, MaterialBase Object2) { if ((Object1 == null) && (Object2 == null)) { return(true); } if ((Object1 == null) ^ (Object2 == null)) { return(false); } bool flag = true; if (Object1.MaterialCode != Object2.MaterialCode) { flag = false; } if ((Object1.MaterialName != null) && (Object2.MaterialName != null)) { if (Object1.MaterialName != Object2.MaterialName) { flag = false; } } else if ((Object1.MaterialName == null) ^ (Object2.MaterialName == null)) { flag = false; } if ((Object1.GroupCode != null) && (Object2.GroupCode != null)) { if (Object1.GroupCode != Object2.GroupCode) { flag = false; } } else if ((Object1.GroupCode == null) ^ (Object2.GroupCode == null)) { flag = false; } if ((Object1.Spec != null) && (Object2.Spec != null)) { if (Object1.Spec != Object2.Spec) { flag = false; } } else if ((Object1.Spec == null) ^ (Object2.Spec == null)) { flag = false; } if ((Object1.Unit != null) && (Object2.Unit != null)) { if (Object1.Unit != Object2.Unit) { flag = false; } } else if ((Object1.Unit == null) ^ (Object2.Unit == null)) { flag = false; } if (Object1.StandardPrice.HasValue && Object2.StandardPrice.HasValue) { if (Object1.StandardPrice != Object2.StandardPrice) { flag = false; } } else if (!Object1.StandardPrice.HasValue ^ !Object2.StandardPrice.HasValue) { flag = false; } if ((Object1.InputPerson != null) && (Object2.InputPerson != null)) { if (Object1.InputPerson != Object2.InputPerson) { flag = false; } } else if ((Object1.InputPerson == null) ^ (Object2.InputPerson == null)) { flag = false; } if (Object1.InputDate.HasValue && Object2.InputDate.HasValue) { if (Object1.InputDate != Object2.InputDate) { flag = false; } } else if (!Object1.InputDate.HasValue ^ !Object2.InputDate.HasValue) { flag = false; } if ((Object1.Remark != null) && (Object2.Remark != null)) { if (Object1.Remark != Object2.Remark) { flag = false; } return(flag); } if ((Object1.Remark == null) ^ (Object2.Remark == null)) { flag = false; } return(flag); }