private CalendarEntry GetCalendarEntry(CalendarEntryType calendarEntryType) { CalendarEntry calendarEntry; return(calendarEntries.TryGetValue(calendarEntryType, out calendarEntry) ? calendarEntry : new NullCalendarEntry()); }
protected CalendarEntry(int id, CalendarEntryType entryType, string description, bool isPublic, bool isAuthorised) { this.id = id; this.entryType = entryType; this.description = description; this.isPublic = isPublic; this.isAuthorised = isAuthorised; }
private static TimeRangeEntry GetTimeRangeEntry(CalendarEntryType calendarEntryType, DateTimeOffset startDate, DateTimeOffset endDate) { return(new TimeRangeEntry(0, calendarEntryType, "", true, true, startDate, endDate)); }
private static TimeRangeEntry GetTimeRangeEntry(CalendarEntryType calendarEntryType, DateTimeOffset startDate, DateTimeOffset endDate) { return new TimeRangeEntry(0, calendarEntryType, "", true, true, startDate, endDate); }
public SingleTimeEntry(int calendarItemId, CalendarEntryType entryType, string description, bool isPublic, bool isAuthorised, DateTimeOffset startDate) : base(calendarItemId, entryType, description, isPublic, isAuthorised) { this.startDate = startDate; }
public TimeRangeEntry(int id, CalendarEntryType entryType, string description, bool isPublic, bool isAuthorised, DateTimeOffset startDate, DateTimeOffset endDate) : base(id, entryType, description, isPublic, isAuthorised) { this.startDate = startDate; this.endDate = endDate; }
public CalendarItem GetFromType(CalendarEntryType voting) { return(db.CalendarItems.FindByEntryTypeString(voting.ToString())); }
private static SingleTimeEntry GetSingleTimeEntry(CalendarEntryType calendarEntryType, DateTimeOffset startTime) { return(new SingleTimeEntry(1, calendarEntryType, "", true, true, startTime)); }
private CalendarEntry GetCalendarEntry(CalendarEntryType calendarEntryType) { CalendarEntry calendarEntry; return calendarEntries.TryGetValue(calendarEntryType, out calendarEntry) ? calendarEntry : new NullCalendarEntry(); }
public CalendarItem GetFromType(CalendarEntryType voting) { return db.CalendarItems.FindByEntryTypeString(voting.ToString()); }
private void LoadCalendarData() { if (cmbMonth.SelectedItem == null || cmbYear.SelectedItem == null) { return; } var dtFrom = new DateTime((cmbYear.SelectedItem as IdValue).Id, (cmbMonth.SelectedItem as IdValue).Id, 1); var dtTo = dtFrom.AddMonths(1).AddSeconds(-1); int pmId = 0; if (cbFilterPM.Checked && cbPM.SelectedItem != null) { pmId = (cbPM.SelectedItem as IdValue).Id; } CalendarEntryType entryType = CalendarEntryType.Financial; if (rbStaff.Checked) { entryType = CalendarEntryType.Staff; } using (var context = SqlDataHandler.GetDataContext()) { var q = from c in context.BuildingCalendarEntrySet join i in context.CalendarEntryAttachmentSet on c.id equals i.BuildingCalendarEntryId into attach from a in attach.DefaultIfEmpty() where c.EntryDate >= dtFrom && c.EntryDate <= dtTo && (pmId == 0 || c.UserId == pmId) // && c.CalendarEntryType == entryType select new CalendarPrintItem { Id = c.id, EventDate = c.EntryDate, EventToDate = c.EventToDate, BuildingId = c.BuildingId, BuildingAbreviation = c.Building.Code, BuildingDataPath = c.Building.DataPath, BuildingName = c.Building.Building, Event = c.Event, Venue = c.Venue, PM = c.User.name, PMEmail = c.User.email, NotifyTrustees = c.NotifyTrustees, InviteSubject = c.InviteSubject, InviteBody = c.InviteBody, BCCEmailAddress = c.BCCEmailAddress, TrusteesNotified = c.TrusteesNotified, FileName = a != null ? a.FileName : string.Empty, EventyType = c.CalendarEntryType, Room = c.MeetingRoomId != null ? c.MeetingRoom.Name : string.Empty }; _Data = q.OrderBy(a => a.EventDate).ThenBy(a => a.BuildingName).ToList(); } BindDataGrid(); }
private static SingleTimeEntry GetSingleTimeEntry(CalendarEntryType calendarEntryType, DateTimeOffset startTime) { return new SingleTimeEntry(1, calendarEntryType, "", true, true, startTime); }