protected void Page_Load(object sender, EventArgs e) { websiteInfo = DataLoadTool.GetWebsiteInfoModel(); if (string.IsNullOrEmpty(websiteInfo.MallType)) { websiteInfo.MallType = "0"; } model = bll.GetProduct(Request["pid"]); shareLink = Request.Url.AbsoluteUri; if (bll.GetWebsiteInfoModel().IsDistributionMall.Equals(1)) { if (bll.IsLogin) { UserInfo CurrentUserInfo = bll.GetCurrentUserInfo(); if (bll.IsWeiXinBrowser && (string.IsNullOrEmpty(CurrentUserInfo.WXNickname) || string.IsNullOrEmpty(CurrentUserInfo.WXHeadimgurl))) { Session.Clear(); Response.Redirect(Request.Url.AbsoluteUri); } if (string.IsNullOrEmpty(Request["sid"])) { shareLink = string.Format("http://{0}{1}?action=show&pid={2}&sid={3}", Request.Url.Host, Request.FilePath, Request["pid"], CurrentUserInfo.AutoID); } else { ShareUserInfo = bllUser.GetUserInfoByAutoID(int.Parse(Request["sid"])); } } else { Response.Write("请用微信打开"); Response.End(); } } }
private static string websiteOwner;//设定该站点所有者 public void ProcessRequest(HttpContext context) { websiteOwner = DataLoadTool.GetWebsiteInfoModel().WebsiteOwner; context.Response.ContentType = "text/plain"; //BLLMenuPermission perbll = new BLLMenuPermission(""); //_isedit = perbll.CheckUserAndPms(DataLoadTool.GetCurrUserID(), 258); //_isview = perbll.CheckUserAndPms(DataLoadTool.GetCurrUserID(), 253); bll = new BLLJIMP.BLL(""); context.Response.ContentType = "text/plain"; context.Response.Expires = 0; string action = context.Request["Action"]; string result = "false"; 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); }
private void GetTutorCtype() { this.websiteOwner = DataLoadTool.GetWebsiteInfoModel().WebsiteOwner; List <BLLJIMP.Model.ArticleCategory> trades = bll.GetList <BLLJIMP.Model.ArticleCategory>(string.Format(" CategoryType ='trade' AND WebsiteOwner='{0}'", this.websiteOwner)); List <BLLJIMP.Model.ArticleCategory> Professionals = bll.GetList <BLLJIMP.Model.ArticleCategory>(string.Format(" CategoryType ='Professional' AND WebsiteOwner='{0}'", this.websiteOwner)); if (trades != null) { foreach (BLLJIMP.Model.ArticleCategory item in trades) { TutorStr += "<input type=\"checkbox\" class=\"checkinput\" value=\"" + item.AutoID + "\" id=\"Tutor" + item.AutoID + "\" name=\"cbtrade\">"; TutorStr += "<label class=\"checklabel wbtn wbtn_gary\" for=\"Tutor" + item.AutoID + "\"> "; TutorStr += "<span class=\"title\">" + item.CategoryName + "</span><span class=\"wbtn wbtn_orange checkmark\"><span class=\"iconfont icon-yes2\">"; TutorStr += "</span></span></label>"; } } if (Professionals != null) { foreach (BLLJIMP.Model.ArticleCategory item in Professionals) { ProfessionalStr += "<input type=\"checkbox\" class=\"checkinput\" value=\"" + item.AutoID + "\" id=\"Tutor" + item.AutoID + "\" name=\"cbprofessionals\">"; ProfessionalStr += "<label class=\"checklabel wbtn wbtn_gary\" for=\"Tutor" + item.AutoID + "\"> "; ProfessionalStr += "<span class=\"title\">" + item.CategoryName + "</span><span class=\"wbtn wbtn_orange checkmark\"><span class=\"iconfont icon-yes2\">"; ProfessionalStr += "</span></span></label>"; } } }
private static string websiteOwner;//设定该站点所有者 public void ProcessRequest(HttpContext context) { websiteOwner = DataLoadTool.GetWebsiteInfoModel().WebsiteOwner; bll = new BLLJIMP.BLLWeixin(""); context.Response.ContentType = "text/plain"; context.Response.Expires = 0; string action = context.Request["Action"]; string result = "false"; 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); }
protected void Page_Load(object sender, EventArgs e) { currUserInfo = DataLoadTool.GetCurrUserModel(); currWebSiteModel = DataLoadTool.GetWebsiteInfoModel(); currWebSiteOwnerModel = new BLLJIMP.BLLUser("").GetUserInfo(currWebSiteModel.WebsiteOwner); signUpLoginName = Common.Base64Change.EncodeBase64ByUTF8(currWebSiteOwnerModel.UserID); signUploginPwd = Common.DEncrypt.ZCEncrypt(currWebSiteOwnerModel.Password); GetPageActionType(); }
private void GetCType() { this.websiteOwner = DataLoadTool.GetWebsiteInfoModel().WebsiteOwner; List <BLLJIMP.Model.ArticleCategory> acategorys = bll.GetList <BLLJIMP.Model.ArticleCategory>(string.Format(" CategoryType='word'AND WebsiteOwner='{0}'", this.websiteOwner)); if (acategorys != null) { foreach (BLLJIMP.Model.ArticleCategory item in acategorys) { DisussStr += "<li class=\"catli\" v=\"" + item.AutoID + "\"><a >" + item.CategoryName + "</a></li>"; } } }
private void GetCType() { this.websiteOwner = DataLoadTool.GetWebsiteInfoModel().WebsiteOwner; List <BLLJIMP.Model.ArticleCategory> acategorys = bll.GetList <BLLJIMP.Model.ArticleCategory>(string.Format(" CategoryType='Partner'AND WebsiteOwner='{0}' order by sort asc, AutoId asc", this.websiteOwner)); if (acategorys.Count > 0) { foreach (BLLJIMP.Model.ArticleCategory item in acategorys) { PartnerStr += "<li class=\"catli\" v=\"" + item.AutoID + "\"><a >" + item.CategoryName + "</a></li>"; } } }
protected void Page_Load(object sender, EventArgs e) { var CategoryList = bll.GetLit <WXMallCategory>(100, 1, string.Format("WebsiteOwner='{0}'", bll.WebsiteOwner)); if (CategoryList.Count > 0) { sbCategory.Append("<div class=\"kindbox\"><ul class=\"kind\">"); foreach (var item in CategoryList) { sbCategory.AppendFormat("<li data-categoryid=\"{0}\"><a href=\"javascript:\">{1}<span class=\"icon\"></span></a></li>", item.AutoID, item.CategoryName); } sbCategory.Append("</ul>"); sbCategory.Append("</div>"); } currWebSiteInfo = bll.GetWebsiteInfoModel(); currWebSiteUserInfo = new BLLJIMP.BLLUser("").GetUserInfo(DataLoadTool.GetWebsiteInfoModel().WebsiteOwner); }
private void GetCType() { this.websiteOwner = DataLoadTool.GetWebsiteInfoModel().WebsiteOwner; this.uinfo = DataLoadTool.GetCurrUserModel(); List <BLLJIMP.Model.ArticleCategory> acategorys = bll.GetList <BLLJIMP.Model.ArticleCategory>(string.Format(" CategoryType='word'AND WebsiteOwner='{0}'", this.websiteOwner)); if (acategorys != null) { foreach (BLLJIMP.Model.ArticleCategory item in acategorys) { DisussStr += "<li class=\"catli\" v=\"" + item.AutoID + "\"><a >" + item.CategoryName + "</a></li>"; } } //设置用户所有话题为已读 BLLJIMP.BLL.ExecuteSql(string.Format("update ZCJ_ReviewInfo set IsRead = 1 where ForeignkeyId='{0}' and IsRead <> 1 and websiteowner='{1}'", uinfo.UserID, websiteOwner)); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { WebsiteOwner = DataLoadTool.GetWebsiteInfoModel().WebsiteOwner; aconfig = juActivityBll.Get <BLLJIMP.Model.ActivityConfig>(string.Format(" WebsiteOwner='{0}'", WebsiteOwner)); if (aconfig == null) { aconfig = new BLLJIMP.Model.ActivityConfig() { TheOrganizers = "" }; } sbCategory.Append(" <li class=\"catli current\"><a>全部</a></li>"); foreach (var item in juActivityBll.GetList <ArticleCategory>(string.Format("WebsiteOwner='{0}' And CategoryType='activity'", WebsiteOwner))) { sbCategory.AppendFormat(" <li class=\"catli\" v=\"{0}\"><a>{1}</a></li>", item.AutoID, item.CategoryName); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.websiteOwner = DataLoadTool.GetWebsiteInfoModel().WebsiteOwner; Id = Request["id"]; juActivityBll = new BLLJuActivity(""); if (!string.IsNullOrEmpty(Id)) { aconfig = juActivityBll.Get <BLLJIMP.Model.ActivityConfig>(string.Format(" WebsiteOwner='{0}'", websiteOwner)); if (aconfig == null) { aconfig = new BLLJIMP.Model.ActivityConfig() { TheOrganizers = "" }; } GetActivityInfo(Id); } } }
protected void Page_Load(object sender, EventArgs e) { if (bllMall.IsLogin) { userInfo = DataLoadTool.GetCurrUserModel(); } else { Response.Redirect(string.Format("/App/Cation/Wap/Login.aspx?redirecturl={0}", Request.FilePath)); } currWebSiteInfo = bllMall.GetWebsiteInfoModel(); if (currWebSiteInfo.MallTemplateId.Equals(1))//外卖 { WXMallIndexUrl = "Indexv2.aspx"; } websiteInfo = DataLoadTool.GetWebsiteInfoModel(); if (string.IsNullOrEmpty(websiteInfo.MallType)) { websiteInfo.MallType = "0"; } }
protected void Page_Load(object sender, EventArgs e) { foreach (var item in bll.GetList <WXKeFu>(string.Format("WebsiteOwner='{0}'", DataLoadTool.GetWebsiteInfoModel().WebsiteOwner))) { sbActivityNoticeKeFuList.AppendFormat("<option value=\"{0}\">{1}</option>", item.AutoID, item.TrueName); } }
/// <summary> /// 获取行业 /// </summary> private void Gettrade1() { try { List <BLLJIMP.Model.ArticleCategory> actegorys = bll.GetList <BLLJIMP.Model.ArticleCategory>(string.Format(" websiteOwner='{0}' AND CategoryType='trade'", DataLoadTool.GetWebsiteInfoModel().WebsiteOwner)); if (actegorys != null) { foreach (BLLJIMP.Model.ArticleCategory item in actegorys) { tradeStr += string.Format("<input type=\"checkbox\" id=\"{0}\" name=\"trade\" value=\"{1}\" />", "trade" + item.AutoID, item.AutoID); tradeStr += string.Format("<label for=\"{0}\">{1}</label> ", "trade" + item.AutoID, item.CategoryName); } } } catch (Exception ex) { } }
protected void Page_Load(object sender, EventArgs e) { articleId = Request["articleId"]; if (articleId == null) { Response.End(); } int articleIdint; if (!int.TryParse(articleId, out articleIdint)) { Response.End(); } currentUserInfo = DataLoadTool.GetCurrUserModel(); currWebSiteUserInfo = bll.Get <UserInfo>(string.Format("UserID='{0}'", DataLoadTool.GetWebsiteInfoModel().WebsiteOwner));// JuActivityInfo articleInfo = bll.Get <JuActivityInfo>(string.Format("JuActivityID={0}", articleIdint)); if (articleInfo == null) { Response.End(); } if (!currentUserInfo.UserType.Equals(1)) { if (!articleInfo.WebsiteOwner.Equals(currentUserInfo.WebsiteOwner)) { Response.End(); } } var articleIdHex = Convert.ToString(articleIdint, 16); //文章活动ID十六进制 string pageUrl = string.Format("http://{0}/{1}/details.chtml", Request.Url.Host, articleIdHex); var rootList = bll.GetList <WebAccessLogsInfo>(string.Format("(Ex_PreSpreadUserID is null or Ex_PreSpreadUserID='') And (Ex_PreShareTimestamp is null or Ex_PreShareTimestamp='') And Ex_SpreadUserID !='' And Ex_SpreadUserID is not null And Ex_ShareTimestamp !='' And Ex_ShareTimestamp is not null And PageUrl like '{0}%' Order by AccessDate ASC", pageUrl)); //根节点 if (rootList.Count > 0) { rootList = rootList.DistinctBy(p => p.Ex_ShareTimestamp).ToList(); System.Text.StringBuilder sbRoot = new System.Text.StringBuilder(); for (int i = 0; i < rootList.Count; i++) { var item = rootList[i]; //int count = bll.GetCount<WebAccessLogsInfo>(string.Format("Ex_PreSpreadUserID='{0}' And Ex_PreShareTimestamp='{1}' Order by AccessDate ASC", item.Ex_SpreadUserID, item.Ex_ShareTimestamp)); var subList = bll.GetList <WebAccessLogsInfo>(string.Format("Ex_PreSpreadUserID='{0}' And Ex_PreShareTimestamp='{1}' Order by AccessDate ASC ", item.Ex_SpreadUserID, item.Ex_ShareTimestamp)); subList = subList.DistinctBy(p => p.Ex_ShareTimestamp).ToList(); int count = subList.Count; var isParent = false; if (count > 0) { isParent = true; } string wxNickName = "无昵称"; string wxHeadImg = "/zTree/css/zTreeStyle/img/diy/user.png"; string icon = "/zTree/css/zTreeStyle/img/diy/user.png"; var userInfo = bll.Get <UserInfo>(string.Format("UserID='{0}'", item.Ex_SpreadUserID)); if (userInfo != null) { if (!string.IsNullOrEmpty(userInfo.WXNickname)) { wxNickName = userInfo.WXNickname; } if (!string.IsNullOrEmpty(userInfo.WXHeadimgurlLocal)) { wxHeadImg = userInfo.WXHeadimgurlLocal; } else { if (!string.IsNullOrEmpty(userInfo.WXOpenId)) { //拉取用户信息并更新数据库 ZentCloud.BLLJIMP.Model.Weixin.WeixinUserInfo weixinInfo = bllWeixin.GetWeixinUserInfo(currWebSiteUserInfo.UserID, currWebSiteUserInfo.WeixinAppId, currWebSiteUserInfo.WeixinAppSecret, userInfo.WXOpenId); if (weixinInfo != null) { if (!string.IsNullOrEmpty(weixinInfo.NickName)) { userInfo.WXNickname = weixinInfo.NickName; } if (!string.IsNullOrEmpty(weixinInfo.HeadImgUrl)) { userInfo.WXHeadimgurl = weixinInfo.HeadImgUrl; } //bll.Update(userInfo); } } } } string tip = string.Format("<img src='{0}' align='absmiddle' width='100px' height='100px'/><br/>{1}<br/>被<span style='color:red;'>{2}</span>次转发", wxHeadImg, wxNickName, count); var title = string.Format("<span style='color:blue;'>{0}</span> <span style='color:red;'>{1}</span>转发 [{2}]", wxNickName, count, string.Format("{0:f}", item.AccessDate)); sbRoot.Append("{"); sbRoot.AppendFormat("name: \"{0}\", id: \"{1}\", count:{2}, times: 1, isParent:\"{3}\",Ex_SpreadUserID:\"{4}\",Ex_ShareTimestamp:\"{5}\",icon:\"{6}\",tip:\"{7}\"", title, item.AutoID, "1", isParent.ToString().ToLower(), item.Ex_SpreadUserID, item.Ex_ShareTimestamp, icon, tip); sbRoot.Append("}"); if (i < rootList.Count - 1)//追加分隔符 { sbRoot.Append(","); } } RootNodes = sbRoot.ToString(); } else { RootNodes = "{ name: \"暂时没有转发记录\", id: \"0\", count: 0, times: 1, isParent: false }"; } }
/// <summary> /// 获取专业 /// </summary> private void GetProfessional() { try { List <BLLJIMP.Model.ArticleCategory> actegorys = bll.GetList <BLLJIMP.Model.ArticleCategory>(string.Format(" websiteOwner='{0}' AND CategoryType='Professional'", DataLoadTool.GetWebsiteInfoModel().WebsiteOwner)); if (actegorys != null) { foreach (BLLJIMP.Model.ArticleCategory item in actegorys) { if (tInfo.ProfessionalStr.Contains(item.AutoID.ToString())) { ProfessionalStr += string.Format("<input type=\"checkbox\" id=\"{0}\" checked=\"checked\" name=\"Professional\" value=\"{1}\" />", "Professional" + item.AutoID, item.AutoID); ProfessionalStr += string.Format("<label for=\"{0}\">{1}</label> ", "trade" + item.AutoID, item.CategoryName); } else { ProfessionalStr += string.Format("<input type=\"checkbox\" id=\"{0}\" name=\"Professional\" value=\"{1}\" />", "Professional" + item.AutoID, item.AutoID); ProfessionalStr += string.Format("<label for=\"{0}\">{1}</label> ", "Professional" + item.AutoID, item.CategoryName); } } } } catch (Exception ex) { } }
protected void Page_Load(object sender, EventArgs e) { currWebSiteUserInfo = this.userBll.GetUserInfo(DataLoadTool.GetWebsiteInfoModel().WebsiteOwner); }
/// <summary> /// 获取话题标签 /// </summary> private void GetTagStr() { List <BLLJIMP.Model.ArticleCategory> actegorys = bllUser.GetList <BLLJIMP.Model.ArticleCategory>(string.Format(" CategoryType='word' AND WebsiteOwner='{0}'", DataLoadTool.GetWebsiteInfoModel().WebsiteOwner)); foreach (BLLJIMP.Model.ArticleCategory item in actegorys) { TagStr += "<input class=\"checkbox\" type=\"checkbox\" Name=\"word\" value=\"" + item.AutoID + "\" id=\"word" + item.AutoID + "\">"; TagStr += "<label for=\"word" + item.AutoID + "\" class=\"discusstag\">"; TagStr += "<span class=\"wbtn wbtn_gary\"><span class=\"iconfont\"></span></span>" + item.CategoryName; TagStr += "</label>"; } }