Exemple #1
0
        /// <summary>
        /// 修改微信推广状态
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        private string BatChangWeixinSpreadState(HttpContext context)
        {
            string[] ids    = context.Request["ids"].Split(',');
            string   status = context.Request["status"];

            int count = 0;

            foreach (string weixinSpreadID in ids)
            {
                WeixinSpread spreadinfo = bll.Get <WeixinSpread>(string.Format("WeixinSpreadID={0}", weixinSpreadID));
                if (spreadinfo != null)
                {
                    if (bll.Update(spreadinfo, string.Format("Status='{0}'", status), string.Format("WeixinSpreadID={0}", weixinSpreadID)) > 0)
                    {
                        if (bll.Update(new MonitorPlan(), string.Format("PlanStatus='{0}'", status), string.Format("MonitorPlanID={0}", spreadinfo.PlanID)) > 0)
                        {
                            count++;
                        }
                    }
                }
            }
            if (count == ids.Length)
            {
                return("true");
            }
            else
            {
                return("false");
            }
        }
Exemple #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     uv           = Request["uv"];
     aid          = Convert.ToInt32(Request["aid"]);
     share        = Request["share"];
     spreadUserID = Request["spreaduserid"];
     bll          = new BLLMonitor();
     activity     = bll.Get <JuActivityInfo>(" JuActivityID =  " + aid.ToString());
     if (activity == null)
     {
         this.ViewState["mplanId"] = Request["aid"];
         return;
     }
     this.ViewState["mplanId"] = activity.MonitorPlanID;
 }