protected void rpMaterial_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName == "del") { if (VShopHelper.DelteLotteryTicket(Convert.ToInt32(e.CommandArgument))) { this.ShowMsg("删除成功", true); this.BindMaterial(); } else { this.ShowMsg("删除失败", false); } } else if (e.CommandName == "start") { LotteryTicketInfo lotteryTicket = VShopHelper.GetLotteryTicket(Convert.ToInt32(e.CommandArgument)); if (lotteryTicket.OpenTime > DateTime.Now) { lotteryTicket.OpenTime = DateTime.Now; VShopHelper.UpdateLotteryTicket(lotteryTicket); this.BindMaterial(); } } }
protected void rpMaterial_ItemCommand(object source, System.Web.UI.WebControls.RepeaterCommandEventArgs e) { if (e.CommandName == "del") { if (VShopHelper.DelteLotteryTicket(System.Convert.ToInt32(e.CommandArgument))) { this.ShowMsg("删除成功", true); this.BindMaterial(); } else { this.ShowMsg("删除失败", false); } } else { if (e.CommandName == "start") { LotteryTicketInfo lotteryTicket = VShopHelper.GetLotteryTicket(System.Convert.ToInt32(e.CommandArgument)); if (lotteryTicket.OpenTime > System.DateTime.Now) { lotteryTicket.OpenTime = System.DateTime.Now; VShopHelper.UpdateLotteryTicket(lotteryTicket); base.Response.Write("<script>location.reload();</script>"); } } } }
protected void rpMaterial_ItemCommand(object source, System.Web.UI.WebControls.RepeaterCommandEventArgs e) { if (!(e.CommandName == "del")) { if (e.CommandName == "start") { int activityid = System.Convert.ToInt32(e.CommandArgument); LotteryTicketInfo lotteryTicket = VShopHelper.GetLotteryTicket(activityid); if (lotteryTicket.OpenTime > System.DateTime.Now) { lotteryTicket.OpenTime = System.DateTime.Now; VShopHelper.UpdateLotteryTicket(lotteryTicket); } this.ShowMsg("开启成功", true); this.BindMaterial(); } return; } int activityId = System.Convert.ToInt32(e.CommandArgument); if (VShopHelper.DelteLotteryTicket(activityId)) { this.ShowMsg("删除成功", true); this.BindMaterial(); return; } this.ShowMsg("删除失败", false); }
public void Delete(HttpContext context) { int?intParam = base.GetIntParam(context, "id", false); if (!intParam.HasValue) { throw new HidistroAshxException("错误的编号"); } if (VShopHelper.DelteLotteryTicket(intParam.Value)) { base.ReturnSuccessResult(context, "删除成功", 0, true); return; } throw new HidistroAshxException("删除失败!"); }