public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string activityIds = context.Request["activity_ids"]; if (string.IsNullOrEmpty(activityIds)) { resp.errcode = -1; resp.errmsg = "activity_ids 为必填项,请检查"; context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(resp)); return; } if (bllActivity.Update(new JuActivityInfo(), string.Format(" isDelete=1"), string.Format(" JuActivityID in ({0}) And WebsiteOwner='{1}' ", activityIds, bllActivity.WebsiteOwner)) == activityIds.Split(',').Length) { resp.errmsg = "ok"; resp.errcode = 0; resp.isSuccess = true; } else { resp.errcode = 1; resp.errmsg = "删除活动出错"; } context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(resp)); }
/// <summary> /// 编辑报名数据 /// </summary> /// <param name="context"></param> /// <returns></returns> private string EditActivityData(HttpContext context) { string activityId = context.Request["ActivityID"]; int uId = Convert.ToInt32(context.Request["UID"]); BLLJIMP.Model.ActivityDataInfo model = bllActivity.Get <BLLJIMP.Model.ActivityDataInfo>(string.Format(" ActivityID = '{0}' AND UID = {1} ", activityId, uId)); BLLJIMP.Model.ActivityDataInfo reqModel = bllActivity.ConvertRequestToModel <BLLJIMP.Model.ActivityDataInfo>(new BLLJIMP.Model.ActivityDataInfo()); WebsiteInfo websiteModel = bllWebsite.GetWebsiteInfo(bllWebsite.WebsiteOwner); reqModel.InsertDate = model.InsertDate; reqModel.IsDelete = model.IsDelete; reqModel.WeixinOpenID = model.WeixinOpenID; reqModel.SpreadUserID = model.SpreadUserID; reqModel.WebsiteOwner = model.WebsiteOwner; reqModel.MonitorPlanID = model.MonitorPlanID; reqModel.PaymentStatus = model.PaymentStatus; reqModel.OrderId = model.OrderId; reqModel.IsSignIn = model.IsSignIn; reqModel.UserId = model.UserId; reqModel.ActivityID = model.ActivityID; reqModel.Amount = model.Amount; reqModel.ArticleType = model.ArticleType; reqModel.CategoryId = model.CategoryId; reqModel.CouponName = model.CouponName; reqModel.Distance = model.Distance; reqModel.DistributionOffLineRecommendCode = model.DistributionOffLineRecommendCode; reqModel.DistributionOffLineRecommendName = model.DistributionOffLineRecommendName; reqModel.FromUserId = model.FromUserId; reqModel.GuaranteeCreditAcount = model.GuaranteeCreditAcount; reqModel.InsertDateStr = model.InsertDateStr; reqModel.IsFee = model.IsFee; reqModel.ItemAmount = model.ItemAmount; reqModel.ItemName = model.ItemName; reqModel.SpreadUserID = model.SpreadUserID; reqModel.Status = model.Status; reqModel.ToUserId = model.ToUserId; reqModel.UID = model.UID; reqModel.UseAmount = model.UseAmount; reqModel.UserLatitude = model.UserLatitude; reqModel.UserLongitude = model.UserLongitude; reqModel.UseScore = model.UseScore; if ( websiteModel.IsSynchronizationData == 1 && websiteModel.IsSynchronizationData != null && !string.IsNullOrWhiteSpace(model.UserId) ) { UserInfo userModel = bllUser.GetUserInfo(model.UserId); if (userModel != null) { userModel.Phone = model.Phone; userModel.TrueName = model.Name; bllWebsite.Update(userModel); } } if (bllActivity.Update(reqModel)) { resp.Status = 1; } else { resp.Msg = "编辑失败"; } return(Common.JSONHelper.ObjectToJson(resp)); }