private void grdProducts_ItemCommand(object sender, System.Web.UI.WebControls.RepeaterCommandEventArgs e)
 {
     if (e.CommandName == "MoveProduct")
     {
         object commandArgument = e.CommandArgument;
         if (!string.IsNullOrEmpty(commandArgument.ToString()))
         {
             bool flag = LimitedTimeDiscountHelper.DeleteDiscountProduct(commandArgument.ToString());
             if (flag)
             {
                 this.ShowMsgAndReUrl("移除成功", true, "LimitedTimeDiscountProduct.aspx?id=" + Globals.RequestQueryNum("id"));
             }
         }
     }
     if (e.CommandName == "Stop")
     {
         int num = 0;
         if (int.TryParse(e.CommandArgument.ToString(), out num))
         {
             LimitedTimeDiscountProductInfo discountProductInfoById = LimitedTimeDiscountHelper.GetDiscountProductInfoById(num);
             int status = (discountProductInfoById.Status == 3) ? 1 : 3;
             if (!string.IsNullOrEmpty(num.ToString()))
             {
                 bool flag2 = LimitedTimeDiscountHelper.ChangeDiscountProductStatus(num.ToString(), status);
                 if (flag2)
                 {
                     this.ShowMsgAndReUrl("状态修改成功", true, "LimitedTimeDiscountProduct.aspx?id=" + Globals.RequestQueryNum("id"));
                 }
             }
         }
     }
 }
        private void DeleteDiscountProduct(System.Web.HttpContext context)
        {
            string text = Globals.RequestFormStr("limitedTimeDiscountProductIds");

            if (!string.IsNullOrEmpty(text))
            {
                bool flag = LimitedTimeDiscountHelper.DeleteDiscountProduct(text);
                if (flag)
                {
                    context.Response.Write("{\"msg\":\"success\"}");
                    return;
                }
                context.Response.Write("{\"msg\":\"fail\"}");
            }
        }
        private void DeleteDiscountProduct(HttpContext context)
        {
            string str = Globals.RequestFormStr("limitedTimeDiscountProductIds");

            if (!string.IsNullOrEmpty(str))
            {
                if (LimitedTimeDiscountHelper.DeleteDiscountProduct(str))
                {
                    context.Response.Write("{\"msg\":\"success\"}");
                }
                else
                {
                    context.Response.Write("{\"msg\":\"fail\"}");
                }
            }
        }
 private void grdProducts_ItemCommand(object sender, RepeaterCommandEventArgs e)
 {
     if (e.CommandName == "MoveProduct")
     {
         object commandArgument = e.CommandArgument;
         if (!string.IsNullOrEmpty(commandArgument.ToString()) && LimitedTimeDiscountHelper.DeleteDiscountProduct(commandArgument.ToString()))
         {
             this.ShowMsgAndReUrl("移除成功", true, "LimitedTimeDiscountProduct.aspx?id=" + Globals.RequestQueryNum("id"));
         }
     }
     if (e.CommandName == "Stop")
     {
         int result = 0;
         if (int.TryParse(e.CommandArgument.ToString(), out result))
         {
             int status = (LimitedTimeDiscountHelper.GetDiscountProductInfoById(result).Status == 3) ? 1 : 3;
             if (!string.IsNullOrEmpty(result.ToString()) && LimitedTimeDiscountHelper.ChangeDiscountProductStatus(result.ToString(), status))
             {
                 this.ShowMsgAndReUrl("状态修改成功", true, "LimitedTimeDiscountProduct.aspx?id=" + Globals.RequestQueryNum("id"));
             }
         }
     }
 }