/// <summary> /// 添加付款记录 /// </summary> /// <param name="context"></param> /// <returns></returns> private string AddCrowdFundRecord(HttpContext context) { CrowdFundRecord model = bllBase.ConvertRequestToModel <CrowdFundRecord>(new CrowdFundRecord()); model.UserID = bllBase.GetCurrUserID(); model.RecordID = int.Parse(bllBase.GetGUID(ZentCloud.BLLJIMP.TransacType.CommAdd)); model.InsertDate = DateTime.Now; if (model.Amount <= 0) { resp.Msg = "金额需大于0"; goto outoff; } if (bllBase.Add(model)) { resp.Status = 1; resp.ExInt = model.RecordID; } else { resp.Status = 0; resp.Msg = "付款失败"; } outoff: return(Common.JSONHelper.ObjectToJson(resp)); }
ZentCloud.BLLJIMP.Model.UserInfo userInfo; //当前登陆的用户 protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { AutoId = Request["AutoId"]; if (!string.IsNullOrEmpty(AutoId)) { GetTheVoteInfo(AutoId); MonitorEventDetailsInfo detailInfo = new MonitorEventDetailsInfo(); detailInfo.MonitorPlanID = int.Parse(AutoId); detailInfo.EventType = 0; detailInfo.EventBrowser = HttpContext.Current.Request.Browser == null ? "" : HttpContext.Current.Request.Browser.ToString(); detailInfo.EventBrowserID = HttpContext.Current.Request.Browser.Id;; if (HttpContext.Current.Request.Browser.Beta) { detailInfo.EventBrowserIsBata = "测试版"; } else { detailInfo.EventBrowserIsBata = "正式版"; } detailInfo.EventBrowserVersion = HttpContext.Current.Request.Browser.Version; detailInfo.EventDate = DateTime.Now; if (HttpContext.Current.Request.Browser.Win16) { detailInfo.EventSysByte = "16位系统"; } else if (HttpContext.Current.Request.Browser.Win32) { detailInfo.EventSysByte = "32位系统"; } else { detailInfo.EventSysByte = "64位系统"; } detailInfo.EventSysPlatform = HttpContext.Current.Request.Browser.Platform; detailInfo.SourceIP = Common.MySpider.GetClientIP(); detailInfo.IPLocation = Common.MySpider.GetIPLocation(detailInfo.SourceIP); detailInfo.SourceUrl = HttpContext.Current.Request.Url.ToString(); detailInfo.WebsiteOwner = bll.WebsiteOwner; detailInfo.ModuleType = "thevote"; if (bll.IsLogin) { detailInfo.EventUserID = bll.GetCurrUserID(); } detailInfo.ShareTimestamp = "3"; bll.Add(detailInfo); int ipCount = bll.GetCount <MonitorEventDetailsInfo>(" SourceIP ", string.Format(" WebsiteOwner='{0}' AND MonitorPlanID={1} AND ShareTimestamp='3' ", bll.WebsiteOwner, int.Parse(AutoId))); int uvCount = bll.GetCount <MonitorEventDetailsInfo>(" EventUserID ", string.Format(" EventUserID is not null AND WebsiteOwner='{0}' AND MonitorPlanID={1} AND ShareTimestamp='3' ", bll.WebsiteOwner, int.Parse(AutoId))); int pvCount = bll.GetCount <MonitorEventDetailsInfo>(string.Format(" WebsiteOwner='{0}' AND MonitorPlanID={1} AND ShareTimestamp='3' ", bll.WebsiteOwner, int.Parse(AutoId))); bll.Update(new TheVoteInfo(), string.Format(" IP={0},PV={1},UV={2} ", ipCount, pvCount, uvCount), string.Format(" AutoId={0} ", AutoId)); } else { StringBuilder str = new StringBuilder(); str.AppendFormat("<li>"); str.AppendFormat("<div>{0}</div>", "没有数据"); str.AppendFormat("</li>"); needList.InnerHtml = str.ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { Id = Convert.ToInt32(Request["AutoId"]); shareLink = string.Format("http://{0}{1}?AutoId={2}", Request.Url.Host, Request.FilePath, Id); wxsInfo = bll.Get <BLLJIMP.Model.WXShowInfo>(" AutoId=" + Id); if (wxsInfo != null) { string sourceimg = wxsInfo.ShowImg; wxsInfo.ShowImg = "http://" + Request.Url.Host + wxsInfo.ShowImg; List <BLLJIMP.Model.WXShowImgInfo> wxsInfos = bll.GetList <BLLJIMP.Model.WXShowImgInfo>(" ShowId=" + wxsInfo.AutoId); if (wxsInfos != null) { for (int i = 0; i < wxsInfos.Count; i++) { strInit.AppendFormat("<div class=\"listli\"><img src=\"{0}\" class=\"img\" data-original=\"background-image:url({0}); \"></span>", wxsInfos[i].ImgStr); strInit.AppendFormat("<span class=\"text\" style=\"color:{3};\"><h2 style=\"color:{2};\">{0}</h2>{1}</span>", wxsInfos[i].ShowTitle, wxsInfos[i].ShowContext, wxsInfos[i].ShowTitleColor, wxsInfos[i].ShowContextColor); strInit.AppendFormat("<span class=\"nextbtn\"><span class=\"smallicon\"></span></span></div>"); if (string.IsNullOrEmpty(wxsInfos[i].ShowTitle) && string.IsNullOrEmpty(wxsInfos[i].ShowContext)) { stranimation.Append("case " + i + ":_this.animation(current.find(\".img\"), " + wxsInfos[i].ShowAnimation.ToString() + ", function () {"); stranimation.Append(" _this.animation(current.find(\".nextbtn\"), 99);"); stranimation.Append("});break;"); stranimation.Append("\n"); } else { //stranimation.AppendFormat("case " + i + ":_this.animation(current.find(\".img\"), " + wxsInfos[i].ShowAnimation + ", function () {"); string str = "case " + i + ":"; stranimation.Append(str + "_this.animation(current.find(\".img\")," + wxsInfos[i].ShowAnimation + ", function () {"); stranimation.Append("_this.animation(current.find(\".text\"), 2,"); string s = "function () { "; stranimation.Append(s + "_this.animation(current.find(\".nextbtn\"), 99)});"); stranimation.Append("})"); stranimation.Append(";break;"); stranimation.Append("\n"); } } } if (!string.IsNullOrEmpty(wxsInfo.ShowUrl)) { stranimation.Append("case " + wxsInfos.Count + ":_this.animation(current.find(\".blackpage\"), 15, function (){ "); stranimation.Append("_this.maininitstate++;if(_this.maininitstate"); stranimation.Append(" == 2) { _this.container.css({ \"-webkit-transition\""); stranimation.Append(": \"opacity 1s ease-out\", \"opacity\": \"0\" });"); stranimation.AppendFormat("window.location.href = '{0}';", wxsInfo.ShowUrl); stranimation.Append(" var picanimate1end = function () { _this.container[0].removeEventListener(\"webkitTransitionEnd\", picanimate1end, false);"); stranimation.Append("_this.container.remove();}; _this.container[0].addEventListener(\"webkitTransitionEnd\", picanimate1end, false);"); stranimation.Append(" }}); break;"); stranimation.Append("\n"); } stranimation.Append("default "); stranimation.Append(": _this.animation(current.find(\".img\")"); stranimation.Append(", 1, function () {"); stranimation.Append("_this.animation(current.find(\".text\"), 2,"); stranimation.Append("function () { _this.animation(current.find(\".nextbtn\"), 99)});"); stranimation.Append("});"); MonitorEventDetailsInfo detailInfo = new MonitorEventDetailsInfo(); detailInfo.MonitorPlanID = Id; detailInfo.EventType = 0; detailInfo.EventBrowser = HttpContext.Current.Request.Browser == null ? "" : HttpContext.Current.Request.Browser.ToString(); detailInfo.EventBrowserID = HttpContext.Current.Request.Browser.Id;; if (HttpContext.Current.Request.Browser.Beta) { detailInfo.EventBrowserIsBata = "测试版"; } else { detailInfo.EventBrowserIsBata = "正式版"; } detailInfo.EventBrowserVersion = HttpContext.Current.Request.Browser.Version; detailInfo.EventDate = DateTime.Now; if (HttpContext.Current.Request.Browser.Win16) { detailInfo.EventSysByte = "16位系统"; } else if (HttpContext.Current.Request.Browser.Win32) { detailInfo.EventSysByte = "32位系统"; } else { detailInfo.EventSysByte = "64位系统"; } detailInfo.EventSysPlatform = HttpContext.Current.Request.Browser.Platform; detailInfo.SourceIP = Common.MySpider.GetClientIP(); detailInfo.IPLocation = Common.MySpider.GetIPLocation(detailInfo.SourceIP); detailInfo.SourceUrl = HttpContext.Current.Request.Url.ToString(); detailInfo.RequesSourcetUrl = HttpContext.Current.Request.UrlReferrer != null?HttpContext.Current.Request.UrlReferrer.ToString() : ""; detailInfo.WebsiteOwner = bll.WebsiteOwner; detailInfo.ModuleType = "wshow"; if (bll.IsLogin) { detailInfo.EventUserID = bll.GetCurrUserID(); } bll.Add(detailInfo); int ipCount = bll.GetCount <MonitorEventDetailsInfo>(" SourceIP ", string.Format(" WebsiteOwner='{0}' AND MonitorPlanID={1} ", bll.WebsiteOwner, Id)); int uvCount = bll.GetCount <MonitorEventDetailsInfo>(" EventUserID ", string.Format(" EventUserID is not null AND WebsiteOwner='{0}' AND MonitorPlanID={1} ", bll.WebsiteOwner, Id)); int pvCount = bll.GetCount <MonitorEventDetailsInfo>(string.Format(" WebsiteOwner='{0}' AND MonitorPlanID={1} ", bll.WebsiteOwner, Id)); wxsInfo.PV = pvCount; wxsInfo.IP = ipCount; wxsInfo.UV = uvCount; wxsInfo.ShowImg = sourceimg; bll.Update(wxsInfo); if (!string.IsNullOrEmpty(Request["sid"])) //有推广人 { if (!string.IsNullOrEmpty(wxsInfo.ShowUrl)) { if (wxsInfo.ShowUrl.EndsWith(".chtml")) { //替换链接 var par = wxsInfo.ShowUrl.Split('/'); wxsInfo.ShowUrl = wxsInfo.ShowUrl.Replace(par[3], string.Format("{0}/{1}", par[3], Request["sid"])); shareLink = string.Format("{0}&sid={1}", shareLink, Request["sid"]); } } } else { if (bll.IsLogin) { if (!string.IsNullOrEmpty(wxsInfo.ShowUrl)) { if (wxsInfo.ShowUrl.EndsWith(".chtml")) { UserInfo CurrentUserInfo = bll.GetCurrentUserInfo(); string CurrentUserIDHex = Convert.ToString(CurrentUserInfo.AutoID, 16); //替换链接 var par = wxsInfo.ShowUrl.Split('/'); wxsInfo.ShowUrl = wxsInfo.ShowUrl.Replace(par[3], string.Format("{0}/{1}", par[3], CurrentUserIDHex)); shareLink = string.Format("{0}&sid={1}", shareLink, CurrentUserIDHex); } } } } } }
protected void Page_Load(object sender, EventArgs e) { if (!MemberCenter.checkUser(this.Context)) { return; } if (Request["id"] != null) { this.Title = "修改银行卡"; model = bll.Get <BindBankCard>(string.Format("AutoID={0} And UserId='{1}'", Request["id"], bll.GetCurrUserID())); } else { this.Title = "添加银行卡"; } }
public void ProcessRequest(HttpContext context) { string lotteryId = context.Request["lottery_id"]; WXLotteryV1 model = bllLottery.GetLottery(int.Parse(lotteryId)); if (model == null) { apiResp.msg = "摇一摇不存在"; apiResp.code = (int)BLLJIMP.Enums.APIErrCode.IsNotFound; context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(apiResp)); return; } MonitorEventDetailsInfo detailInfo = new MonitorEventDetailsInfo(); detailInfo.MonitorPlanID = int.Parse(lotteryId); detailInfo.EventType = 0; detailInfo.EventBrowser = HttpContext.Current.Request.Browser == null ? "" : HttpContext.Current.Request.Browser.ToString(); detailInfo.EventBrowserID = HttpContext.Current.Request.Browser.Id;; if (HttpContext.Current.Request.Browser.Beta) { detailInfo.EventBrowserIsBata = "测试版"; } else { detailInfo.EventBrowserIsBata = "正式版"; } detailInfo.EventBrowserVersion = HttpContext.Current.Request.Browser.Version; detailInfo.EventDate = DateTime.Now; if (HttpContext.Current.Request.Browser.Win16) { detailInfo.EventSysByte = "16位系统"; } else if (HttpContext.Current.Request.Browser.Win32) { detailInfo.EventSysByte = "32位系统"; } else { detailInfo.EventSysByte = "64位系统"; } detailInfo.EventSysPlatform = HttpContext.Current.Request.Browser.Platform; detailInfo.SourceIP = ZentCloud.Common.MySpider.GetClientIP(); detailInfo.IPLocation = ZentCloud.Common.MySpider.GetIPLocation(detailInfo.SourceIP); detailInfo.SourceUrl = HttpContext.Current.Request.Url.ToString(); detailInfo.WebsiteOwner = bll.WebsiteOwner; if (bll.IsLogin) { detailInfo.EventUserID = bll.GetCurrUserID(); } bool eventDetail = bll.Add(detailInfo); int ipCount = bll.GetCount <MonitorEventDetailsInfo>(" SourceIP ", string.Format(" WebsiteOwner='{0}' AND MonitorPlanID={1} ", bll.WebsiteOwner, int.Parse(lotteryId))); int uvCount = bll.GetCount <MonitorEventDetailsInfo>(" EventUserID ", string.Format(" EventUserID is not null AND WebsiteOwner='{0}' AND MonitorPlanID={1} ", bll.WebsiteOwner, int.Parse(lotteryId))); int pvCount = bll.GetCount <MonitorEventDetailsInfo>(string.Format(" WebsiteOwner='{0}' AND MonitorPlanID={1} ", bll.WebsiteOwner, int.Parse(lotteryId))); bll.Update(new WXLotteryV1(), string.Format(" IP={0},PV={1},UV={2} ", ipCount, pvCount, uvCount), string.Format(" LotteryID={0} ", int.Parse(lotteryId))); apiResp.msg = "操作完成"; apiResp.status = true; context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(apiResp)); }
/// <summary> /// 获取活动列表 /// </summary> /// <param name="context"></param> /// <returns></returns> private string GetForwars(HttpContext context) { int pageIndex = Convert.ToInt32(context.Request["PageIndex"]); int pageSize = Convert.ToInt32(context.Request["PageSize"]); string activityName = context.Request["ActivityName"]; string strWhere = string.Format(" WebsiteOwner= '{0}' ", bll.WebsiteOwner); if (!string.IsNullOrEmpty(activityName)) { strWhere += string.Format(" And ActivityName like '%{0}%'", activityName); } strWhere += string.Format(" And (Select Count(*) from ZCJ_JuActivityInfo where ZCJ_JuActivityInfo.JuActivityID=ActivityId And ZCJ_JuActivityInfo.IsDelete=0 And IsHide=0)>0 or (ForwardType='questionnaire' And WebsiteOwner='{0}' AND (Select Count(*) from ZCJ_Questionnaire where ZCJ_Questionnaire.QuestionnaireID=ActivityId And ZCJ_Questionnaire.IsDelete=0 And QuestionnaireVisible=1)>0)", bll.WebsiteOwner); int totalCount = this.bllJuactivity.GetCount <BLLJIMP.Model.ActivityForwardInfo>(strWhere.ToString()); List <BLLJIMP.Model.ActivityForwardInfo> data = this.bllJuactivity.GetLit <BLLJIMP.Model.ActivityForwardInfo>(pageSize, pageIndex, strWhere.ToString(), " InsertDate DESC "); if (data == null) { resp.Status = -1; resp.Msg = "列表为空"; } else { List <BLLJIMP.Model.ActivityForwardInfo> dataList = new List <BLLJIMP.Model.ActivityForwardInfo>(); foreach (BLLJIMP.Model.ActivityForwardInfo item in data) { BLLJIMP.Model.JuActivityInfo juActivityInfo = null; BLLJIMP.Model.Questionnaire question = null; System.Text.StringBuilder sbWhere = new StringBuilder(); if (item.ForwardType == "questionnaire") { question = bllActivity.Get <Questionnaire>(string.Format(" QuestionnaireID='{0}'", item.ActivityId)); sbWhere.AppendFormat(" MonitorPlanID='{0}' AND LinkName='{1}' ", item.ActivityId, currentUserInfo.UserID); } else { juActivityInfo = bllJuactivity.Get <BLLJIMP.Model.JuActivityInfo>(" JuActivityID=" + item.ActivityId); sbWhere.AppendFormat(" MonitorPlanID='{0}' And LinkName='{1}'", juActivityInfo.MonitorPlanID, currentUserInfo.UserID); } int totalCounts = bllJuactivity.GetCount <BLLJIMP.Model.MonitorLinkInfo>(sbWhere.ToString()); string type = string.Empty; if (item.ForwardType == "questionnaire") { type = "问卷"; } else if (item.ForwardType == "fans") { type = "文章"; } else { type = "活动"; } if (juActivityInfo != null || question != null) { if (juActivityInfo != null && juActivityInfo.ActivityStatus == 1) { totalCount--; continue; } if (totalCounts > 0) { if (juActivityInfo != null) { dataList.Add(new ActivityForwardInfo { ActivityId = item.ActivityId, ActivityName = item.ActivityName, InsertDate = item.InsertDate, ReadNum = juActivityInfo.UV, ThumbnailsPath = item.ThumbnailsPath, UserId = item.UserId, PV = juActivityInfo.PV, IsForwar = "已转发", ForwarNum = juActivityInfo.SignUpTotalCount, ForwardType = type, CurrentUserId = bll.GetCurrUserID() }); } else { dataList.Add(new ActivityForwardInfo { ActivityId = item.ActivityId, ActivityName = item.ActivityName, InsertDate = item.InsertDate, ReadNum = question.UV, ThumbnailsPath = item.ThumbnailsPath, UserId = item.UserId, PV = question.PV, IsForwar = "已转发", ForwardType = type, CurrentUserId = bll.GetCurrUserID() }); } } else { if (juActivityInfo != null) { dataList.Add(new ActivityForwardInfo { ActivityId = item.ActivityId, ActivityName = item.ActivityName, InsertDate = item.InsertDate, ReadNum = juActivityInfo.UV, ThumbnailsPath = item.ThumbnailsPath, UserId = item.UserId, IsForwar = "", PV = juActivityInfo.PV, ForwarNum = juActivityInfo.SignUpTotalCount, ForwardType = type, CurrentUserId = bll.GetCurrUserID() }); } else { dataList.Add(new ActivityForwardInfo { ActivityId = item.ActivityId, ActivityName = item.ActivityName, InsertDate = item.InsertDate, ReadNum = question.UV, ThumbnailsPath = item.ThumbnailsPath, UserId = item.UserId, IsForwar = "", PV = question.PV, ForwardType = type, CurrentUserId = bll.GetCurrUserID() }); } } } else { dataList.Add(item); } } int totalPage = bll.GetTotalPage(totalCount, pageSize); if ((totalPage > pageIndex) && (pageIndex.Equals(1))) { resp.ExStr = "1";//是否增加下一页按钮 } resp.Status = 0; resp.ExObj = dataList; } return(Common.JSONHelper.ObjectToJson(resp)); }