Example #1
0
        /// <summary>
        /// 是否可以购买每周礼包
        /// </summary>
        /// <param name="managerInfo"></param>
        /// <returns></returns>
        private bool IsHaveBuyWeekGiftBag(ManagerChargenumberEntity managerInfo)
        {
            DateTime buyTime = ShareUtil.GetThisWeekDayDate(DayOfWeek.Monday);

            if (managerInfo != null && managerInfo.Idx > 0)
            {
                if (managerInfo.UpdateTiem >= buyTime) //购买过了
                {
                    return(false);
                }
            }
            return(true);
        }
Example #2
0
        /// <summary>
        /// 是否可以购买每周礼包
        /// </summary>
        /// <param name="managerInfo"></param>
        /// <param name="date"></param>
        /// <returns></returns>
        private bool IsHaveBuyWeekGiftBag(ManagerChargenumberEntity managerInfo, DateTime date)
        {
            DateTime startBuyTime = ShareUtil.GetThisWeekDayDate(DayOfWeek.Friday);
            DateTime endBuyTime   = ShareUtil.GetThisWeekDayDate(DayOfWeek.Sunday);

            if (managerInfo != null && managerInfo.Idx > 0)
            {
                if (managerInfo.UpdateTiem > startBuyTime) //购买过了
                {
                    return(false);
                }
            }
            if (date < startBuyTime) //时间未到
            {
                return(false);
            }
            return(true);
        }