/// <summary> /// Returns true if Role instances are equal /// </summary> /// <param name="other">Instance of Role to be compared</param> /// <returns>Boolean</returns> public bool Equals(Role other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id != null && Id.Equals(other.Id) ) && ( RoleName == other.RoleName || RoleName != null && RoleName.Equals(other.RoleName) ) && ( CreateDate == other.CreateDate || CreateDate != null && CreateDate.Equals(other.CreateDate) ) && ( Identities == other.Identities || Identities != null && Identities.Equals(other.Identities) )); }
/// <summary> /// 引数データが同一かチェック /// </summary> /// <param name="obj">引数データ</param> public override bool Equals(object obj) { if (obj is Job job) { return(CreateDate.Equals(job.CreateDate)); } else { return(false); } }
public override bool Equals(Object obj) { if (obj is Problem ob) { return(Id.Equals(ob.Id) && CategoryId.Equals(ob.CategoryId) && ThemeId.Equals(ob.ThemeId) && Adress.Equals(ob.Adress) && SourceId.Equals(ob.SourceId) && CreateDate.Equals(ob.CreateDate) && AnswerDate.Equals(ob.AnswerDate) && ProblemText.Equals(ob.ProblemText) && ProblemPhotos.Equals(ob.ProblemPhotos) && AnswerText.Equals(ob.AnswerText) && AnswerPhotos.Equals(ob.AnswerPhotos) && StatusId.Equals(ob.StatusId) && DistrictId.Equals(ob.DistrictId) && ChildID.Equals(ob.ChildID) && ParentID.Equals(ob.ParentID) && IspolnitelName.Equals(ob.IspolnitelName) && IspolnitelId.Equals(ob.IspolnitelId)); } return(false); }
/// <summary> /// 書類Noの更新 /// </summary> public void UpdateDocumentNo() { if (CreateDate.Equals(DateTime.Today)) { No++; } else { CreateDate = DateTime.Today; No = 1; } }
public override bool Equals(object obj) { if (obj is CalendarEvent) { CalendarEvent evnt = (CalendarEvent)obj; return(Subject.Equals(evnt.Subject) && CreateDate.Equals(evnt.CreateDate) && StartDate.Equals(evnt.StartDate) && EndDate.Equals(evnt.EndDate)); } else { return(base.Equals(obj)); } }
/// <summary> /// Determines whether the specified <see cref="System.Object"/> is equal to this instance. /// </summary> /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param> /// <returns><c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>.</returns> public override bool Equals(object obj) { if (obj is FilteredCriteria) { var c = (FilteredCriteria)obj; if (!FolderTypeID.Equals(c.FolderTypeID)) { return(false); } if (!FolderRef.Equals(c.FolderRef)) { return(false); } if (!Year.Equals(c.Year)) { return(false); } if (!Subject.Equals(c.Subject)) { return(false); } if (!FolderStatusID.Equals(c.FolderStatusID)) { return(false); } if (!CreateDate.Equals(c.CreateDate)) { return(false); } if (!CreateUserID.Equals(c.CreateUserID)) { return(false); } if (!ChangeDate.Equals(c.ChangeDate)) { return(false); } if (!ChangeUserID.Equals(c.ChangeUserID)) { return(false); } return(true); } return(false); }
// <summary> // Transient objects are not associated with an item already in storage. For instance, // a Customer is transient if its Id is 0. It's virtual to allow NHibernate-backed // objects to be lazily loaded. // </summary> public virtual bool IsTransient() { return(CreateDate.Equals(default(DateTime))); }
/// <summary> /// Determines whether the specified <see cref="System.Object"/> is equal to this instance. /// </summary> /// <param name="obj">The <see cref="System.Object"/> to compare with this instance.</param> /// <returns><c>true</c> if the specified <see cref="System.Object"/> is equal to this instance; otherwise, <c>false</c>.</returns> public override bool Equals(object obj) { if (obj is DocListFilteredCriteria) { var c = (DocListFilteredCriteria)obj; if (!DocID.Equals(c.DocID)) { return(false); } if (!DocClassID.Equals(c.DocClassID)) { return(false); } if (!DocTypeID.Equals(c.DocTypeID)) { return(false); } if (!SenderID.Equals(c.SenderID)) { return(false); } if (!RecipientID.Equals(c.RecipientID)) { return(false); } if (!DocRef.Equals(c.DocRef)) { return(false); } if (!DocDate.Equals(c.DocDate)) { return(false); } if (!Subject.Equals(c.Subject)) { return(false); } if (!DocStatusID.Equals(c.DocStatusID)) { return(false); } if (!CreateDate.Equals(c.CreateDate)) { return(false); } if (!CreateUserID.Equals(c.CreateUserID)) { return(false); } if (!ChangeDate.Equals(c.ChangeDate)) { return(false); } if (!ChangeUserID.Equals(c.ChangeUserID)) { return(false); } return(true); } return(false); }