public void Member_Top_Favoriets() { StringBuilder strHTML = new StringBuilder(); int member_id = tools.CheckInt(Session["member_id"].ToString()); string productURL = string.Empty; //string targetURL = ""; QueryInfo Query = new QueryInfo(); Query.PageSize = 5; Query.CurrentPage = 1; Query.ParamInfos.Add(new ParamInfo("AND", "int", "MemberFavoritesInfo.Member_Favorites_MemberID", "=", member_id.ToString())); Query.ParamInfos.Add(new ParamInfo("AND", "int", "MemberFavoritesInfo.Member_Favorites_Type", "=", "0")); Query.OrderInfos.Add(new OrderInfo("MemberFavoritesInfo.Member_Favorites_ID", "Desc")); IList <MemberFavoritesInfo> favoriates = MyFavor.GetMemberFavoritess(Query); strHTML.Append("<div class=\"li01_box\">"); if (favoriates != null) { foreach (MemberFavoritesInfo entity in favoriates) { ProductInfo product = MyProduct.GetProductByID(entity.Member_Favorites_TargetID, pub.CreateUserPrivilege("ae7f5215-a21a-4af2-8d47-3cda2e1e2de8")); if (product != null) { productURL = tools.NullStr(Application["Site_URL"]).TrimEnd('/') + pageurl.FormatURL(pageurl.product_detail, product.Product_ID.ToString()); if (product.Product_IsInsale == 0 || product.Product_IsAudit == 0) { continue; } // productURL = pageurl.FormatURL(pageurl.product_detail, product.Product_ID.ToString()); strHTML.Append("<dl>"); strHTML.Append("<dt><a href=\"" + productURL + "\" target=\"_blank\">"); strHTML.Append("<img src=\"" + pub.FormatImgURL(product.Product_Img, "thumbnail") + "\" /></a></dt>"); strHTML.Append("<dd>"); strHTML.Append("<p><a href=\"" + productURL + "\" target=\"_blank\">" + product.Product_Name + "</a></p>"); //if (product.Product_PriceType == 1) //{ //strHTML.Append("<p>" + pub.FormatCurrency(product.Product_Price) + "</p>"); strHTML.Append("<p>" + pub.FormatCurrency(pub.Get_Member_Price(product.Product_ID, product.Product_Price)) + "</p>"); //} //else //{ // strHTML.Append("<p>" + pub.FormatCurrency(pub.GetProductPrice(product.Product_ManualFee, product.Product_Weight)) + "</p>"); //} strHTML.Append("</dd>"); strHTML.Append("<div class=\"clear\"></div>"); strHTML.Append("</dl>"); } } } else { strHTML.Append("<span class=\"tip\">暂无收藏的商品</span>"); } strHTML.Append("</div>"); Response.Write(strHTML.ToString()); }
//合同查看打印 public void Contract_View_New(OrdersInfo ordersInfo, int contact_no) { string Template_Html = ""; int Contract_ID; string Time = string.Empty; string Contract_Product_Goods = ""; string ContractTemplate_TopFuJian = ""; string Sell_Contract_Template_OnlyRead = ""; string Supplier_CompanyName = ""; string Member_NickName = ""; string ContractTemResponsible = string.Empty; SupplierInfo supplierInfo = null; SupplierInfo Supplierinfo = null; string Sell_Contract_Template_EndFuJianContent = ""; Contract_ID = tools.CheckInt(Request["Contract_ID"]); Contract_Product_Goods = new Contract().Contract_Orders_Goods_Print(Contract_ID); SupplierInfo MemberSupplierinfo = null; string MemberSupplierCompanyName = ""; MemberInfo memberInfo = null; if (ordersInfo != null) { memberInfo = new Member().GetMemberByID(ordersInfo.Orders_BuyerID); Supplierinfo = new Supplier().GetSupplierByID(memberInfo.Member_SupplierID); if (memberInfo != null) { //Member_NickName = memberInfo.Member_NickName; MemberSupplierinfo = new Supplier().GetSupplierByID(memberInfo.Member_SupplierID); if (MemberSupplierinfo != null) { MemberSupplierCompanyName = MemberSupplierinfo.Supplier_CompanyName; } } } List <OrdersLogInfo> logs = MyOrdersLog.GetOrdersLogsByOrdersID(ordersInfo.Orders_ID).Where(p => p.Orders_Log_Remark == "供应商确认订单").ToList(); if (ordersInfo != null) { supplierInfo = MySupplier.GetSupplierByID(ordersInfo.Orders_SupplierID, pub.CreateUserPrivilege("1392d14a-6746-4167-804a-d04a2f81d226")); if (supplierInfo != null) { Supplier_CompanyName = supplierInfo.Supplier_CompanyName; } } //合同顶部附件 ContractTemplateInfo ContractTemplateEntity = MyContractTemplate.GetContractTemplateBySign("Sell_Contract_Template_TopFuJian", pub.CreateUserPrivilege("d4d58107-0e58-485f-af9e-3b38c7ff9672")); if (logs.Count > 0) { Time = tools.NullStr(logs.FirstOrDefault().Orders_Log_Addtime.ToString("yyyy年MM月dd日")); } //合同模板运输责任 ContractTemplateInfo ContractTemResponsibleEntity = MyContractTemplate.GetContractTemplateBySign("Sell_Contract_Template_Responsible", pub.CreateUserPrivilege("d4d58107-0e58-485f-af9e-3b38c7ff9672")); if (ContractTemResponsibleEntity != null) { ContractTemResponsible = ContractTemResponsibleEntity.Contract_Template_Content; if (ordersInfo != null) { ContractTemResponsible = ContractTemResponsible.Replace("{Responsible}", ordersInfo.Orders_Responsible == 1 ? "卖家责任" : "买家责任"); } } if (ContractTemplateEntity != null) { ContractTemplate_TopFuJian = ContractTemplateEntity.Contract_Template_Content; ContractTemplate_TopFuJian = ContractTemplate_TopFuJian.Replace("{supplier_name}", Supplier_CompanyName); ContractTemplate_TopFuJian = ContractTemplate_TopFuJian.Replace("{member_name}", MemberSupplierCompanyName); ContractTemplate_TopFuJian = ContractTemplate_TopFuJian.Replace("{time}", string.IsNullOrEmpty(Time) ? "卖家尚未确认订单" : Time); //ContractTemplate_TopFuJian = ContractTemplate_TopFuJian.Replace("{orders_goodslist}", Contract_Product_Goods); ContractTemplate_TopFuJian = ContractTemplate_TopFuJian.Replace("{orders_goodslist}", new Member().GetOrdersGoods(ordersInfo)); } //合同尾部附件 ContractTemplateInfo Sell_Contract_Template_EndFuJianEntity = MyContractTemplate.GetContractTemplateBySign("Sell_Contract_Template_EndFuJian", pub.CreateUserPrivilege("d4d58107-0e58-485f-af9e-3b38c7ff9672")); if (Sell_Contract_Template_EndFuJianEntity != null) { Sell_Contract_Template_EndFuJianContent = Sell_Contract_Template_EndFuJianEntity.Contract_Template_Content; Sell_Contract_Template_EndFuJianContent = Sell_Contract_Template_EndFuJianContent.Replace("{member_name}", supplierInfo.Supplier_CompanyName); Sell_Contract_Template_EndFuJianContent = Sell_Contract_Template_EndFuJianContent.Replace("{member_adress}", supplierInfo.Supplier_Address); Sell_Contract_Template_EndFuJianContent = Sell_Contract_Template_EndFuJianContent.Replace("{member_corproate}", supplierInfo.Supplier_Corporate); Sell_Contract_Template_EndFuJianContent = Sell_Contract_Template_EndFuJianContent.Replace("{supplier_name}", Supplierinfo.Supplier_CompanyName); Sell_Contract_Template_EndFuJianContent = Sell_Contract_Template_EndFuJianContent.Replace("{supplier_adress}", Supplierinfo.Supplier_Address); Sell_Contract_Template_EndFuJianContent = Sell_Contract_Template_EndFuJianContent.Replace("{supplier_corproate}", Supplierinfo.Supplier_Corporate); } //易耐网交易合同标准条款 ContractTemplateInfo Sell_Contract_Template_OnlyReadEntity = MyContractTemplate.GetContractTemplateBySign("Sell_Contract_Template_OnlyRead", pub.CreateUserPrivilege("d4d58107-0e58-485f-af9e-3b38c7ff9672")); if (Sell_Contract_Template_OnlyReadEntity != null) { Sell_Contract_Template_OnlyRead = Sell_Contract_Template_OnlyReadEntity.Contract_Template_Content; } if (Contract_ID == 0) { Response.Write("<script>alert('合同无效!');windwo.close();</script>"); Response.End(); } ContractInfo entity = GetContractByID(Contract_ID); if (entity != null) { if (Request["action"] == "print") { Response.Write("<script>window.print();</script>"); } string address = "";// /**/ ContractInfo ContractInfo = null; if (ordersInfo != null) { if (MySupplier != null) { ContractInfo = MyContract.GetContractByID(contact_no, pub.CreateUserPrivilege("a3465003-08b3-4a31-9103-28d16c57f2c8")); if (ContractInfo != null) { Template_Html = ContractInfo.Contract_Note; Template_Html = Template_Html.Replace("{supplier_name}", Supplier_CompanyName); Template_Html = Template_Html.Replace("{member_name}", MemberSupplierCompanyName); Template_Html = Template_Html.Replace("{orders_address}", addr.DisplayAddress(ordersInfo.Orders_Address_State, ordersInfo.Orders_Address_City, ordersInfo.Orders_Address_County) + ordersInfo.Orders_Address_StreetAddress); Template_Html = Template_Html.Replace("{supplier_sealimg}", pub.FormatImgURL(supplierInfo.Supplier_SealImg, "fullpath")); Template_Html = Template_Html.Replace("{orders_paywayname}", ordersInfo.Orders_Payway_Name); Template_Html = Template_Html.Replace("{orders_deliveryname}", ordersInfo.Orders_Delivery_Name); Template_Html = Template_Html.Replace("{orders_goodslist}", new Member().GetOrdersGoods(ordersInfo)); if (memberInfo != null) { Template_Html = Template_Html.Replace("{member_name}", memberInfo.MemberProfileInfo.Member_Company); Template_Html = Template_Html.Replace("{member_sealimg}", pub.FormatImgURL(memberInfo.MemberProfileInfo.Member_SealImg, "fullpath")); } } } Template_Html = ContractTemplate_TopFuJian + Template_Html + ContractTemResponsible + ordersInfo.Orders_ContractAdd + Sell_Contract_Template_OnlyRead + Sell_Contract_Template_EndFuJianContent;; } Response.Write(Server.HtmlDecode(Template_Html)); } else { Response.Write("<script>alert('合同无效!');windwo.close();</script>"); Response.End(); } }
/// <summary> /// 友情链接列表 /// </summary> /// <param name="CateInfo"></param> public void FriendlyLink_Detail(FriendlyLinkCateInfo CateInfo) { QueryInfo Query = new QueryInfo(); Query.PageSize = 0; Query.CurrentPage = 1; Query.ParamInfos.Add(new ParamInfo("AND", "int", "FriendlyLinkInfo.FriendlyLink_IsActive", "=", "1")); Query.ParamInfos.Add(new ParamInfo("AND", "str", "FriendlyLinkInfo.FriendlyLink_CateID", "=", CateInfo.FriendlyLink_Cate_ID.ToString())); Query.ParamInfos.Add(new ParamInfo("AND", "str", "FriendlyLinkInfo.FriendlyLink_Site", "=", "CN")); Query.OrderInfos.Add(new OrderInfo("FriendlyLinkInfo.FriendlyLink_Sort", "ASC")); IList <FriendlyLinkInfo> entitys = mylink.GetFriendlyLinks(Query, pub.CreateUserPrivilege("2f32fa4c-cb10-4ee8-8c28-ee18cd2a70e5")); if (entitys != null) { Response.Write("<ul>"); foreach (FriendlyLinkInfo entity in entitys) { if (entity.FriendlyLink_IsImg == 1) { Response.Write("<li><a href=\"" + entity.FriendlyLink_URL + "\" target=\"_blank\"><img src=\"" + pub.FormatImgURL(entity.FriendlyLink_Img, "fullpath") + "\" align=\"absmiddle\" /></a></li>"); } else { Response.Write("<li><a href=\"" + entity.FriendlyLink_URL + "\" target=\"_blank\">" + entity.FriendlyLink_Name + "</a></li>"); } } Response.Write("</ul>"); } }
/// <summary> /// 搜索店铺下商品 /// </summary> /// <param name="supplier_id"></param> /// <returns></returns> public string ShopProducts(int supplier_id) { StringBuilder strHTML = new StringBuilder(); QueryInfo Query = new QueryInfo(); Query.PageSize = 3; Query.CurrentPage = 1; Query.ParamInfos.Add(new ParamInfo("AND", "str", "ProductInfo.Product_Site", "=", pub.GetCurrentSite())); Query.ParamInfos.Add(new ParamInfo("AND", "int", "ProductInfo.Product_IsInsale", "=", "1")); Query.ParamInfos.Add(new ParamInfo("AND", "int", "ProductInfo.Product_IsAudit", "=", "1")); Query.ParamInfos.Add(new ParamInfo("AND", "int", "ProductInfo.Product_SupplierID", "=", supplier_id.ToString())); Query.OrderInfos.Add(new OrderInfo("ProductInfo.Product_Sort", "ASC")); Query.OrderInfos.Add(new OrderInfo("ProductInfo.Product_ID", "DESC")); IList <ProductInfo> entitys = Myproduct.GetProductList(Query, pub.CreateUserPrivilege("ae7f5215-a21a-4af2-8d47-3cda2e1e2de8")); if (entitys != null) { string targetURL = string.Empty; foreach (ProductInfo entity in entitys) { targetURL = pageurl.FormatURL(pageurl.product_detail, entity.Product_ID.ToString()); strHTML.Append("<li><div class=\"img_box\"><a href=\"" + targetURL + "\" target=\"_blank\"><img src=\"" + pub.FormatImgURL(entity.Product_Img, "thumbnail") + "\" alt=\"" + entity.Product_Name + "\" /></a><i><a href=\"" + targetURL + "\" target=\"_blank\">" + entity.Product_Name + "</a></i></div><p><span>成交 " + entity.Product_SaleAmount + "个</span><strong>" + (entity.Product_PriceType == 1 ? pub.FormatCurrency(entity.Product_Price) : pub.FormatCurrency(pub.GetProductPrice(entity.Product_ManualFee, entity.Product_Weight))) + "</strong></p></li>"); } } entitys = null; return(strHTML.ToString()); }
public string SupplierShops() { QueryInfo Query = new QueryInfo(); Query.PageSize = 0; Query.CurrentPage = 1; string top_keyword = tools.CheckStr(Request["key_word"]); Query.ParamInfos.Add(new ParamInfo("AND", "str", "SupplierShopInfo.Shop_Site", "=", "CN")); Query.OrderInfos.Add(new OrderInfo("SupplierShopInfo.Shop_Name", "asc")); Query.OrderInfos.Add(new OrderInfo("SupplierShopInfo.Shop_ID", "asc")); if (top_keyword.Length > 0) { Query.ParamInfos.Add(new ParamInfo("AND", "str", "SupplierShopInfo.Shop_Name", "like", top_keyword)); } IList <SupplierShopInfo> entitys = MyShop.GetSupplierShops(Query); StringBuilder strHTML = new StringBuilder(); IList <SupplierShopInfo> removelist = null; strHTML.Append("<div class=\"blk44\"><a name=\"top\"></a><a href=\"#A\">A</a><a href=\"#B\">B</a><a href=\"#C\">C</a><a href=\"#D\">D</a><a href=\"#E\">E</a><a href=\"#F\">F</a><a href=\"#G\">G</a><a href=\"#H\">H</a><a href=\"#I\">I</a><a href=\"#J\">J</a><a href=\"#K\">K</a><a href=\"#L\">L</a><a href=\"#M\">M</a><a href=\"#N\">N</a><a href=\"#O\">O</a><a href=\"#P\">P</a><a href=\"#Q\">Q</a><a href=\"#R\">R</a><a href=\"#S\">S</a><a href=\"#T\">T</a><a href=\"#U\">U</a><a href=\"#V\">V</a><a href=\"#W\">W</a><a href=\"#X\">X</a><a href=\"#Y\">Y</a><a href=\"#Z\">Z</a><a href=\"#other\">(0-9)</a></div>"); if (entitys != null) { string[] Items = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; StringBuilder strContent = new StringBuilder(); foreach (string item in Items) { strContent = new StringBuilder(); removelist = new List <SupplierShopInfo>(); #region 内容输出 foreach (SupplierShopInfo entity in entitys) { if (!System.Text.RegularExpressions.Regex.IsMatch(pub.GetFirstWordLetter(entity.Shop_Name), "^" + item)) { continue; } removelist.Add(entity); strContent.Append("<li><a href=\"http://" + entity.Shop_Domain + Application["Shop_Second_Domain"] + "\" target=\"_blank\"><img src=\"" + pub.FormatImgURL(entity.Shop_Img, "fullpath") + "\" title=\"" + entity.Shop_Name + "\" style=\" height: 200px; width: 200px;margin: 0;\" /><span title=\"" + entity.Shop_Name + "\" >" + tools.CutStr(entity.Shop_Name, 16) + "</span></a></li>"); } #endregion foreach (SupplierShopInfo moveentity in removelist) { entitys.Remove(moveentity); } removelist.Clear(); removelist = null; if (strContent.Length > 0) { strHTML.Append("<div class=\"blk45\">"); strHTML.Append(" <h2>"); strHTML.Append(" <strong><em><a name=\""+ item + "\">" + item + "</a></em><span>相关供应商</span></strong>"); strHTML.Append(" </h2>"); strHTML.Append(" <div class=\"b45_main02\">"); strHTML.Append(" <ul>"); strHTML.Append(strContent.ToString()); strHTML.Append(" </ul>"); strHTML.Append(" </div>"); strHTML.Append("</div>"); } } if (entitys.Count > 0) { strHTML.Append("<div class=\"blk45\">"); strHTML.Append(" <h2>"); strHTML.Append(" <strong><em><a name=\"other\">(0-9)</a></em><span>相关供应商</span></strong>"); strHTML.Append(" </h2>"); strHTML.Append(" <div class=\"b45_main02\">"); strHTML.Append(" <ul>"); #region 内容输出 foreach (SupplierShopInfo entity in entitys) { //if (entity.Shop_Img) //{ strHTML.Append("<li style=\" margin: 5px 13px;\"><a href=\"http://" + entity.Shop_Domain + Application["Shop_Second_Domain"] + "\" target=\"_blank\"><img src=\"" + pub.FormatImgURL(entity.Shop_Img, "fullpath") + "\" title=\"" + entity.Shop_Name + "\" style=\" height: 200px; width: 200px;margin: 0;\" /><span title=\"" + entity.Shop_Name + "\" >" + tools.CutStr(entity.Shop_Name, 16) + "</span></a></li>"); //} //else //{ // strHTML.Append("<li style=\" margin: 5px 13px;\"><a href=\"http://" + entity.Shop_Domain + Application["Shop_Second_Domain"] + "\" target=\"_blank\"><img src=\"" + pub.FormatImgURL(entity.Shop_Img, "fullpath") + "\" title=\"" + entity.Shop_Name + "\" style=\" height: 200px; width: 200px;margin: 0;\" /></a></li>"); //} } #endregion strHTML.Append(" </ul>"); strHTML.Append(" </div>"); strHTML.Append("</div>"); } entitys = null; } return(strHTML.ToString()); }
//获取待评价商品 public string GetAuditingProduct(int Orders_ID) { IList <OrdersGoodsInfo> OrderGoods = MyOrders.GetGoodsListByOrderID(Orders_ID); string html = ""; if (OrderGoods != null) { html += "<ul>"; foreach (OrdersGoodsInfo entity in OrderGoods) { if (entity.Orders_Goods_Type == 0) { html += "<li><a href=\"/product/reviews_add.aspx?product_id=" + entity.Orders_Goods_Product_ID + "&sn=" + Orders_ID + "\" target=\"_blank\"><img src=\"" + pub.FormatImgURL(entity.Orders_Goods_Product_Img, "thumbnail") + "\" style=\"width:100px; height:100px;\"/></a></li>"; } } html += "</ul>"; } return(html); }
public void GetPromotionLimitis() { string page_url = ""; int curr_page = tools.CheckInt(Request["page"]); if (curr_page < 1) { curr_page = 1; } page_url = "/Promotion/Promotioning.aspx?flag=1"; int i = 0; QueryInfo Query = new QueryInfo(); Query.PageSize = 100; Query.CurrentPage = curr_page; Query.ParamInfos.Add(new ParamInfo("AND", "str", "PromotionLimitInfo.Promotion_Limit_Site", "=", "CN")); Query.ParamInfos.Add(new ParamInfo("AND", "funint", "DATEDIFF(s,{PromotionLimitInfo.Promotion_Limit_Starttime},'" + DateTime.Now + "')", ">=", "0")); Query.ParamInfos.Add(new ParamInfo("AND", "funint", "DATEDIFF(s,{PromotionLimitInfo.Promotion_Limit_Endtime},'" + DateTime.Now + "')", "<=", "0")); Query.OrderInfos.Add(new OrderInfo("PromotionLimitInfo.Promotion_Limit_Starttime", "ASC")); IList <PromotionLimitInfo> entitys = MyLimits.GetPromotionLimits(Query, pub.CreateUserPrivilege("22d21441-155a-4dc5-aec6-dcf5bdedd5cf")); PageInfo pageinfo = MyLimits.GetPageInfo(Query, pub.CreateUserPrivilege("22d21441-155a-4dc5-aec6-dcf5bdedd5cf")); if (entitys != null) { Response.Write(" <div id=\"webwrap\">"); Response.Write(" <div class=\"blk01\">"); Response.Write(" <ul class=\"lst1\">"); foreach (PromotionLimitInfo entity in entitys) { i++; Response.Write("<li><p class=\"p1\" id=\"limit_tip_" + i + "\" name=\"limit_tip\">"); TimeSpan span1 = entity.Promotion_Limit_Endtime - DateTime.Now; int timespan; timespan = (span1.Days * (24 * 3600)) + (span1.Hours * 3600) + (span1.Minutes * 60) + (span1.Seconds); Response.Write(" "); Response.Write("<script>updatetime1(" + timespan + ",'limit_tip_" + i + "')</script>"); Response.Write("</p>"); ProductInfo productinfo = myproduct.GetProductByID(entity.Promotion_Limit_ProductID); if (productinfo != null) { Response.Write("<a class=\"a2\" href=\"/Product/detail.aspx?Product_ID=" + entity.Promotion_Limit_ProductID + "\" target=\"_blank\" alt=\"" + productinfo.Product_Name + "\" title=\"" + productinfo.Product_Name + "\"><img src=\"" + pub.FormatImgURL(productinfo.Product_Img, "fullpath") + "\" width=\"170\" height=\"170\" onload=\"javascript:AutosizeImage(this,170,170);\"></a><p class=\"p2\"><a href=\"/Product/detail.aspx?Product_ID=" + entity.Promotion_Limit_ProductID + "\" target=\"_blank\" alt=\"" + productinfo.Product_Name + "\" title=\"" + productinfo.Product_Name + "\">" + productinfo.Product_Name + "</a></p>"); Response.Write("<p>原价:<span class=\"sp01\">¥" + pub.FormatCurrency(myproduct.Get_Member_Price(productinfo.Product_ID, productinfo.Product_Price)) + "</span></p>"); } Response.Write(" <p>抢购价: <strong>" + pub.FormatCurrency(entity.Promotion_Limit_Price) + "</strong></p>"); Response.Write("<a href=\"/Product/detail.aspx?Product_ID=" + entity.Promotion_Limit_ProductID + "\" target=\"_blank\" class=\"a1\"></a></li>"); } Response.Write("</ul><div class=\"clear\"></div>"); Response.Write("<div class=\"clear\"></div>"); Response.Write("</div>"); Response.Write("<table width=\"940px\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">"); Response.Write("<tr><td height=\"10\"></td></tr>"); Response.Write("<tr><td align=\"right\">"); pub.Page(pageinfo.PageCount, pageinfo.CurrentPage, page_url, pageinfo.PageSize, pageinfo.RecordCount); Response.Write("</td></tr>"); Response.Write("</table>"); Response.Write("<div class=\"clear\"></div>"); Response.Write("</div>"); } else { Response.Write("<div style=\"width:960px; margin:0 auto; text-align:center; height:40px; line-height:40px;\">暂无相关信息</div>"); } }