Exemple #1
0
        private void loadPromotion()
        {
            var info = HttpContext.Current.Session[sessionKey] as PromotionCollection;

            if (null == info)
            {
                const string format = "MM-dd-yyyy";
                info = PromotionConfigurationProvider.GetPromotionCollection(HLConfigManager.Platform, "zh-CN");
                if (info != null)
                {
                    DateTime            currentDateTime = DateUtils.GetCurrentLocalTime("CN");
                    PromotionCollection col             = new PromotionCollection();
                    foreach (var promoItem in info)
                    {
                        DateTime startDateTime = convertDateTime(promoItem.StartDate);
                        DateTime endDateTime   = convertDateTime(promoItem.EndDate);
                        if (startDateTime != DateTime.MaxValue && endDateTime != DateTime.MaxValue)
                        {
                            if (startDateTime <= currentDateTime && endDateTime > currentDateTime)
                            {
                                col.Add(promoItem);
                            }
                        }
                    }
                    HttpContext.Current.Session[sessionKey] = col;
                }
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     (Master as OrderingMaster).SetPageHeader("贵宾客户满意度问卷调查");
     lblError.Text             = string.Empty;
     pInfo                     = PromotionConfigurationProvider.GetPromotionCollection(HLConfigManager.Platform, "zh-CN");;
     Session["AttainedSurvey"] = false;
 }