コード例 #1
0
ファイル: TroubleBase.cs プロジェクト: riyuexing/rms
 public virtual bool Equals(TroubleBase toObject)
 {
     if (toObject == null)
     {
         return(false);
     }
     return(Equals(this, toObject));
 }
コード例 #2
0
ファイル: TroubleKey.cs プロジェクト: riyuexing/rms
 public TroubleKey(TroubleBase entity)
 {
     this.Entity = entity;
     if (entity != null)
     {
         this.troubleID = entity.TroubleID;
     }
 }
コード例 #3
0
ファイル: TroubleBase.cs プロジェクト: riyuexing/rms
        public static bool Equals(TroubleBase Object1, TroubleBase Object2)
        {
            if ((Object1 == null) && (Object2 == null))
            {
                return(true);
            }
            if ((Object1 == null) ^ (Object2 == null))
            {
                return(false);
            }
            bool flag = true;

            if (Object1.TroubleID != Object2.TroubleID)
            {
                flag = false;
            }
            if (Object1.InspectSituationID != Object2.InspectSituationID)
            {
                flag = false;
            }
            if ((Object1.Requirement != null) && (Object2.Requirement != null))
            {
                if (Object1.Requirement != Object2.Requirement)
                {
                    flag = false;
                }
            }
            else if ((Object1.Requirement == null) ^ (Object2.Requirement == null))
            {
                flag = false;
            }
            if ((Object1.Suggestion != null) && (Object2.Suggestion != null))
            {
                if (Object1.Suggestion != Object2.Suggestion)
                {
                    flag = false;
                }
            }
            else if ((Object1.Suggestion == null) ^ (Object2.Suggestion == null))
            {
                flag = false;
            }
            if (Object1.ExecutionTime.HasValue && Object2.ExecutionTime.HasValue)
            {
                if (Object1.ExecutionTime != Object2.ExecutionTime)
                {
                    flag = false;
                }
            }
            else if (!Object1.ExecutionTime.HasValue ^ !Object2.ExecutionTime.HasValue)
            {
                flag = false;
            }
            if ((Object1.Place != null) && (Object2.Place != null))
            {
                if (Object1.Place != Object2.Place)
                {
                    flag = false;
                }
            }
            else if ((Object1.Place == null) ^ (Object2.Place == null))
            {
                flag = false;
            }
            if ((Object1.TroubleCompendium != null) && (Object2.TroubleCompendium != null))
            {
                if (Object1.TroubleCompendium != Object2.TroubleCompendium)
                {
                    flag = false;
                }
            }
            else if ((Object1.TroubleCompendium == null) ^ (Object2.TroubleCompendium == null))
            {
                flag = false;
            }
            if ((Object1.Remark != null) && (Object2.Remark != null))
            {
                if (Object1.Remark != Object2.Remark)
                {
                    flag = false;
                }
            }
            else if ((Object1.Remark == null) ^ (Object2.Remark == null))
            {
                flag = false;
            }
            if (Object1.Status != Object2.Status)
            {
                flag = false;
            }
            return(flag);
        }