private void grdLimitedTimeDiscountList_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e) { int id = (int)this.grdLimitedTimeDiscountList.DataKeys[e.RowIndex].Value; if (!LimitedTimeDiscountHelper.UpdateDiscountStatus(id, DiscountStatus.Delete)) { this.ShowMsg("未知错误", false); return; } this.BindData(); this.ShowMsg("成功删除了选择的活动", true); }
private void ChangeStatus(System.Web.HttpContext context) { int id = Globals.RequestFormNum("id"); int num = Globals.RequestFormNum("status"); bool flag = LimitedTimeDiscountHelper.UpdateDiscountStatus(id, (num == 3) ? DiscountStatus.Normal : DiscountStatus.Stop); if (flag) { context.Response.Write("{\"msg\":\"success\"}"); return; } context.Response.Write("{\"msg\":\"fial\"}"); }
private void ChangeStatus(HttpContext context) { int id = Globals.RequestFormNum("id"); int num2 = Globals.RequestFormNum("status"); if (LimitedTimeDiscountHelper.UpdateDiscountStatus(id, (num2 == 3) ? DiscountStatus.Normal : DiscountStatus.Stop)) { context.Response.Write("{\"msg\":\"success\"}"); } else { context.Response.Write("{\"msg\":\"fial\"}"); } }