protected override void AttachChildControls() { int num; int.TryParse(System.Web.HttpContext.Current.Request.QueryString.Get("id"), out num); LotteryTicketInfo lotteryTicket = VshopBrowser.GetLotteryTicket(num); if (lotteryTicket == null) { this.Page.ClientScript.RegisterStartupScript(base.GetType(), "myscript", "<script>$(function(){alert_h(\"活动还未开始或者已经结束!\",function(){window.location.href=\"/vshop/default.aspx\";});});</script>"); return; } if (!(HiContext.Current.User is Member)) { System.Web.HttpContext.Current.Response.Redirect("/Vshop/login.aspx?ReturnUrl=/Vshop/Tocket.aspx?id=" + num); return; } this.litActivityDesc = (System.Web.UI.WebControls.Literal) this.FindControl("litActivityDesc"); this.litPrizeNames = (Common_PrizeNames)this.FindControl("litPrizeNames"); this.litStartDate = (System.Web.UI.WebControls.Literal) this.FindControl("litStartDate"); this.litEndDate = (System.Web.UI.WebControls.Literal) this.FindControl("litEndDate"); this.litActivityDesc.Text = lotteryTicket.ActivityDesc; this.litPrizeNames.Activity = lotteryTicket; this.litStartDate.Text = lotteryTicket.OpenTime.ToString("yyyy年MM月dd日 HH:mm:ss"); this.litEndDate.Text = lotteryTicket.EndTime.ToString("yyyy年MM月dd日 HH:mm:ss"); PageTitle.AddSiteNameTitle("微抽奖"); }
protected override void AttachChildControls() { int num; int.TryParse(HttpContext.Current.Request.QueryString.Get("id"), out num); if (VshopBrowser.GetUserPrizeRecord(num) == null) { this.Context.Response.Redirect(this.Context.Request.Url.ToString().ToLower().Replace("ticket.aspx", "SignUp.aspx")); this.Context.Response.End(); } else { LotteryTicketInfo lotteryTicket = VshopBrowser.GetLotteryTicket(num); if (lotteryTicket == null) { base.GotoResourceNotFound(""); } this.hdID = (HiddenField)this.FindControl("hdID"); this.hdID.Value = num.ToString(); this.litActivityDesc = (Literal)this.FindControl("litActivityDesc"); this.litPrizeNames = (Common_PrizeNames)this.FindControl("litPrizeNames"); this.litStartDate = (Literal)this.FindControl("litStartDate"); this.litEndDate = (Literal)this.FindControl("litEndDate"); this.litActivityDesc.Text = lotteryTicket.ActivityDesc; this.litPrizeNames.Activity = lotteryTicket; this.litStartDate.Text = lotteryTicket.OpenTime.ToString("yyyy年MM月dd日 HH:mm:ss"); this.litEndDate.Text = lotteryTicket.EndTime.ToString("yyyy年MM月dd日 HH:mm:ss"); PageTitle.AddSiteNameTitle("微抽奖(" + lotteryTicket.ActivityName + ")"); } }
protected override void AttachChildControls() { int num = default(int); int.TryParse(HttpContext.Current.Request.QueryString.Get("id"), out num); LotteryTicketInfo lotteryTicket = VshopBrowser.GetLotteryTicket(num); MemberInfo user = HiContext.Current.User; if (user.UserId == 0) { HttpContext.Current.Response.Redirect("/Vshop/login.aspx?ReturnUrl=/Vshop/Ticket.aspx?id=" + num); } else if (lotteryTicket == null) { this.Page.ClientScript.RegisterStartupScript(base.GetType(), "myscript", "<script>$(function(){alert_h(\"活动还未开始或者已经结束!\",function(){window.location.href=\"/vshop/default.aspx\";});});</script>"); } else { if (lotteryTicket != null && !VshopBrowser.HasSignUp(num, HiContext.Current.UserId) && DateTime.Now >= lotteryTicket.StartTime) { HttpContext.Current.Response.Redirect($"~/vshop/SignUp.aspx?id={num}"); } if (lotteryTicket.StartTime > DateTime.Now || DateTime.Now > lotteryTicket.EndTime) { this.Page.ClientScript.RegisterStartupScript(base.GetType(), "myscript", "<script>$(function(){hideSignUpBtn();alert_h(\"活动还未开始或者已经结束!\",function(){window.location.href=\"/vshop/default.aspx\";});});</script>"); } if (lotteryTicket.OpenTime > DateTime.Now) { this.Page.ClientScript.RegisterStartupScript(base.GetType(), "myscript", "<script>$(function(){hideSignUpBtn();alert_h(\"抽奖还未开始!\",function(){window.location.href=\"/vshop/default.aspx\";});});</script>"); } this.litActivityDesc = (Literal)this.FindControl("litActivityDesc"); this.litPrizeNames = (Common_PrizeNames)this.FindControl("litPrizeNames"); this.litStartDate = (Literal)this.FindControl("litStartDate"); this.litEndDate = (Literal)this.FindControl("litEndDate"); this.hdTitle = (HtmlInputHidden)this.FindControl("hdTitle"); this.hdAppId = (HtmlInputHidden)this.FindControl("hdAppId"); this.hdDesc = (HtmlInputHidden)this.FindControl("hdDesc"); this.hdImgUrl = (HtmlInputHidden)this.FindControl("hdImgUrl"); this.hdLink = (HtmlInputHidden)this.FindControl("hdLink"); if (base.ClientType == ClientType.VShop) { SiteSettings masterSettings = SettingsManager.GetMasterSettings(); string local = (!string.IsNullOrWhiteSpace(lotteryTicket.ActivityPic)) ? lotteryTicket.ActivityPic : Globals.FullPath(masterSettings.LogoUrl); this.hdImgUrl.Value = Globals.FullPath(local); this.hdTitle.Value = lotteryTicket.ActivityName; this.hdDesc.Value = lotteryTicket.ActivityDesc; this.hdLink.Value = Globals.FullPath($"/vshop/Ticket?id={lotteryTicket.ActivityId}"); this.hdAppId.Value = masterSettings.WeixinAppId; } this.litActivityDesc.Text = lotteryTicket.ActivityDesc; this.litPrizeNames.Activity = lotteryTicket; Literal literal = this.litStartDate; DateTime dateTime = lotteryTicket.OpenTime; literal.Text = dateTime.ToString("yyyy年MM月dd日 HH:mm:ss"); Literal literal2 = this.litEndDate; dateTime = lotteryTicket.EndTime; literal2.Text = dateTime.ToString("yyyy年MM月dd日 HH:mm:ss"); PageTitle.AddSiteNameTitle("微抽奖"); } }
protected override void AttachChildControls() { int num; int.TryParse(HttpContext.Current.Request.QueryString.Get("id"), out num); LotteryTicketInfo lotteryTicket = VshopBrowser.GetLotteryTicket(num); if (lotteryTicket == null) { base.GotoResourceNotFound(""); } if ((lotteryTicket != null) && VshopBrowser.HasSignUp(num, Globals.GetCurrentMemberUserId())) { HttpContext.Current.Response.Redirect(string.Format("~/vshop/ticket.aspx?id={0}", num)); } if ((lotteryTicket.StartTime > DateTime.Now) || (DateTime.Now > lotteryTicket.EndTime)) { this.Page.ClientScript.RegisterStartupScript(base.GetType(), "myscript", "<script>$(function(){hideSignUpBtn();alert_h(\"活动还未开始或者已经结束!\",function(){window.location.href=\"/vshop/default.aspx\";});});</script>"); } this.pnlInfo = (Panel)this.FindControl("pnlInfo"); this.litActivityDesc = (Literal)this.FindControl("litActivityDesc"); this.litPrizeNames = (Common_PrizeNames)this.FindControl("litPrizeNames"); this.litStartDate = (Literal)this.FindControl("litStartDate"); this.litEndDate = (Literal)this.FindControl("litEndDate"); this.pnlInfo.Visible = !string.IsNullOrEmpty(lotteryTicket.InvitationCode); this.litActivityDesc.Text = lotteryTicket.ActivityDesc; this.litPrizeNames.Activity = lotteryTicket; this.litStartDate.Text = lotteryTicket.OpenTime.ToString("yyyy年MM月dd日 HH:mm:ss"); this.litEndDate.Text = lotteryTicket.EndTime.ToString("yyyy年MM月dd日 HH:mm:ss"); PageTitle.AddSiteNameTitle("抽奖报名"); }
protected override void AttachChildControls() { int num = default(int); int.TryParse(HttpContext.Current.Request.QueryString.Get("id"), out num); MemberInfo user = HiContext.Current.User; if (user.UserId == 0) { HttpContext.Current.Response.Redirect("/Vshop/login.aspx?ReturnUrl=/Vshop/SignUp.aspx?id=" + num); } else { LotteryTicketInfo lotteryTicket = VshopBrowser.GetLotteryTicket(num); if (lotteryTicket == null) { this.Page.ClientScript.RegisterStartupScript(base.GetType(), "myscript", "<script>$(function(){hideSignUpBtn();alert_h(\"活动还未开始或者已经结束!\",function(){window.location.href=\"/vshop/default.aspx\";});});</script>"); } else { if (lotteryTicket != null && VshopBrowser.HasSignUp(num, HiContext.Current.UserId) && DateTime.Now >= lotteryTicket.OpenTime) { HttpContext.Current.Response.Redirect($"~/vshop/ticket.aspx?id={num}"); } if (lotteryTicket.StartTime > DateTime.Now || DateTime.Now > lotteryTicket.EndTime) { this.Page.ClientScript.RegisterStartupScript(base.GetType(), "myscript", "<script>$(function(){hideSignUpBtn();alert_h(\"活动还未开始或者已经结束!\",function(){window.location.href=\"/vshop/default.aspx\";});});</script>"); } this.pnlInfo = (Panel)this.FindControl("pnlInfo"); this.litActivityDesc = (Literal)this.FindControl("litActivityDesc"); this.litPrizeNames = (Common_PrizeNames)this.FindControl("litPrizeNames"); this.litStartDate = (Literal)this.FindControl("litStartDate"); this.litEndDate = (Literal)this.FindControl("litEndDate"); this.pnlInfo.Visible = !string.IsNullOrEmpty(lotteryTicket.InvitationCode); this.litActivityDesc.Text = lotteryTicket.ActivityDesc; this.litPrizeNames.Activity = lotteryTicket; Literal literal = this.litStartDate; DateTime dateTime = lotteryTicket.OpenTime; literal.Text = dateTime.ToString("yyyy年MM月dd日 HH:mm:ss"); Literal literal2 = this.litEndDate; dateTime = lotteryTicket.EndTime; literal2.Text = dateTime.ToString("yyyy年MM月dd日 HH:mm:ss"); PageTitle.AddSiteNameTitle("抽奖报名"); } } }
protected override void AttachChildControls() { int num; int.TryParse(HttpContext.Current.Request.QueryString.Get("id"), out num); LotteryTicketInfo lotteryTicket = VshopBrowser.GetLotteryTicket(num); if (lotteryTicket == null) { base.GotoResourceNotFound(""); } this.litActivityDesc = (Literal)this.FindControl("litActivityDesc"); this.litPrizeNames = (Common_PrizeNames)this.FindControl("litPrizeNames"); this.litStartDate = (Literal)this.FindControl("litStartDate"); this.litEndDate = (Literal)this.FindControl("litEndDate"); this.litActivityDesc.Text = lotteryTicket.ActivityDesc; this.litPrizeNames.Activity = lotteryTicket; this.litStartDate.Text = lotteryTicket.OpenTime.ToString("yyyy年MM月dd日 HH:mm:ss"); this.litEndDate.Text = lotteryTicket.EndTime.ToString("yyyy年MM月dd日 HH:mm:ss"); PageTitle.AddSiteNameTitle("微抽奖"); }
protected override void AttachChildControls() { int num; int.TryParse(System.Web.HttpContext.Current.Request.QueryString.Get("id"), out num); if (!(HiContext.Current.User is Member)) { System.Web.HttpContext.Current.Response.Redirect("/Vshop/login.aspx?ReturnUrl=/Vshop/SignUp.aspx?id=" + num); return; } LotteryTicketInfo lotteryTicket = VshopBrowser.GetLotteryTicket(num); if (lotteryTicket == null) { this.Page.ClientScript.RegisterStartupScript(base.GetType(), "myscript", "<script>$(function(){hideSignUpBtn();alert_h(\"活动还未开始或者已经结束!\",function(){window.location.href=\"/vshop/default.aspx\";});});</script>"); return; } if (lotteryTicket != null && VshopBrowser.HasSignUp(num, HiContext.Current.User.UserId)) { System.Web.HttpContext.Current.Response.Redirect(string.Format("~/vshop/ticket.aspx?id={0}", num)); } if (lotteryTicket.StartTime > System.DateTime.Now || System.DateTime.Now > lotteryTicket.EndTime) { this.Page.ClientScript.RegisterStartupScript(base.GetType(), "myscript", "<script>$(function(){hideSignUpBtn();alert_h(\"活动还未开始或者已经结束!\",function(){window.location.href=\"/vshop/default.aspx\";});});</script>"); } this.pnlInfo = (System.Web.UI.WebControls.Panel) this.FindControl("pnlInfo"); this.litActivityDesc = (System.Web.UI.WebControls.Literal) this.FindControl("litActivityDesc"); this.litPrizeNames = (Common_PrizeNames)this.FindControl("litPrizeNames"); this.litStartDate = (System.Web.UI.WebControls.Literal) this.FindControl("litStartDate"); this.litEndDate = (System.Web.UI.WebControls.Literal) this.FindControl("litEndDate"); this.pnlInfo.Visible = !string.IsNullOrEmpty(lotteryTicket.InvitationCode); this.litActivityDesc.Text = lotteryTicket.ActivityDesc; this.litPrizeNames.Activity = lotteryTicket; this.litStartDate.Text = lotteryTicket.OpenTime.ToString("yyyy年MM月dd日 HH:mm:ss"); this.litEndDate.Text = lotteryTicket.EndTime.ToString("yyyy年MM月dd日 HH:mm:ss"); PageTitle.AddSiteNameTitle("抽奖报名"); }