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>"; } } }
protected void Page_Load(object sender, EventArgs e) { List <BLLJIMP.Model.ArticleCategory> trades = bll.GetList <BLLJIMP.Model.ArticleCategory>(string.Format(" CategoryType ='trade' AND WebsiteOwner='{0}'", bll.WebsiteOwner)); List <BLLJIMP.Model.ArticleCategory> Professionals = bll.GetList <BLLJIMP.Model.ArticleCategory>(string.Format(" CategoryType ='Professional' AND WebsiteOwner='{0}'", bll.WebsiteOwner)); if (trades.Count > 0) { foreach (BLLJIMP.Model.ArticleCategory item in trades) { sbTrade.AppendFormat("<input type=\"checkbox\" class=\"checkinput\" value=\"" + item.AutoID + "\" id=\"trade" + item.AutoID + "\" name=\"cbtrade\" >"); sbTrade.AppendFormat("<label class=\"checklabel wbtn wbtn_gary\" for=\"trade" + item.AutoID + "\"> "); sbTrade.AppendFormat("<span class=\"title\">" + item.CategoryName + "</span><span class=\"wbtn wbtn_orange checkmark\"><span class=\"iconfont icon-yes2\">"); sbTrade.AppendFormat("</span></span></label>"); } } if (Professionals.Count > 0) { foreach (BLLJIMP.Model.ArticleCategory item in Professionals) { sbProfessional.AppendFormat("<input type=\"checkbox\" class=\"checkinput\" value=\"" + item.AutoID + "\" id=\"professionals" + item.AutoID + "\" name=\"cbprofessionals\">"); sbProfessional.AppendFormat("<label class=\"checklabel wbtn wbtn_gary\" for=\"professionals" + item.AutoID + "\"> "); sbProfessional.AppendFormat("<span class=\"title\">" + item.CategoryName + "</span><span class=\"wbtn wbtn_orange checkmark\"><span class=\"iconfont icon-yes2\">"); sbProfessional.AppendFormat("</span></span></label>"); } } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string code = context.Request["code"]; string name = context.Request["name"]; string idCode = context.Request["idcode"]; StringBuilder sbWhere = new StringBuilder(); sbWhere.AppendFormat(" WebsiteOwner='{0}'", bll.WebsiteOwner); if (!string.IsNullOrEmpty(code)) { sbWhere.AppendFormat(" And BarCode='{0}'", code); } if (!string.IsNullOrEmpty(name)) { sbWhere.AppendFormat(" And CodeName='{0}'", name); } if (!string.IsNullOrEmpty(idCode)) { sbWhere.AppendFormat(" And ModelCode='{0}'", idCode); } var data = bll.GetList <BarCodeInfo>(sbWhere.ToString()); if (data.Count > 0) { resp.status = true; resp.result = data; } context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(resp)); }
public void ProcessRequest(HttpContext context) { var list = bll.GetList <BLLJIMP.ModelGen.BankCard>(string.Format(" WebsiteOwner='{0}' AND UserID='{1}'", bll.WebsiteOwner, CurrentUserInfo.UserID)); if (list.Count <= 0) { resp.errcode = (int)BLLJIMP.Enums.APIErrCode.IsNotFound; resp.errmsg = "没有绑定银行卡"; context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(resp)); return; } resp.isSuccess = true; List <dynamic> returnList = new List <dynamic>(); foreach (var item in list) { returnList.Add(new { bank_card_id = item.BankCardID, bank_name = item.BankName, bank_card_number = item.BankCardNumber }); } resp.returnObj = new { list = returnList }; context.Response.Write(ZentCloud.Common.JSONHelper.ObjectToJson(resp)); }
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(); } }
protected void Page_Load(object sender, EventArgs e) { foreach (var item in bll.GetList <WXAddVCategory>(string.Format("WebsiteOwner='{0}' order by CategoryValue ASC", bll.WebsiteOwner))) { sbCategory.AppendFormat("<option value=\"{0}\">{1}</option>", item.CategoryValue, item.CategoryKey); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { id = Request["id"]; Items = bll.GetList <DictionaryInfo>(string.Format(" ForeignKey='{0}'", id)); } }
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); } }
private void GetProfessional1()//获取行业 { 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) { 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 Button1_Click(object sender, EventArgs e) { //读取有ip的数据 try { var dataList = bll.GetList <BLLJIMP.Model.VoteLogInfo>(" IP IS NOT NULL AND IPLocation IS NULL "); int i = 0; foreach (var item in dataList) { var location = Common.MySpider.GetIPLocation(item.IP); i += bll.Update(new BLLJIMP.Model.VoteLogInfo(), string.Format(" IPLocation = '{0}' ", location), string.Format(" AutoID = {0} ", item.AutoID)); } Response.Write(i.ToString()); } catch (Exception ex) { Response.Write(ex.Message); } }
/// <summary> /// 更新Redis /// </summary> private static void UpdateRedis() { List <ZentCloud.BLLPermission.Model.ModuleFilterInfo> pathList = bll.GetList <ZentCloud.BLLPermission.Model.ModuleFilterInfo>(""); try { RedisHelper.RedisHelper.StringSetSerialize(RedisHelper.Enums.RedisKeyEnum.WXModuleFilterInfo, pathList); } catch (Exception ex) { } }
private void GetBanner() { List <BLLJIMP.Model.WBHBannaImg> wbiInfos = bll.GetList <BLLJIMP.Model.WBHBannaImg>(string.Format(" WebsiteOwner='{0}' Order By Sort ASC", bll.WebsiteOwner)); if (wbiInfos != null) { foreach (BLLJIMP.Model.WBHBannaImg item in wbiInfos) { BannerStr += "<a href=\"" + item.BannaUrl + "\" class=\"sliderlist\">"; BannerStr += "<img src=\"" + item.BannaImg + "\" alt=\"\"></a>"; } } }
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>"; } } }
/// <summary> /// 获取评论信息 投票 /// </summary> /// <param name="context"></param> /// <returns></returns> private string GetReviewInfos(HttpContext context) { string voteId = context.Request["voteid"]; List <BLLJIMP.Model.ReviewInfo> data = bll.GetList <BLLJIMP.Model.ReviewInfo>(6, string.Format(" ForeignkeyId='{0}'", voteId), " InsertDate desc"); if (data.Count > 0) { foreach (BLLJIMP.Model.ReviewInfo item in data) { item.rrInfos = bll.GetList <BLLJIMP.Model.ReplyReviewInfo>(" ReviewID=" + item.AutoId); } resp.Status = 0; resp.ExObj = data; } else { resp.Status = -1; resp.Msg = "没有数据!!!"; } return(Common.JSONHelper.ObjectToJson(resp)); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { AutoId = Request["AutoId"]; if (!string.IsNullOrEmpty(AutoId)) { model = bll.Get <PositionInfo>(string.Format("AutoId={0}", AutoId)); } List <ArticleCategory> CategoryList = bll.GetList <ArticleCategory>(string.Format("WebsiteOwner='{0}' And CategoryType in ('trade','Professional')", bll.WebsiteOwner)); TradeList = CategoryList.Where(p => p.CategoryType.Equals("trade")).ToList(); ProfessionalList = CategoryList.Where(p => p.CategoryType.Equals("Professional")).ToList(); } }
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>"; } } }
/// <summary> /// 获取用户分组 /// </summary> private string GetMemberGroupList() { var UserID = Comm.DataLoadTool.GetCurrUserID(); string result = " <select id=\"ddlMemberGroup\" style=\"width:180px;\">"; result += " <option value=\"\">无</option>"; var GroupList = bll.GetList <MemberGroupInfo>(string.Format("UserID='{0}' and GroupType=1", UserID)); foreach (MemberGroupInfo item in GroupList) { result += string.Format("<option value=\"{0}\">{1}</option>", item.GroupID, item.GroupName); } result += "</select>"; return(result.ToString()); }
/// <summary> /// 删除 /// </summary> private static string Delete(HttpContext context) { // if (!_isedit) // { // return null; // } string stepids = context.Request["StepID"]; string flowid = context.Request["FlowID"]; try { //删除 if (bll.Delete(new WXFlowStepInfo(), string.Format(" FlowID={0} And StepID in({1}) ", flowid, stepids)) > 0) { //重排序号 var steplist = bll.GetList <WXFlowStepInfo>(string.Format("FlowID={0} Order by StepID ASC", flowid)); int index = 0; foreach (var item in steplist) { //item.StepID=index; index++; // bll.Update(item,); bll.Update(item, string.Format("StepID='{0}'", index), string.Format("FlowID={0} And StepID={1}", flowid, item.StepID)); } //重排序号 return("true"); } return("false"); } catch (Exception ex) { return(ex.Message); } }
protected void Page_Load(object sender, EventArgs e) { model = bll.Get <PcPage>(string.Format(" WebsiteOwner='{0}' And PageId={1}", bll.WebsiteOwner, Request["pageId"])); #region 菜单列表 string is_system = this.Request["is_system"]; string use_type = this.Request["use_type"]; StringBuilder sbWhere = new StringBuilder(); StringBuilder sbWhere1 = new StringBuilder(); sbWhere.AppendFormat(" WebsiteOwner = '{0}'", bll.WebsiteOwner); sbWhere1.AppendFormat(" WebsiteOwner Is null"); sbWhere.AppendFormat(" And IsPc=1"); sbWhere1.AppendFormat(" And IsPc=1"); if (!string.IsNullOrWhiteSpace(use_type)) { sbWhere.AppendFormat(" And UseType = '{0}'", use_type); sbWhere1.AppendFormat(" And UseType = '{0}'", use_type); } var dataList = bll.GetColList <CompanyWebsite_ToolBar>(int.MaxValue, 1, sbWhere.ToString(), "AutoID,KeyType,BaseID"); if (is_system != "1") { List <CompanyWebsite_ToolBar> dataList1 = bll.GetColList <CompanyWebsite_ToolBar>(int.MaxValue, 1, sbWhere1.ToString(), "AutoID,KeyType"); List <int> nList = dataList.Select(p => p.BaseID).Distinct().ToList(); foreach (CompanyWebsite_ToolBar item in dataList1.Where(p => !nList.Contains(p.AutoID))) { dataList.Add(item); } } MenuList = dataList.OrderBy(p => p.KeyType).Select(p => p.KeyType).Distinct().ToList(); #endregion #region 幻灯片列表 var slideData = bll.GetList <BLLJIMP.Model.Slide>(string.Format("WebsiteOwner='{0}' And IsPC=1 order by Sort DESC", bll.WebsiteOwner)); foreach (var item in slideData) { if (!SlideList.Contains(item.Type)) { SlideList.Add(item.Type); } } slideListJson = ZentCloud.Common.JSONHelper.ObjectToJson(SlideList); #endregion }
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) { string permissionGroupId = bllDis.GetChannelPermissionGroupId();//渠道用户组 if (string.IsNullOrEmpty(permissionGroupId)) { permissionGroupId = "0"; } var allChannelList = bll.GetList <UserInfo>(string.Format(" WebsiteOwner = '{0}' And PermissionGroupID={1} ", bll.WebsiteOwner, permissionGroupId)); try { MyCategoriesV2 myCategories = new MyCategoriesV2(); List <MyCategoryV2Model> myCategoryModel = myCategories.GetCommCateModelList("UserID", "ParentChannel", "ChannelName", allChannelList); AllChannelList = myCategories.GetCateListItem(myCategoryModel, ""); } catch (Exception ex) { Response.Write(ex.ToString()); } }
/// <summary> /// 获取众筹活动详细信息 /// </summary> /// <param name="context"></param> /// <returns></returns> private string Get(HttpContext context) { string crowdfundId = context.Request["crowdfund_id"]; if (string.IsNullOrEmpty(crowdfundId)) { resp.errcode = 1; resp.errmsg = "crowdfund_id 参数不能为空"; return(ZentCloud.Common.JSONHelper.ObjectToJson(resp)); } var crowdFundInfo = bll.Get <CrowdFundInfo>(string.Format("CrowdFundID={0}", crowdfundId)); var sourceItemList = bll.GetList <CrowdFundItem>(string.Format("CrowdFundID={0}", crowdfundId)); var itemList = from p in sourceItemList select new { item_id = p.ItemId, item_amount = p.Amount, item_desc = p.Description, item_productname = p.ProductName, item_pay_amount = bll.GetCount <CrowdFundRecord>(string.Format(" ItemId={0} and Status=1", p.ItemId)) }; var data = new { crowdfund_id = crowdFundInfo.AutoID, crowdfund_type = crowdFundInfo.Type, crowdfund_title = crowdFundInfo.Title, crowdfund_img_url = crowdFundInfo.CoverImage, crowdfund_amount = crowdFundInfo.FinancAmount, crowdfund_pay_amount = crowdFundInfo.TotalPayAmount, crowdfund_pay_count = crowdFundInfo.PayPersionCount, crowdfund_percent = crowdFundInfo.PayPercent, crowdfund_originator = crowdFundInfo.Originator, crowdfund_intro = crowdFundInfo.Introduction, crowdfund_remainingdays = crowdFundInfo.RemainingDays, item_list = itemList }; return(ZentCloud.Common.JSONHelper.ObjectToJson(data)); }
protected void Page_Load(object sender, EventArgs e) { try { //RootCategoryId = Request["id"]; //if (Request.Url.Host.Equals("xixinxian.comeoncloud.net")) //{ // RootCategoryId = "169"; // MarketNewsIds = "165"; // MarketInterPretedids = "169"; //} foreach (var item in bll.GetList <ArticleCategory>(string.Format("PreID={0}", RootCategoryId))) { sbCategory.AppendLine(string.Format("<li class=\"catli\" categoryid=\"{0}\"><a href=\"javascript:void(0)\">{1}</a></li>", item.AutoID, item.CategoryName)); } IsHaveUnReadMessage = bllNotice.IsHaveUnReadMessage(bllNotice.GetCurrentUserInfo().UserID).ToString(); } catch (Exception) { Response.End(); } }
/// <summary> /// 获取中奖记录 /// </summary> /// <param name="context"></param> /// <returns></returns> private string getdonationrecord(HttpContext context) { DonationsModel result = new DonationsModel(); List <Person> list = new List <Person>(); int PeopleCount = 0; decimal TotalAmount = 0; if (string.IsNullOrEmpty(context.Request["pageindex"])) { //resp.Msg = "pageindex不能为空"; goto outoff; } if (string.IsNullOrEmpty(context.Request["pagesize"])) { //resp.Msg = "pagesize不能为空"; goto outoff; } int pageIndex = int.Parse(context.Request["pageindex"]); int pageSize = int.Parse(context.Request["pagesize"]); var source = bll.GetLit <WXMallOrderInfo>(pageSize, pageIndex, string.Format("WebsiteOwner='qianwei' And OrderUserID='system' And PaymentStatus=1"), " InsertDate DESC"); PeopleCount = bll.GetCount <WXMallOrderInfo>(string.Format("WebsiteOwner='qianwei' And OrderUserID='system' And PaymentStatus=1")); TotalAmount = bll.GetList <WXMallOrderInfo>(string.Format("WebsiteOwner='qianwei' And OrderUserID='system' And PaymentStatus=1")).Sum(p => p.TotalAmount); foreach (var item in source) { Person model = new Person(); model.showname = item.Consignee; model.money = item.TotalAmount; list.Add(model); } outoff: result.list = list; result.totalcount = PeopleCount; result.totalmoney = TotalAmount; return(Common.JSONHelper.ObjectToJson(result)); }
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> /// <param name="tvInfo"></param> /// <returns></returns> private string ToHtml(BLLJIMP.Model.TheVoteInfo tvInfo) { StringBuilder htmlStr = new StringBuilder(); string classStr = ""; string selectStr = ""; string str = ""; BLLJIMP.Model.UserVoteInfo uvInfo = null; if (bll.IsLogin) { this.userInfo = DataLoadTool.GetCurrUserModel(); string whereStr = string.Format(" UserId='{0}' and VoteId='{1}'", userInfo.UserID, tvInfo.AutoId); uvInfo = bll.Get <BLLJIMP.Model.UserVoteInfo>(whereStr); } //uvInfo = null; if (uvInfo != null) { classStr = "toupiaobox toupiaoover"; } else { if (tvInfo.VoteSelect == "1") { classStr = "toupiaobox"; selectStr = "radio"; str = "以下选项为单选"; } else if (tvInfo.VoteSelect == "2") { classStr = "toupiaobox duoxuan"; selectStr = "checkbox"; str = "以下选项为多选"; } } htmlStr.AppendFormat("<link rel=\"stylesheet\" href=\"styles/css/style.css?v=0.0.1\">"); htmlStr.AppendFormat("<div id=\"toupiao\" class=\"{0}\">", classStr); htmlStr.AppendFormat("<div><img src=\"{0}\"></div>", tvInfo.ThumbnailsPath); htmlStr.AppendFormat("<div class=\"title\">{0}</div>", tvInfo.VoteName); htmlStr.AppendFormat("<p class=\"note\">{0}</p>", str); htmlStr.AppendFormat("<input type=\"hidden\" id=\"SelectStr\" value=\"{0}\" />", selectStr); htmlStr.AppendFormat("<input type=\"hidden\" id=\"AutoId\" value=\"{0}\" />", tvInfo.AutoId); List <BLLJIMP.Model.DictionaryInfo> dInfos = bll.GetList <BLLJIMP.Model.DictionaryInfo>(" ForeignKey='" + tvInfo.AutoId + "'"); foreach (var item in dInfos) { htmlStr.AppendFormat("<input name=\"radiocheck2\" type=\"{0}\" class=\"radioinput\" id=\"{1}\" value=\"\" v=\"{2}\">", selectStr, selectStr + item.AutoID, item.AutoID); htmlStr.AppendFormat("<div class=\"mainconcent\">"); htmlStr.AppendFormat("<label class=\"inputlabel\" for=\"{0}\"></label>", selectStr + item.AutoID); htmlStr.AppendFormat("<span class=\"inputicon\"><span class=\"icon\"></span></span>"); htmlStr.AppendFormat("<div class=\"inputtext\" >{0}</div>", item.ValueStr); htmlStr.AppendFormat("<div class=\"jindubar\">"); double f = 0; if (tvInfo.VoteNumbers != 0) { f = Math.Round((Convert.ToDouble(item.VoteNums) / Convert.ToDouble(tvInfo.VoteNumbers)) * 100, 0); } htmlStr.AppendFormat("<span class=\"jindu\" style=\"width:{0}%;\"></span>", f); htmlStr.AppendFormat("<span class=\"peoplenum\">{0}票数</span>", item.VoteNums); htmlStr.AppendFormat("<span class=\"pecent\">{0}%</span>", f); htmlStr.AppendFormat("</div></div>"); } string dName = ""; if (uvInfo != null) { dInfos = bll.GetList <BLLJIMP.Model.DictionaryInfo>(" AutoId in (" + uvInfo.DiInfoId + ")"); if (dInfos != null) { foreach (BLLJIMP.Model.DictionaryInfo item in dInfos) { dName += item.ValueStr + " "; } } } htmlStr.AppendFormat("<span class=\"button\" id=\"btnSave\" onclick=\"SaveInfo()\">投票</span>"); htmlStr.AppendFormat("<span class=\"toupiaoinfo\" >你已投过票,投票项为\"{0}\"</span>", dName); htmlStr.AppendFormat("</div>"); return(htmlStr.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); } } } } } }