public static string GetMenuByComid(int comid, int id) { try { int totalcount1 = 0; int selectpro = 0; int totalcount2 = 0; List <WxMaterial> Material = null; var actdata = new WxMaterialData(); B2b_company_menu list = B2bCompanyMenuData.GetMenuByComid(comid, id); var prodata = new B2bComProData(); List <B2b_com_pro> Prolist = null; IEnumerable result = ""; if (list != null) { Prolist = prodata.Selectpagelist_diaoyong(comid.ToString(), 1, 12, "", out totalcount1, list.Projectlist, 0, id);//读出每个栏目的产品,每页12个 selectpro = prodata.Selectpagelist_ct(comid.ToString(), id); list.Imgurl_address = FileSerivce.GetImgUrl(list.Imgurl); Material = list.Menutype == 0 ? null : actdata.ShopWxMaterialPageList(comid, 1, 12, 10, id, list.Projectlist, out totalcount2, ""); } return(JsonConvert.SerializeObject(new { type = 100, msg = list, prolist = Prolist, selectpro = selectpro, Materiallist = Material })); } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message })); } }
public static string Getconsultantlist(int comid, int pageindex, int pagesize, int channelid = 0) { int totalcount = 0; try { var imagedata = new B2bCompanyMenuData(); var prodata = new B2bComProData(); List <B2b_company_menu> list = imagedata.GetconsultantList(comid, pageindex, pagesize, out totalcount, channelid); IEnumerable result = ""; if (list != null) { result = from pro in list select new { Id = pro.Id, Com_id = pro.Com_id, Imgurl_address = FileSerivce.GetImgUrl(pro.Imgurl), Imgurl = pro.Imgurl, Linkurl = pro.Linkurl, Linktype = pro.Linktype, Projectlist = new B2b_com_projectData().GetProject(pro.Linktype, comid), Name = pro.Name, Fonticon = pro.Fonticon, Outdata = pro.Outdata }; } return(JsonConvert.SerializeObject(new { type = 100, msg = result, totalCount = totalcount })); } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message })); } }
protected void Page_Load(object sender, EventArgs e) { comid = Request["comid"].ConvertTo <int>(0); //Banner int totalcount = 0; var Linkurl = "/ui/shangjiaui/H5Setlist.aspx"; B2bCompanyImageData imgdata = new B2bCompanyImageData(); List <B2b_company_image> imglist = imgdata.PageGetimageList(comid, 0, out totalcount); if (imglist != null) { for (int i = 0; i < totalcount; i++) { if (title_arr == "") { title_arr = "\\\"" + imglist[i].Title + "\\\""; img_arr = "\\\"" + FileSerivce.GetImgUrl(imglist[i].Imgurl).Replace("/", "\\\\\\/") + "\\\""; url_arr = "\\\"" + Linkurl.Replace("/", "\\\\\\/") + "\\\"";; } else { title_arr += "," + "\\\"" + imglist[i].Title + "\\\""; img_arr += "," + "\\\"" + FileSerivce.GetImgUrl(imglist[i].Imgurl).Replace("/", "\\\\\\/") + "\\\""; url_arr += "," + "\\\"" + Linkurl.Replace("/", "\\\\\\/") + "\\\"";; } } } }
public static string PageGetimagelist(int comid, int typeid) { //typeid 0 =微网站Banner, 1=门市Banner int totalcount = 0; try { var imagedata = new B2bCompanyImageData(); List <B2b_company_image> list = imagedata.PageGetimageList(comid, typeid, out totalcount); IEnumerable result = ""; if (list != null) { result = from pro in list select new { Id = pro.Id, Com_id = pro.Com_id, Imgurl_address = FileSerivce.GetImgUrl(pro.Imgurl), Imgurl = pro.Imgurl, Linkurl = pro.Linkurl, Title = pro.Title, Typeid = pro.Typeid, State = pro.State == 1 ?"上线":"下线" }; } return(JsonConvert.SerializeObject(new { type = 100, msg = result, totalCount = totalcount })); } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message })); } }
/*获取微信客服列表(1.总公司登录显示全部2.门市登录显示本门市绑定客服)*/ internal List <WxAdImages> Getwxadimagespagelist(int pageindex, int pagesize, int comid, int adid, out int totalcount, string key = "") { string condition = " adid=" + adid; var cmdd = sqlHelper.PrepareStoredSqlCommand("proc_ListPage"); cmdd.PagingCommand1("weixin_ad_images", "*", "sort,id desc", "", pagesize, pageindex, "", condition); List <WxAdImages> list = new List <WxAdImages>(); using (var reader = cmdd.ExecuteReader()) { while (reader.Read()) { list.Add(new WxAdImages() { Id = reader.GetValue <int>("id"), Adid = reader.GetValue <int>("Adid"), Imageid = reader.GetValue <int>("imageid"), Imageurl = FileSerivce.GetImgUrl(reader.GetValue <int>("imageid")), Link = reader.GetValue <string>("link"), Sort = reader.GetValue <int>("sort"), }); } } totalcount = int.Parse(cmdd.Parameters[0].Value.ToString()); return(list); }
public static string GetimageLibraryByid(int id) { int totalcount = 0; try { var list = B2bCompanyImageData.GetimageLibraryByid(id); if (list == null) { return(JsonConvert.SerializeObject(new { type = 1, msg = "没有查询到图片", totalCount = 0 })); } IEnumerable result = ""; if (list != null) { list.Imgurl_address = FileSerivce.GetImgUrl(list.Imgurl);//获取图片实际地址 } return(JsonConvert.SerializeObject(new { type = 100, msg = list, totalCount = totalcount })); } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message })); throw; } }
private void GetMenshiDetail(string openid, int comid) { if (openid == "") { errlog = "未获得微信号"; } else { //判断用户身份:1.公司所属门店会员;2.公司会员 Member_Card card = new MemberCardData().GetMemberCardByOpenId(openid); if (card != null) { if (card.IssueCard > 0)//门店会员 { menshi = new MemberChannelcompanyData().GetMenShiByOpenId(openid, comid); if (menshi != null) { menshiimgurl = FileSerivce.GetImgUrl(menshi.Companyimg); } else { errlog = "获得门店信息为空"; } } else //公司会员 { Response.Redirect("OrderinfoTitle.aspx?id=" + comid); } } else { errlog = "未判断初用户身份"; } } }
public static string Channelrebateapplyalllist(int pageindex, int pagesize, int comid, string operstatus) { int totalcount = 0; IList <Member_channel_rebateApplylog> list = new Member_channel_rebateApplylogData().Channelrebateapplyalllist(pageindex, pagesize, comid, operstatus, out totalcount); if (list.Count > 0) { var result = from b in list select new { b.id, b.applytime, b.applytype, b.applydetail, b.applymoney, b.opertor, b.opertime, b.operstatus, b.operremark, b.zhuanzhangsucimg, zhuanzhangsucimgurl = FileSerivce.GetImgUrl(b.zhuanzhangsucimg), b.comid, b.channelid, channelinfo = new Member_channel_rebateApplyaccountData().GetchanelrebateApplyaccount(b.channelid), }; return(JsonConvert.SerializeObject(new { type = 100, msg = result, totalcount = totalcount })); } else { return(JsonConvert.SerializeObject(new { type = 1, msg = "" })); } }
protected void Page_Load(object sender, EventArgs e) { int id = int.Parse(Request.QueryString["id"].ToString()); var info = new WxMaterialData().Getidinfo(id); if (info != null) { price = info.Price.ToString() == null ? "" : info.Price.ToString(); titile = info.Title.ToString() == null ? "" : info.Title.ToString(); contxt = info.Article.ToString() == null ? "" : info.Article.ToString(); phone = info.Price.ToString() == null ? "" : info.Phone.ToString(); //图片链接 imgurl = FileSerivce.GetImgUrl(info.Imgpath.ToString().ConvertTo <int>(0)); var wspt = new WxSalePromoteTypeData().GetWxMenu(int.Parse(info.SalePromoteTypeid.ToString())); if (wspt.Typename.ToString() == "精选推荐") { type = "<a href=\"top10.aspx\">精选推荐</a> > ¥" + price + "起 -- " + titile + ""; } else { type = wspt.Typename.ToString(); } } else { Response.Redirect("/byts/login.aspx"); //type = "不存在文章详细,<input type=\"button\" onclick=\"javascript:history.go(-1)\" value=\"返回上一页\" />"; } }
protected void Page_Load(object sender, EventArgs e) { int id = int.Parse(Request.QueryString["id"].ToString()); var info = new WxMaterialData().Getidinfo(id); if (info != null) { titile = info.Title.ToString() == null ? "" : info.Title.ToString(); contxt = info.Article.ToString() == null ? "" : info.Article.ToString(); phone_tel = info.Phone.ToString() == null ? "" : info.Phone.ToString(); phone = "客服电话:"; //所属栏目 var wxdata = new WxSalePromoteTypeData().GetWxMenu(info.SalePromoteTypeid); if (wxdata != null) { wxtype = wxdata.Typename; } //contxt.Replace("../UploadFile", "http://image.etown.cn/UploadFile"); imgurl = "<img src=\"" + FileSerivce.GetImgUrl(info.Imgpath.ToString().ConvertTo <int>(0)) + "\">"; } }
protected void Page_Load(object sender, EventArgs e) { materialid = Request["materialid"].ConvertTo <int>(0); MemberShipCardMaterial material = new MemberShipCardMaterialData().GetMembershipcardMaterial(materialid); if (material != null) { id = material.MaterialId; title = material.Title; thisday = DateTime.Now.ToString("yyyy-MM-dd"); article = material.Article; phone_tel = material.Phone; phone = "客服电话:"; price = material.Price.ToString(); if (price == "0.00" || price == "0") { price = ""; } else { price = price.IndexOf(".") != -1 ? price.Substring(0, price.IndexOf(".")) : price; price = "¥" + price + "元-"; } summary = material.Summary; headPortraitImgSrc = FileSerivce.GetImgUrl(material.Imgpath.ToString().ConvertTo <int>(0)); } }
protected void Page_Load(object sender, EventArgs e) { //string u = Request.ServerVariables["HTTP_USER_AGENT"]; //bool bo = detectmobilebrowser.HttpUserAgent(u); bool bo = true; string RequestUrl = Request.ServerVariables["SERVER_NAME"].ToLower(); if (Domain_def.Domain_yanzheng(RequestUrl))//如果符合shop101.etown.cn的格式,则从多微信商户基本信息表中获取comid { comid = Int32.Parse(Domain_def.Domain_Huoqu(RequestUrl).ToString()); } else { B2b_company_info companyinfo = B2bCompanyData.GetComId(RequestUrl); if (companyinfo != null) { comid = companyinfo.Com_id; } } if (comid != 0) { //根据公司id得到公司logo地址和公司名称 comname = B2bCompanyData.GetCompany(comid).Com_name; B2b_company_saleset pro = B2bCompanySaleSetData.GetDirectSellByComid(comid.ToString()); if (pro != null) { comlogo = FileSerivce.GetImgUrl(pro.Logo.ConvertTo <int>(0)); } //获取微信平台端code string weixincode = Request["code"].ConvertTo <string>(""); if (weixincode != "") { int questtype = 2;//1=微信授权验证 DealUserinfo1("", weixincode, comid, questtype); } else { string openid = Request["openid"].ConvertTo <string>(""); string weixinpass = Request["weixinpass"].ConvertTo <string>(""); int questtype = 1; //1=一次性密码验证 DealUserinfo1(openid, weixinpass, comid, questtype); //判断用户微信号(1,点击的转发链接进来的2,点击微信菜单进来的);使用户处于登录状态(不包括点击转发链接的) } B2bModelData mdate = new B2bModelData(); //判断模板,进行跳转 var h5model = mdate.SelectModelSearchComid(comid); if (h5model != null) { if (h5model.Modelid != 1) { Response.Redirect("/h5/Default" + h5model.Modelid + ".aspx"); } } } }
protected void Page_Load(object sender, EventArgs e) { come = Request["come"].ConvertTo <string>(""); string RequestUrl = Request.ServerVariables["SERVER_NAME"].ToLower(); if (Domain_def.Domain_yanzheng(RequestUrl))//如果符合shop101.etown.cn的格式,则从多微信商户基本信息表中获取comid { comid = Int32.Parse(Domain_def.Domain_Huoqu(RequestUrl).ToString()); } else { B2b_company_info companyinfo = B2bCompanyData.GetComId(RequestUrl); if (companyinfo != null) { comid = companyinfo.Com_id; } } if (comid != 0) { //根据公司id得到公司logo地址和公司名称 var commodel = B2bCompanyData.GetCompany(comid); if (commodel != null) { title = commodel.Com_name; CompanyName = commodel.Com_name; } B2b_company_saleset pro = B2bCompanySaleSetData.GetDirectSellByComid(comid.ToString()); if (pro != null) { if (pro.Smalllogo != null && pro.Smalllogo != "") { comlogo = FileSerivce.GetImgUrl(pro.Smalllogo.ConvertTo <int>(0)); } } } //获取微信平台端code string weixincode = Request["code"].ConvertTo <string>(""); if (weixincode != "") { int questtype = 2;//1=微信授权验证 DealUserinfo1("", weixincode, comid, questtype); } else { string openid = Request["openid"].ConvertTo <string>(""); string weixinpass = Request["weixinpass"].ConvertTo <string>(""); int questtype = 1; //1=一次性密码验证 DealUserinfo1(openid, weixinpass, comid, questtype); //判断用户微信号(1,点击的转发链接进来的2,点击微信菜单进来的);使用户处于登录状态(不包括点击转发链接的) } }
protected void Page_Load(object sender, EventArgs e) { //string u = Request.ServerVariables["HTTP_USER_AGENT"]; //bool bo = detectmobilebrowser.HttpUserAgent(u); bool bo = true; string RequestUrl = Request.ServerVariables["SERVER_NAME"].ToLower(); if (Domain_def.Domain_yanzheng(RequestUrl))//如果符合shop101.etown.cn的格式,则从多微信商户基本信息表中获取comid { comid = Int32.Parse(Domain_def.Domain_Huoqu(RequestUrl).ToString()); } else { B2b_company_info companyinfo = B2bCompanyData.GetComId(RequestUrl); if (companyinfo != null) { comid = companyinfo.Com_id; } } if (comid != 0) { B2b_company company = B2bCompanyData.GetCompany(comid); if (company != null) { companyname = company.Com_name; } } //Banner int totalcount = 0; B2bCompanyImageData imgdata = new B2bCompanyImageData(); List <B2b_company_image> imglist = imgdata.PageGetimageList(comid, 0, out totalcount); if (imglist != null) { for (int i = 0; i < totalcount; i++) { if (title_arr == "") { title_arr = "\\\"" + imglist[i].Title + "\\\""; img_arr = "\\\"" + FileSerivce.GetImgUrl(imglist[i].Imgurl).Replace("/", "\\\\\\/") + "\\\""; url_arr = "\\\"" + imglist[i].Linkurl.Replace("/", "\\\\\\/") + "\\\"";; } else { title_arr += "," + "\\\"" + imglist[i].Title + "\\\""; img_arr += "," + "\\\"" + FileSerivce.GetImgUrl(imglist[i].Imgurl).Replace("/", "\\\\\\/") + "\\\""; url_arr += "," + "\\\"" + imglist[i].Linkurl.Replace("/", "\\\\\\/") + "\\\"";; } } } }
protected void Page_Load(object sender, EventArgs e) { string RequestUrl = Request.ServerVariables["SERVER_NAME"].ToLower(); if (Domain_def.Domain_yanzheng(RequestUrl))//如果符合shop101.etown.cn的格式,则从多微信商户基本信息表中获取comid { comid = Int32.Parse(Domain_def.Domain_Huoqu(RequestUrl).ToString()); } else { B2b_company_info companyinfo = B2bCompanyData.GetComId(RequestUrl); if (companyinfo != null) { comid = companyinfo.Com_id; } } if (comid != 0) { B2b_company company = B2bCompanyData.GetCompany(comid); if (company != null) { companyname = company.Com_name; tel = company.B2bcompanyinfo.Tel; } } //Banner int totalcount = 0; B2bCompanyImageData imgdata = new B2bCompanyImageData(); List <B2b_company_image> imglist = imgdata.PageGetimageList(comid, 0, out totalcount); if (imglist != null) { bannerstr = "<ul> "; bannerolstr = " <ol>"; for (int i = 0; i < totalcount; i++) { bannerstr += "<li><a onclick=\"return false;\"> <img src=\"" + FileSerivce.GetImgUrl(imglist[i].Imgurl) + "\" alt=\"" + imglist[i].Title + "\" style=\"width:100%;\" /></a></li>"; if (i == 0) { bannerolstr += "<li class=\"on\"></li>"; } else { bannerolstr += "<li ></li>"; } } bannerstr += "</ul>" + bannerolstr + "</ol>"; } }
public void GetComLogo(int comid) { //根据公司id得到公司logo地址 B2b_company_saleset pro = B2bCompanySaleSetData.GetDirectSellByComid(comid.ToString()); if (pro != null) { gongsilogo = FileSerivce.GetImgUrl(pro.Logo.ConvertTo <int>(0)); } }
public static string FinancePageList(string comid, int pageindex, int pagesize, string key) { var totalcount = 0; try { var financedata = new B2bFinanceData(); var orderdata = new B2bOrderData(); var channeldata = new MemberChannelcompanyData(); var list = financedata.FinancePageList(comid, pageindex, pagesize, key, out totalcount); IEnumerable result = ""; if (list != null) { result = from finance in list select new { Id = finance.Id, Com_id = finance.Com_id, ComName = B2bCompanyData.GetCompany(finance.Com_id) == null ? "" : B2bCompanyData.GetCompany(finance.Com_id).Com_name, Agent_id = finance.Agent_id, Eid = finance.Eid, Order_id = finance.Order_id, Servicesname = finance.Servicesname, ShortServicesname = finance.Servicesname.Length > 15 ? finance.Servicesname.Substring(0, 15) + "." : finance.Servicesname, SerialNumber = finance.SerialNumber, Money = finance.Money, Money_come = finance.Money_come, Over_money = finance.Over_money, Payment = finance.Payment, Payment_type = finance.Payment_type, Subdate = finance.Subdate, Con_state = finance.Con_state, Remarks = finance.Remarks, PrintscreenUrl = FileSerivce.GetImgUrl(finance.Printscreen.ToString().ConvertTo <int>(0)), Pno = orderdata.GetPnoByOrderId(finance.Order_id), Channelid = finance.Channelid, ChannelName = channeldata.GetChannelCompanyNameById(finance.Channelid), Paychannelstate = finance.Paychannelstate, Agentname = financedata.GetAgentNamebyorderid(finance.Order_id) } } ; return(JsonConvert.SerializeObject(new { type = 100, totalCount = totalcount, msg = result })); } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message })); throw; } }
private static string GetProjectImg(int projectimg, int projectid) { if (projectimg == 0 || projectimg == 3962) { //得到项目下第一个在线产品图片做为项目图片 int firstimg = new B2bComProData().GetFirstProImgInProjectId(projectid); return(FileSerivce.GetImgUrl(firstimg)); } else { return(FileSerivce.GetImgUrl(projectimg)); } }
public string travelending; //目的地 protected void Page_Load(object sender, EventArgs e) { lineid = Request["lineid"].ConvertTo <int>(0); if (lineid != 0) { var prodata = new B2bComProData(); var pro = prodata.GetProById(lineid.ToString()); if (pro != null) { pro_name = pro.Pro_name; com_id = pro.Com_id; pro_state = pro.Pro_state; server_type = pro.Server_type; pro_type = pro.Pro_type; source_type = pro.Source_type; pro_Remark = pro.Pro_Remark; pro_start = pro.Pro_start; pro_end = pro.Pro_end; face_price = pro.Face_price; advise_price = pro.Advise_price; agent1_price = pro.Agent1_price; agent2_price = pro.Agent2_price; agent3_price = pro.Agent3_price; agentsettle_price = pro.Agentsettle_price; thatDay_can = pro.ThatDay_can; thatday_can_day = pro.Thatday_can_day; service_Contain = pro.Service_Contain; service_NotContain = pro.Service_NotContain; precautions = pro.Precautions; tuan_pro = pro.Tuan_pro; zhixiao = pro.Zhixiao; agentsale = pro.Agentsale; createtime = pro.Createtime; sms = pro.Sms; createuserid = pro.Createuserid; imgurl = pro.Imgurl; pro_number = pro.Pro_number; pro_explain = pro.Pro_explain; tuipiao = pro.Tuipiao; tuipiao_guoqi = pro.Tuipiao_guoqi; tuipiao_endday = pro.Tuipiao_endday; imgaddress = FileSerivce.GetImgUrl(pro.Imgurl); projectid = pro.Projectid; travelproductid = pro.Travelproductid; travelstarting = pro.Travelstarting; travelending = pro.Travelending; } } }
protected void Page_Load(object sender, EventArgs e) { comid = Request["comid"].ConvertTo <int>(0); if (comid == 0) //shop101标准格式获取comid { if (Domain_def.Domain_yanzheng(RequestUrl)) //如果符合shop101.etown.cn的格式,则从多微信商户基本信息表中获取comid { //先通过正则表达式获取COMid comid = Int32.Parse(Domain_def.Domain_Huoqu(RequestUrl).ToString()); } } if (comid == 0)//如果非标准格式,查询 是否有绑定的域名 { var domaincomid = B2bCompanyData.GetComId(RequestUrl); if (domaincomid != null) { comid = domaincomid.Com_id; } } if (comid != 0) { var commodel = B2bCompanyData.GetCompany(comid); if (commodel != null) { company = commodel.Com_name; if (commodel.B2bcompanyinfo != null) { tel = commodel.B2bcompanyinfo.Tel; } } var comtDirect = B2bCompanySaleSetData.GetDirectSellByComid(comid.ToString()); if (comtDirect != null) { if (comtDirect.Smalllogo != null && comtDirect.Smalllogo != "") { comlogo = FileSerivce.GetImgUrl(comtDirect.Smalllogo.ConvertTo <int>(0)); } } } }
public static string GetChannelCompany(string channelcompanyid) { try { Member_Channel_company company = new MemberChannelcompanyData().GetChannelCompany(channelcompanyid); List <Member_Channel_company> list = new List <Member_Channel_company>(); list.Add(company); IEnumerable result = ""; if (list != null) { result = from pro in list select new { Id = pro.Id, Com_id = pro.Com_id, Companyname = pro.Companyname, Issuetype = pro.Issuetype, Whethercreateqrcode = pro.Whethercreateqrcode, Companyaddress = pro.Companyaddress, Companyphone = pro.Companyphone, CompanyCoordinate = pro.CompanyCoordinate, CompanyimgID = pro.Companyimg, CompanyImgUrl = FileSerivce.GetImgUrl(pro.Companyimg), Companyintro = pro.Companyintro, Companyproject = pro.Companyproject, CompanyState = pro.Companystate, WhetherDepartment = pro.Whetherdepartment, Bookurl = pro.Bookurl, CompanyLocate = pro.CompanyLocate, Province = pro.Province, City = pro.City, Outshop = pro.Outshop }; return(JsonConvert.SerializeObject(new { type = 100, msg = result })); } else { return(JsonConvert.SerializeObject(new { type = 100, msg = "" })); } } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message })); throw; } }
protected void Page_Load(object sender, EventArgs e) { string u = Request.ServerVariables["HTTP_USER_AGENT"]; bool bo = detectmobilebrowser.HttpUserAgent(u); #region 限制手机端访问 //if (bo == false) //{ // if (comid == 101) // { // Response.Redirect("http://vctrip.etown.cn/"); // } // Response.Redirect("http://shop" + comid + ".etown.cn"); //} #endregion if (Domain_def.Domain_yanzheng(RequestUrl))//如果符合shop101.etown.cn的格式,则从多微信商户基本信息表中获取comid { //先通过正则表达式获取COMid comid = Int32.Parse(Domain_def.Domain_Huoqu(RequestUrl).ToString()); if (comid == 0) { comid = new WeiXinBasicData().GetWeiXinBasicByDomain(RequestUrl).Comid; } if (comid != 0) { title = B2bCompanyData.GetCompany(comid).Com_name; B2b_company_saleset pro = B2bCompanySaleSetData.GetDirectSellByComid(comid.ToString()); if (pro != null) { if (pro.Smalllogo != null && pro.Smalllogo != "") { comlogo = FileSerivce.GetImgUrl(pro.Smalllogo.ConvertTo <int>(0)); } } //获取微信平台端code string weixincode = Request["code"].ConvertTo <string>(""); //获取微信号和一次性密码 openid = Request["openid"].ConvertTo <string>(""); string weixinpass = Request["weixinpass"].ConvertTo <string>(""); //获得会员信息 GetCrmInfo(weixincode, openid, weixinpass); } } }
public static string Getmenulist(int comid, int pageindex, int pagesize, int usetype = 0, int menuindex = 0) { int totalcount = 0; int totalcount1 = 0; int totalcount2 = 0; int totalcount3 = 0; try { var imagedata = new B2bCompanyMenuData(); var prodata = new B2bComProData(); var actdata = new WxMaterialData(); var projectdata = new B2b_com_projectData(); List <B2b_company_menu> list = imagedata.GetMenuList(comid, pageindex, pagesize, out totalcount, usetype, menuindex); IEnumerable result = ""; if (list != null) { result = from pro in list select new { Id = pro.Id, Com_id = pro.Com_id, Imgurl_address = FileSerivce.GetImgUrl(pro.Imgurl), Imgurl = pro.Imgurl, Linkurl = pro.Linkurl, Name = pro.Name, Fonticon = pro.Fonticon, Usestyle = pro.Usestyle, Menutype = pro.Menutype, Usetype = pro.Usetype, Projectlist = pro.Projectlist, menuindex = pro.menuindex, menuviewtype = pro.menuviewtype, hotellist = pro.menuviewtype == 1 ? projectdata.Projectpagelist(comid.ToString(), 1, 12, "1", out totalcount3, "", 1, pro.Projectlist, 9) : null, prolist = pro.Menutype == 0 ? prodata.Selectpagelist_diaoyong(comid.ToString(), 1, 12, "", out totalcount1, pro.Projectlist, 0, pro.Id) : null,//读出每个栏目的产品,每页12个 Materiallist = pro.Menutype == 0 ? null : actdata.ShopWxMaterialPageList(comid, 1, 12, 10, pro.Id, pro.Projectlist, out totalcount2, "") }; } return(JsonConvert.SerializeObject(new { type = 100, msg = result, totalCount = totalcount })); } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message })); } }
public static string ChannelcompanyOrderlocation(string comid, int pageindex, int pagesize, string key, int channelcompanyid = 0, string channelcompanytype = "0,1,3,4", string openid = "", string n1 = "", string e1 = "") { try { int totalcount = 0; var crmdata = new B2bCrmData(); List <Member_Channel_company> list = new MemberChannelcompanyData().ChannelcompanyOrderlocation(comid, pageindex, pagesize, key, out totalcount, channelcompanyid, channelcompanytype, n1, e1); IEnumerable result = ""; if (list != null) { result = from pro in list //orderby pro.Distance select new { Id = pro.Id, Com_id = pro.Com_id, Companyname = pro.Companyname, Issuetype = pro.Issuetype, Whethercreateqrcode = pro.Whethercreateqrcode, Companyaddress = pro.Companyaddress, Companyphone = pro.Companyphone, CompanyCoordinate = pro.CompanyCoordinate, CompanyLocate = pro.CompanyLocate, Companyimgurl = FileSerivce.GetImgUrl(pro.Companyimg), Companyintro = pro.Companyintro, Companyproject = pro.Companyproject, Distance = crmdata.CalculateTheCoordinates(openid, pro.Id), m = new WxSubscribeSourceData().GetWXSourceByChannelcompanyid(pro.Id) } } ; return(JsonConvert.SerializeObject(new { type = 100, totalcount = totalcount, msg = result })); } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message })); throw; } }
public static string ModelPageList(int pageindex, int pagesize, int comid = 0) { int totalcount = 0; try { B2bModelData modedata = new B2bModelData(); var list = modedata.ModelPageList(pageindex, pagesize, out totalcount); if (list == null) { return(JsonConvert.SerializeObject(new { type = 1, msg = "没有查询到模板", totalCount = 0 })); } IEnumerable result = ""; if (list != null) { result = from pro in list select new { Id = pro.Id, Title = pro.Title, Bgimage = FileSerivce.GetImgUrl(pro.Bgimage), Smallimg = FileSerivce.GetImgUrl(pro.Smallimg), Style_str = pro.Style_str, Html_str = pro.Html_str, Daohangnum = pro.Daohangnum, Daohangimg = pro.Daohangimg, Bgimage_h = pro.Bgimage_h, Bgimage_w = pro.Bgimage_w, Usestate = modedata.UseComidModel(comid, pro.Id) }; } return(JsonConvert.SerializeObject(new { type = 100, msg = result, totalCount = totalcount })); } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message })); throw; } }
protected void Page_Load(object sender, EventArgs e) { comid = Request["comid"].ConvertTo <int>(0); if (comid != 0) { B2b_company company = B2bCompanyData.GetCompany(comid); if (company != null) { companyname = company.Com_name; tel = company.B2bcompanyinfo.Tel; } } //Banner int totalcount = 0; B2bCompanyImageData imgdata = new B2bCompanyImageData(); List <B2b_company_image> imglist = imgdata.PageGetimageList(comid, 0, out totalcount); if (imglist != null) { bannerstr = "<ul> "; bannerolstr = " <ol>"; for (int i = 0; i < totalcount; i++) { bannerstr += "<li><a onclick=\"return false;\"> <img src=\"" + FileSerivce.GetImgUrl(imglist[i].Imgurl) + "\" alt=\"" + imglist[i].Title + "\" style=\"width:100%;\" /></a></li>"; if (i == 0) { bannerolstr += "<li class=\"on\"></li>"; } else { bannerolstr += "<li ></li>"; } } bannerstr += "</ul>" + bannerolstr + "</ol>"; } }
protected void Page_Load(object sender, EventArgs e) { //获取访问的域名 RequestDomin = Request.ServerVariables["SERVER_NAME"].ToLower(); Requestfile = Request.ServerVariables["Url"].ToLower(); //通过域名查询商户号 B2b_company_info companyinfo = B2bCompanyData.AdminDomainGetComId(RequestDomin); if (companyinfo != null) { comid = companyinfo.Com_id; } B2b_company com = B2bCompanyData.GetAllComMsg(comid); B2b_company_saleset comsetinfo = B2bCompanySaleSetData.GetDirectSellByComid(comid.ToString()); if (com != null) { Com_name = com.Com_name; Scenic_name = com.Scenic_name; Scenic_intro = com.B2bcompanyinfo.Scenic_intro; if (comsetinfo != null) { Logourl = comsetinfo.Logo; if (Logourl != "") { Logourl = "<img src=\"" + FileSerivce.GetImgUrl(Logourl.ConvertTo <int>(0)) + "\" alt=\"" + Scenic_name + "\" height=\"80\" />"; } Service_Phone = comsetinfo.Service_Phone; if (Service_Phone != "") { Service_Phone = "客服电话:" + Service_Phone; } Copyright = comsetinfo.Copyright; } } }
private void ShowImgBind() { //var comid = Context.Request["comid"].ConvertTo<int>(0); string RequestUrl = Request.ServerVariables["SERVER_NAME"].ToLower(); if (Domain_def.Domain_yanzheng(RequestUrl))//如果符合shop101.etown.cn的格式,则从多微信商户基本信息表中获取comid { comid = Int32.Parse(Domain_def.Domain_Huoqu(RequestUrl).ToString()); } else { B2b_company_info companyinfo = B2bCompanyData.GetComId(RequestUrl); if (companyinfo != null) { comid = companyinfo.Com_id; } } if (id != 0 && comid != 0) { var actdata = new WxAdData(); var pro = actdata.Getwxad(id, comid); if (pro != null) { id = pro.Id; Title = pro.Title; Link = pro.Link; Author = pro.Author; Keyword = pro.Keyword; Musicid = pro.Musicid; Applystate = pro.Applystate; if (Musicid != 0) { Musicscr = FileSerivce.GetImgUrl(Musicid); } } } }
public static string ModelMenuPageList(int modelid, int pageindex, int pagesize) { int totalcount = 0; try { B2bModelData modedata = new B2bModelData(); var list = modedata.ModelMenuPageList(modelid, pageindex, pagesize, out totalcount); if (list == null) { return(JsonConvert.SerializeObject(new { type = 1, msg = "没有查询到模板", totalCount = 0 })); } IEnumerable result = ""; if (list != null) { result = from pro in list select new { Id = pro.Id, Name = pro.Name, Imgurl_address = FileSerivce.GetImgUrl(pro.Imgurl), Imgurl = pro.Imgurl, Linkurl = pro.Linkurl, Modelid = pro.Modelid, Sortid = pro.Sortid, Fonticon = pro.Fonticon }; } return(JsonConvert.SerializeObject(new { type = 100, msg = result, totalCount = totalcount })); } catch (Exception ex) { return(JsonConvert.SerializeObject(new { type = 1, msg = ex.Message })); throw; } }
private void LoadData() { if (string.IsNullOrEmpty(this.AryId)) { return; } var files = FileSerivce.GetFiles(this.AryId); if (files != null) { var data = from f in files select new { Id = f.Id, RelativePath = f.Relativepath, OrigenalName = f.OrigenalName }; this.hideResult.Value = JsonConvert.SerializeObject(data); } ////throw new NotImplementedException(); }