public override int GetHashCode() { int hash = 1; if (entityId_ != null) { hash ^= EntityId.GetHashCode(); } if (sourceNote_ != null) { hash ^= SourceNote.GetHashCode(); } if (Category != 0) { hash ^= Category.GetHashCode(); } if (AdditionalNote.Length != 0) { hash ^= AdditionalNote.GetHashCode(); } if (IncludeOnConfirmation != false) { hash ^= IncludeOnConfirmation.GetHashCode(); } if (SourceNoteSubject.Length != 0) { hash ^= SourceNoteSubject.GetHashCode(); } if (guest_ != null) { hash ^= Guest.GetHashCode(); } return(hash); }
public static bool DeleteAdditionalNotes(Guid Id) { bool result = false; DayCarePL.Logger.Write(DayCarePL.LogType.INFO, DayCarePL.ModuleToLog.AdditionalNote, "Delete", "Delete Method", DayCarePL.Common.GUID_DEFAULT); clConnection.DoConnection(); DayCareDataContext db = new DayCareDataContext(); try { DayCarePL.Logger.Write(DayCarePL.LogType.DEBUG, DayCarePL.ModuleToLog.AdditionalNote, "Delete", "Debug Delete Method", DayCarePL.Common.GUID_DEFAULT); AdditionalNote DBAdditionalNotes = db.AdditionalNotes.FirstOrDefault(c => c.Id.Equals(Id)); if (DBAdditionalNotes != null) { db.AdditionalNotes.DeleteOnSubmit(DBAdditionalNotes); db.SubmitChanges(); result = true; } } catch (Exception ex) { DayCarePL.Logger.Write(DayCarePL.LogType.EXCEPTION, DayCarePL.ModuleToLog.AdditionalNote, "Delete", ex.Message.ToString(), DayCarePL.Common.GUID_DEFAULT); result = false; } return(result); }
public override int GetHashCode() { int hash = 1; if (entityId_ != null) { hash ^= EntityId.GetHashCode(); } if (sourceNote_ != null) { hash ^= SourceNote.GetHashCode(); } if (Category != 0) { hash ^= Category.GetHashCode(); } if (AdditionalNote.Length != 0) { hash ^= AdditionalNote.GetHashCode(); } if (IncludeOnConfirmation != false) { hash ^= IncludeOnConfirmation.GetHashCode(); } if (lodgingReservation_ != null) { hash ^= LodgingReservation.GetHashCode(); } if (SourceNoteSubject.Length != 0) { hash ^= SourceNoteSubject.GetHashCode(); } if (IsFulfilled != false) { hash ^= IsFulfilled.GetHashCode(); } if (PermanentOnGuestRecord != false) { hash ^= PermanentOnGuestRecord.GetHashCode(); } if (incidentalItemId_ != null) { hash ^= IncidentalItemId.GetHashCode(); } if (incStartDate_ != null) { hash ^= IncStartDate.GetHashCode(); } if (incEndDate_ != null) { hash ^= IncEndDate.GetHashCode(); } return(hash); }
public static bool Save(DayCarePL.AdditionalNotesProperties objNotes) { DayCarePL.Logger.Write(DayCarePL.LogType.INFO, DayCarePL.ModuleToLog.clAbsentReason, "Save", "Execute Save Method", DayCarePL.Common.GUID_DEFAULT); clConnection.DoConnection(); bool result = false; DayCareDataContext db = new DayCareDataContext(); AdditionalNote DBAdditionalNote = null; try { DayCarePL.Logger.Write(DayCarePL.LogType.DEBUG, DayCarePL.ModuleToLog.clAbsentReason, "Save", "Debug Save Method", DayCarePL.Common.GUID_DEFAULT); if (objNotes.Id.ToString().Equals(DayCarePL.Common.GUID_DEFAULT)) { DBAdditionalNote = new AdditionalNote(); DBAdditionalNote.Id = System.Guid.NewGuid(); DBAdditionalNote.CreatedById = objNotes.CreatedById; DBAdditionalNote.CreatedDateTime = DateTime.Now; } else { DBAdditionalNote = db.AdditionalNotes.SingleOrDefault(A => A.Id.Equals(objNotes.Id)); } DBAdditionalNote.ChildSchoolYearId = objNotes.ChildSchoolYearId; DBAdditionalNote.CommentDate = objNotes.CommentDate; DBAdditionalNote.Comments = objNotes.Comments; DBAdditionalNote.LastModifiedById = objNotes.LastModifiedById; DBAdditionalNote.LastMidifiedDateTime = DateTime.Now; if (objNotes.Id.ToString().Equals(DayCarePL.Common.GUID_DEFAULT)) { db.AdditionalNotes.InsertOnSubmit(DBAdditionalNote); } db.SubmitChanges(); result = true; } catch (Exception ex) { DayCarePL.Logger.Write(DayCarePL.LogType.EXCEPTION, DayCarePL.ModuleToLog.clAbsentReason, "Save", ex.Message.ToString(), DayCarePL.Common.GUID_DEFAULT); result = false; } return(result); }