protected void Page_Load(object sender, EventArgs e) { try { BLLJIMP.Model.UserInfo uinfo = bll.GetCurrentUserInfo(); if (string.IsNullOrEmpty(uinfo.TrueName) || string.IsNullOrEmpty(uinfo.Phone)) { isUserRegistered = false; } AutoId = Request["id"]; if (!string.IsNullOrEmpty(AutoId)) { GetPosition(); var List = bll.GetList <ArticleCategory>(string.Format("WebsiteOwner='{0}' And CategoryType in ('trade','Professional')", bll.WebsiteOwner)); TradeList = List.Where(p => p.CategoryType.Equals("trade")).ToList(); ProfessionalList = List.Where(p => p.CategoryType.Equals("Professional")).ToList(); IsApply = bll.GetCount <ApplyPositionInfo>(string.Format("UserId='{0}' And PositionId={1}", DataLoadTool.GetCurrUserID(), AutoId)) > 0 ? true : false; } } catch (Exception) { Response.End(); } }
public void ProcessRequest(HttpContext context) { bll = new BLLJIMP.BLL(""); context.Response.ContentType = "text/plain"; context.Response.Expires = 0; string action = context.Request["Action"]; string result = "false"; if (!bll.GetCurrentUserInfo().UserType.Equals(1)) { return; } switch (action) { case "Add": result = Add(context); break; case "Edit": result = Edit(context); break; case "Delete": result = Delete(context); break; case "Query": result = GetAllByAny(context); break; } context.Response.Write(result); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (!bll.IsLogin) { Response.Write("请用微信打开"); Response.End(); return; } string id = Request["id"]; currUserInfo = bll.GetCurrentUserInfo(); record = bll.Get <QuestionnaireRecord>(string.Format("UserId='{0}' And QuestionnaireID={1}", currUserInfo.UserID, id)); if (record != null) { isSubmit = true; } if (string.IsNullOrEmpty(id)) { Response.Write("无参数"); Response.End(); return; } QuestionnaireModel = bll.Get <BLLJIMP.Model.Questionnaire>(string.Format("QuestionnaireID={0}", id)); if (QuestionnaireModel == null) { Response.Write("试卷不存在,请联系管理员"); Response.End(); return; } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; context.Response.Expires = 0; string result = "false"; try { this.currentUserInfo = bll.GetCurrentUserInfo(); string action = context.Request["Action"]; //利用反射找到未知的调用的方法 if (!string.IsNullOrEmpty(action)) { MethodInfo method = this.GetType().GetMethod(action, BindingFlags.NonPublic | BindingFlags.Instance); //找到方法BindingFlags.NonPublic指定搜索非公有方法 result = Convert.ToString(method.Invoke(this, new[] { context })); //调用方法 } else { resp.Status = -1; resp.Msg = "请联系管理员"; result = Common.JSONHelper.ObjectToJson(resp); } } catch (Exception ex) { resp.Status = -1; resp.Msg = ex.Message; result = Common.JSONHelper.ObjectToJson(resp); } context.Response.Write(result); }
protected void Page_Load(object sender, EventArgs e) { CurrentUserInfo = bll.GetCurrentUserInfo(); sbTemplateList.Append("<option value=\"0\">无</option>"); foreach (var item in bll.GetList <ZentCloud.BLLJIMP.Model.IndustryTemplate>("")) { sbTemplateList.AppendFormat("<option value=\"{1}\">{0}</option>", item.IndustryTemplateName, item.AutoID); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { uinfo = DataLoadTool.GetCurrUserModel(); bllUserScore = new BLLJIMP.BLLUserScore(uinfo.UserID); BLLJIMP.BLL bll = new BLLJIMP.BLL(); txtCount.Text = bll.GetCount <BLLJIMP.Model.ForwardingRecord>(string.Format(" FUserID='{0}' and TypeName = '分享'", uinfo.UserID)).ToString(); IsShowRed = bll.GetCount <BLLJIMP.Model.ReviewInfo>(string.Format("ForeignkeyId='{0}' and IsRead <> 1", uinfo.UserID)) > 0 ? true : false; UserLevel = bllUserScore.GetUserLevelByTotalScore(uinfo.HistoryTotalScore); FlowerCount = bllUser.GetUserFlowerCount(uinfo.UserID); AttentionCount = bllUser.GetUserAttentionCount(uinfo.UserID); IsHaveUnReadMessage = bllNotice.IsHaveUnReadMessage(bll.GetCurrentUserInfo().UserID).ToString(); IsTutor = bllUser.IsTutor(uinfo); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GetBanner(); } isWeixinFollower = IsWeixinFollower(); if (isWeixinFollower) { ZentCloud.BLLJIMP.Model.UserInfo userInfo = bllweixin.GetCurrentUserInfo(); if (userInfo.ISWXmpScoreAdded != 1) { ZentCloud.BLLJIMP.BLLUserScore bllUserScore = new BLLJIMP.BLLUserScore(userInfo.UserID); userInfo.TotalScore += bllUserScore.UpdateUserScoreWithWXTMNotify(bllUserScore.GetDefinedUserScore(ZentCloud.BLLJIMP.BLLUserScore.UserScoreType.SubscriteWXMP), bllweixin.GetAccessToken()); userInfo.ISWXmpScoreAdded = 1; bll.Update(userInfo); } } IsHaveUnReadMessage = bllNotice.IsHaveUnReadMessage(bll.GetCurrentUserInfo().UserID).ToString(); }
protected void Page_Load(object sender, EventArgs e) { try { autoId = Request["AutoId"]; if (!string.IsNullOrEmpty(autoId)) { reviewInfo = bll.Get <BLLJIMP.Model.ReviewInfo>(string.Format(" AutoId={0}", autoId)); if (reviewInfo != null) { reviewInfo.Pv++; bll.Update(reviewInfo); //txtStepNum.Text = rInfo.StepNum.ToString(); //txtPraiseNum.Text = reviewInfo.PraiseNum.ToString(); //TiWenUserInfo=bllUser.GetUserInfo(rInfo.UserId); //var tutorInfo=bll.Get<BLLJIMP.Model.TutorInfo>(string.Format(" UserId='{0}'", TiWenUserInfo.UserID)); //if (tutorInfo != null) //{ // TiWenUserInfo.TrueName = tutorInfo.TutorName; // TiWenUserInfo.WXHeadimgurl = tutorInfo.TutorImg; //} //else //{ // TiWenUserInfo.WXHeadimgurl = TiWenUserInfo.WXHeadimgurlLocal; //} } } ForwardingRecord record = bll.Get <BLLJIMP.Model.ForwardingRecord>(string.Format(" FUserID='{0}' AND RUserID='{1}' AND WebsiteOwner='{2}' AND TypeName='话题赞'", bll.GetCurrentUserInfo().UserID, autoId, bll.WebsiteOwner)); if (record != null) { isPraise = true; } } catch (Exception ex) { Response.Write(ex.Message); Response.End(); } }
protected void Page_Load(object sender, EventArgs e) { try { autoId = Request["AutoId"]; if (!string.IsNullOrEmpty(autoId)) { reviewInfo = bll.Get <BLLJIMP.Model.ReviewInfo>(string.Format(" AutoId={0}", autoId)); if (reviewInfo != null) { reviewInfo.Pv++; bll.Update(reviewInfo); } } ForwardingRecord record = bll.Get <BLLJIMP.Model.ForwardingRecord>(string.Format(" FUserID='{0}' AND RUserID='{1}' AND WebsiteOwner='{2}' AND TypeName='话题赞'", bll.GetCurrentUserInfo().UserID, autoId, bll.WebsiteOwner)); if (record != null) { isPraise = true; } } catch (Exception ex) { Response.Write(ex.Message); Response.End(); } }
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) { userInfo = bll.GetCurrentUserInfo(); RecommCount = bll.GetCount <BLLJIMP.Model.ForwardingRecord>(string.Format(" FUserID='{0}' and TypeName = '分享'", userInfo.UserID)); }
protected void Page_Load(object sender, EventArgs e) { try { UserInfo = bll.GetCurrentUserInfo(); if (string.IsNullOrEmpty(UserInfo.TrueName) || string.IsNullOrEmpty(UserInfo.Phone)) { isUserRegistered = false; } Id = Request["id"]; if (!string.IsNullOrEmpty(Id)) { BLLJIMP.Model.JuActivityInfo activity = GetActivity(Id); if (activity != null) { if (activity.ActivityEndDate != null) { if (DateTime.Now >= (DateTime)activity.ActivityEndDate) { activity.IsHide = 1; } } if (activity.ActivityIntegral < UserInfo.TotalScore) { isUserScoreEnough = true; } if (activity.IsHide == 1) { isActivityStopped = true; } #region 指定标签的用户可以报名 if (!string.IsNullOrEmpty(activity.Tags)) { if (!string.IsNullOrEmpty(UserInfo.TagName)) { foreach (string item in UserInfo.TagName.Split(',')) { if (activity.Tags.Contains(item)) { PerActivity = true; break; } } } } else { PerActivity = true; } #endregion } } } catch (Exception) { Response.End(); } //if (!IsPostBack) //{ //} }
public void ProcessRequest(HttpContext context) { string action = context.Request["Action"]; string result = string.Empty; currentUserInfo = bll.GetCurrentUserInfo(); if (action.Equals("UploadSingelFile1")) { result = UploadSingelFile1(context); context.Response.Write(result); return; } context.Response.ContentType = "text/plain"; context.Response.Expires = 0; try { switch (action) { case "GetCodeListInfo": result = GetCodeListInfo(context); break; case "UploadSingelFile": result = UploadSingelFile(context); break; //case "GetLineChartData": // result = GetLineChartData(context); // break; case "UploadSingelFile1": result = UploadSingelFile1(context); break; case "UploadSingelFileLocal": result = UploadSingelFileLocal(context); break; case "GetVoteObjectVoteList": //获取选手列表 分页 result = GetVoteObjectVoteList(context); break; case "UpdateVoteObjectVoteCount": result = UpdateVoteObjectVoteCount(context); break; case "GetPrize": result = GetPrize(context); break; case "SumbitOrderPayVote": //投票下单 result = SumbitOrderPayVote(context); break; case "AddVoteReviewInfo": result = SaveReviewInfo(context); break; case "GetVoteReviewInfo": result = GetReviewInfos(context); break; //case "GetArticleReviewInfo": // result = GetArticleReviewInfo(context); // break; //case "AddArticleReviewInfo": // result = AddArticleReviewInfo(context); // break; //case "ReplyArticleReviewInfo": // result = ReplyArticleReviewInfo(context); // break; //case "DeleteArticleReviewInfo": // result = DeleteArticleReviewInfo(context); // break; case "getarticlereviewlist": result = GetArticleReviewlist(context); break; case "addarticlereview": result = AddArticleReview(context); break; case "replyarticlereview": result = ReplyArticleReview(context); break; case "deletearticlereview": result = DeleteArticleReview(context); break; default: break; } } catch (Exception ex) { this.resp.Status = -1; //this.resp.Msg = ex.Message; if (ex.InnerException != null) { this.resp.Msg = ex.InnerException.Message; } else { this.resp.Msg = ex.Message; } result = ZentCloud.Common.JSONHelper.ObjectToJson(this.resp); } context.Response.Write(result); }
protected void Page_Load(object sender, EventArgs e) { try { bll = new BLLJIMP.BLL(); AutoId = Request["id"]; GetPartnerInfo(AutoId); try { BLLJIMP.Model.ForwardingRecord frecord = bll.Get <BLLJIMP.Model.ForwardingRecord>(string.Format(" FUserID='{0}' AND RUserID='{1}' AND websiteOwner='{2}' AND TypeName='五伴会赞'", bll.GetCurrentUserInfo().UserID, int.Parse(Request["id"]), bll.WebsiteOwner)); if (frecord != null) { zan = true; } } catch (Exception) { } } catch (Exception) { Response.End(); } }