private bool SearchesTodayMeeting(CalendarSkillState state) { var userNow = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, state.GetUserTimeZone()); var searchDate = userNow; if (state.StartDate.Any()) { searchDate = state.StartDate.Last(); } return(!state.StartTime.Any() && !state.EndDate.Any() && !state.EndTime.Any() && EventModel.IsSameDate(searchDate, userNow)); }
public void DigestState(CalendarSkillState state) { state.MeetingInfo.Title = Title; state.MeetingInfo.Content = Content; if (!string.IsNullOrEmpty(Attendees)) { state.MeetingInfo.ContactInfor.ContactsNameList = new List <string>(Attendees.Split(",")); } if (!string.IsNullOrEmpty(Timezone)) { state.UserInfo.Timezone = DateTimeHelper.ConvertTimeZoneInfo(Timezone); } if (!string.IsNullOrEmpty(StartDate)) { state.MeetingInfo.StartDate = DateTimeHelper.GetDateFromDateTimeString(StartDate, null, state.GetUserTimeZone(), true, false); } if (!string.IsNullOrEmpty(EndDate)) { state.MeetingInfo.EndDate = DateTimeHelper.GetDateFromDateTimeString(EndDate, null, state.GetUserTimeZone(), false, false); } if (!string.IsNullOrEmpty(StartTime)) { state.MeetingInfo.StartTime = DateTimeHelper.GetDateFromDateTimeString(StartTime, null, state.GetUserTimeZone(), true, false); } if (!string.IsNullOrEmpty(EndTime)) { state.MeetingInfo.EndTime = DateTimeHelper.GetDateFromDateTimeString(EndTime, null, state.GetUserTimeZone(), false, false); } state.MeetingInfo.Duration = Duration * 60; state.MeetingInfo.Location = Location; state.MeetingInfo.MeetingRoomName = MeetingRoom; state.MeetingInfo.Building = Building; state.MeetingInfo.FloorNumber = FloorNumber; }
public void DigestState(CalendarSkillState state) { if (!string.IsNullOrEmpty(Date)) { state.MeetingInfo.StartDate = DateTimeHelper.GetDateFromDateTimeString(Date, null, state.GetUserTimeZone(), true, false); } if (!string.IsNullOrEmpty(Timezone)) { state.UserInfo.Timezone = DateTimeHelper.ConvertTimeZoneInfo(Timezone); } }
public void DigestState(CalendarSkillState state) { state.MeetingInfo.Title = Title; if (!string.IsNullOrEmpty(Timezone)) { state.UserInfo.Timezone = DateTimeHelper.ConvertTimeZoneInfo(Timezone); } if (NextEvent == true) { state.MeetingInfo.OrderReference = CalendarCommonStrings.Next; } if (!string.IsNullOrEmpty(StartDate)) { state.MeetingInfo.StartDate = DateTimeHelper.GetDateFromDateTimeString(StartDate, null, state.GetUserTimeZone(), true, false); state.MeetingInfo.StartDateString = StartDate; } if (!string.IsNullOrEmpty(StartTime)) { state.MeetingInfo.StartTime = DateTimeHelper.GetDateFromDateTimeString(StartTime, null, state.GetUserTimeZone(), true, false); } }
public void DigestState(CalendarSkillState state) { state.MeetingInfo.Title = Title; if (!string.IsNullOrEmpty(Timezone)) { state.UserInfo.Timezone = DateTimeHelper.ConvertTimeZoneInfo(Timezone); } if (!string.IsNullOrEmpty(StartDate)) { state.MeetingInfo.StartDate = DateTimeHelper.GetDateFromDateTimeString(StartDate, null, state.GetUserTimeZone(), true, false); } if (!string.IsNullOrEmpty(StartTime)) { state.MeetingInfo.StartTime = DateTimeHelper.GetDateFromDateTimeString(StartTime, null, state.GetUserTimeZone(), true, false); } if (!string.IsNullOrEmpty(NewStartDate)) { state.UpdateMeetingInfo.NewStartDate = DateTimeHelper.GetDateFromDateTimeString(NewStartDate, null, state.GetUserTimeZone(), true, false); } if (!string.IsNullOrEmpty(NewStartTime)) { state.UpdateMeetingInfo.NewStartTime = DateTimeHelper.GetDateFromDateTimeString(NewStartTime, null, state.GetUserTimeZone(), true, false); } if (MoveTimeSpan.GetValueOrDefault() != 0) { state.UpdateMeetingInfo.MoveTimeSpan = MoveTimeSpan.GetValueOrDefault() * 60; } }