public IHttpActionResult CheckTimeOfJoiningMeeting(string itemId, int offsetTime)
        {
            var IsRestrictTimeOfJoiningEnabled = SharePointRepository.GetConfigValueByKey("TimeOfJoiningCall");

            if (IsRestrictTimeOfJoiningEnabled.ToUpper() == "TRUE")
            {
                var dtStart = SharePointRepository.GetStartDateOfMeeting(itemId);
                var span    = dtStart - DateTime.UtcNow.AddHours(8).AddMinutes(-offsetTime);
                if (span.TotalMinutes > 30)
                {
                    return(Ok(false));;
                }
            }

            return(Ok(true));;
        }
示例#2
0
 /// <summary>
 /// Gets the start date of meeting.
 /// </summary>
 /// <param name="itemId">The item identifier.</param>
 /// <returns></returns>
 public static DateTime GetStartDateOFMeeting(string itemId)
 {
     return(SharePointRepository.GetStartDateOfMeeting(itemId));
 }